Package net.solarnetwork.ocpp.domain
Class SampledValue
java.lang.Object
net.solarnetwork.ocpp.domain.SampledValue
- All Implemented Interfaces:
Comparable<SampledValue>
A sampled value, e.g. a meter reading.
- Version:
- 1.1
- Author:
- matt
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSampledValue(UUID sessionId, Instant timestamp, String value, ReadingContext context, Measurand measurand, Phase phase, Location location, UnitOfMeasure unit) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic SampledValue.Builderbuilder()Creates builder to buildSampledValue.intbooleanGet the reading context.Get the location.Get the measurement type.getPhase()Get the phase.Get theChargeSessionID associated with this value.Get the time the sample was captured.getUnit()Get the measurement unit.getValue()Get the sampled value.inthashCode()Get a builder, populated with this instance's values.toString()
-
Constructor Details
-
SampledValue
public SampledValue(UUID sessionId, Instant timestamp, String value, ReadingContext context, Measurand measurand, Phase phase, Location location, UnitOfMeasure unit) Constructor.- Parameters:
sessionId- the session IDtimestamp- the timestampvalue- the valuecontext- the contextmeasurand- the measurandphase- the phaselocation- the locationunit- the unit
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<SampledValue>
-
toString
-
getSessionId
Get theChargeSessionID associated with this value.- Returns:
- the session ID
-
getTimestamp
Get the time the sample was captured.- Returns:
- the timestamp
-
getValue
Get the sampled value.- Returns:
- the value the value
-
getContext
Get the reading context.- Returns:
- the context
-
getMeasurand
Get the measurement type.- Returns:
- the measurand
-
getPhase
Get the phase.- Returns:
- the phase
-
getLocation
Get the location.- Returns:
- the location
-
getUnit
Get the measurement unit.- Returns:
- the unit
-
builder
Creates builder to buildSampledValue.- Returns:
- created builder
-
toBuilder
Get a builder, populated with this instance's values.- Returns:
- a pre-populated builder
-