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 aData4Unitrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.Returns the value of thedataClassrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.period()Returns the value of theperiodrecord component.static voidprocess(Unit unit, Collection<ValueDefinition> valueDefinitions, TimestampPeriod period, long timeSlice, Consumer<Data4Unit> processor) longReturns the value of thetimeSlicerecord component.final StringtoString()Returns a string representation of this record class.unit()Returns the value of theunitrecord component.
-
Constructor Details
-
Data4Unit
public Data4Unit(Class<? extends Data> dataClass, Unit unit, TimestampPeriod period, long timeSlice, Collection<String> attributes) Creates an instance of aData4Unitrecord class.- Parameters:
dataClass- the value for thedataClassrecord componentunit- the value for theunitrecord componentperiod- the value for theperiodrecord componenttimeSlice- the value for thetimeSlicerecord componentattributes- the value for theattributesrecord 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 theunitrecord component.- Returns:
- the value of the
unitrecord component
-
period
Returns the value of theperiodrecord component.- Returns:
- the value of the
periodrecord component
-
timeSlice
public long timeSlice()Returns the value of thetimeSlicerecord component.- Returns:
- the value of the
timeSlicerecord component
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-