Package com.storedobject.ui.iot
Record Class Data4Unit
java.lang.Object
java.lang.Record
com.storedobject.ui.iot.Data4Unit
public record Data4Unit(Class<? extends Data> dataClass, Unit unit, TimestampPeriod period, long timeSlice, Collection<String> attributes)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionData4Unit
(Class<? extends Data> dataClass, Unit unit, TimestampPeriod period, long timeSlice, Collection<String> attributes) Creates an instance of aData4Unit
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributes
record component.Returns the value of thedataClass
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.period()
Returns the value of theperiod
record component.static void
process
(Unit unit, Collection<ValueDefinition> valueDefinitions, TimestampPeriod period, long timeSlice, Consumer<Data4Unit> processor) long
Returns the value of thetimeSlice
record component.final String
toString()
Returns a string representation of this record class.unit()
Returns the value of theunit
record component.
-
Constructor Details
-
Data4Unit
public Data4Unit(Class<? extends Data> dataClass, Unit unit, TimestampPeriod period, long timeSlice, Collection<String> attributes) Creates an instance of aData4Unit
record class.- Parameters:
dataClass
- the value for thedataClass
record componentunit
- the value for theunit
record componentperiod
- the value for theperiod
record componenttimeSlice
- the value for thetimeSlice
record componentattributes
- the value for theattributes
record component
-
-
Method Details
-
process
public static void process(Unit unit, Collection<ValueDefinition> valueDefinitions, TimestampPeriod period, long timeSlice, Consumer<Data4Unit> processor) -
toString
-
hashCode
-
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 '=='. -
dataClass
-
unit
Returns the value of theunit
record component.- Returns:
- the value of the
unit
record component
-
period
Returns the value of theperiod
record component.- Returns:
- the value of the
period
record component
-
timeSlice
public long timeSlice()Returns the value of thetimeSlice
record component.- Returns:
- the value of the
timeSlice
record component
-
attributes
Returns the value of theattributes
record component.- Returns:
- the value of the
attributes
record component
-