Record Class DataNeedCalculation

java.lang.Object
java.lang.Record
energy.eddie.api.agnostic.data.needs.DataNeedCalculation

public record DataNeedCalculation(boolean supportsDataNeed, @Nullable String unsupportedDataNeedMessage, @Nullable List<Granularity> granularities, @Nullable Timeframe permissionTimeframe, @Nullable Timeframe energyDataTimeframe) extends Record
  • Constructor Details

    • DataNeedCalculation

      public DataNeedCalculation(boolean supportsDataNeed, String unsupportedDataNeedMessage)
    • DataNeedCalculation

      public DataNeedCalculation(boolean supportsDataNeed, @Nullable List<Granularity> granularities, @Nullable Timeframe permissionTimeframe, @Nullable Timeframe energyDataTimeframe)
    • DataNeedCalculation

      public DataNeedCalculation(boolean supportsDataNeed, @Nullable String unsupportedDataNeedMessage, @Nullable List<Granularity> granularities, @Nullable Timeframe permissionTimeframe, @Nullable Timeframe energyDataTimeframe)
      Creates an instance of a DataNeedCalculation record class.
      Parameters:
      supportsDataNeed - the value for the supportsDataNeed record component
      unsupportedDataNeedMessage - the value for the unsupportedDataNeedMessage record component
      granularities - the value for the granularities record component
      permissionTimeframe - the value for the permissionTimeframe record component
      energyDataTimeframe - the value for the energyDataTimeframe record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • supportsDataNeed

      public boolean supportsDataNeed()
      Returns the value of the supportsDataNeed record component.
      Returns:
      the value of the supportsDataNeed record component
    • unsupportedDataNeedMessage

      @Nullable public String unsupportedDataNeedMessage()
      Returns the value of the unsupportedDataNeedMessage record component.
      Returns:
      the value of the unsupportedDataNeedMessage record component
    • granularities

      @Nullable public List<Granularity> granularities()
      Returns the value of the granularities record component.
      Returns:
      the value of the granularities record component
    • permissionTimeframe

      @Nullable public Timeframe permissionTimeframe()
      Returns the value of the permissionTimeframe record component.
      Returns:
      the value of the permissionTimeframe record component
    • energyDataTimeframe

      @Nullable public Timeframe energyDataTimeframe()
      Returns the value of the energyDataTimeframe record component.
      Returns:
      the value of the energyDataTimeframe record component