Record Class DataNeedCalculation
java.lang.Object
java.lang.Record
energy.eddie.api.agnostic.data.needs.DataNeedCalculation
-
Constructor Summary
ConstructorsConstructorDescriptionDataNeedCalculation(boolean supportsDataNeed, String unsupportedDataNeedMessage) DataNeedCalculation(boolean supportsDataNeed, String unsupportedDataNeedMessage, List<Granularity> granularities, Timeframe permissionTimeframe, Timeframe energyDataTimeframe) Creates an instance of aDataNeedCalculationrecord class.DataNeedCalculation(boolean supportsDataNeed, List<Granularity> granularities, Timeframe permissionTimeframe, Timeframe energyDataTimeframe) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theenergyDataTimeframerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegranularitiesrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thepermissionTimeframerecord component.booleanReturns the value of thesupportsDataNeedrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theunsupportedDataNeedMessagerecord component.
-
Constructor Details
-
DataNeedCalculation
-
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 aDataNeedCalculationrecord class.- Parameters:
supportsDataNeed- the value for thesupportsDataNeedrecord componentunsupportedDataNeedMessage- the value for theunsupportedDataNeedMessagerecord componentgranularities- the value for thegranularitiesrecord componentpermissionTimeframe- the value for thepermissionTimeframerecord componentenergyDataTimeframe- the value for theenergyDataTimeframerecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
supportsDataNeed
public boolean supportsDataNeed()Returns the value of thesupportsDataNeedrecord component.- Returns:
- the value of the
supportsDataNeedrecord component
-
unsupportedDataNeedMessage
Returns the value of theunsupportedDataNeedMessagerecord component.- Returns:
- the value of the
unsupportedDataNeedMessagerecord component
-
granularities
Returns the value of thegranularitiesrecord component.- Returns:
- the value of the
granularitiesrecord component
-
permissionTimeframe
Returns the value of thepermissionTimeframerecord component.- Returns:
- the value of the
permissionTimeframerecord component
-
energyDataTimeframe
Returns the value of theenergyDataTimeframerecord component.- Returns:
- the value of the
energyDataTimeframerecord component
-