Class BasicStreamDatum

java.lang.Object
net.solarnetwork.domain.datum.BasicStreamDatum
All Implemented Interfaces:
Serializable, Cloneable, StreamDatum
Direct Known Subclasses:
BasicAggregateStreamDatum

public class BasicStreamDatum extends Object implements StreamDatum, Cloneable, Serializable
Basic implementation of StreamDatum.
Since:
1.72
Version:
1.0
Author:
matt
See Also:
  • Constructor Details

    • BasicStreamDatum

      public BasicStreamDatum(UUID streamId, Instant timestamp, DatumProperties properties)
      Constructor.
      Parameters:
      streamId - the stream ID
      timestamp - the timestamp
      properties - the optional samples
      Throws:
      IllegalArgumentException - if streamId or timestamp are null
  • Method Details

    • clone

      public BasicStreamDatum clone()
      Overrides:
      clone in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getTimestamp

      public Instant getTimestamp()
      Description copied from interface: StreamDatum
      Get the associated timestamp of this datum.

      This value represents the point in time the properties associated with this datum were observed, collected, inferred, predicted, etc.

      Specified by:
      getTimestamp in interface StreamDatum
      Returns:
      the timestamp for this datum
    • getStreamId

      public UUID getStreamId()
      Description copied from interface: StreamDatum
      Get the unique ID of the stream this datum is a part of.
      Specified by:
      getStreamId in interface StreamDatum
      Returns:
      the stream ID
    • getProperties

      public DatumProperties getProperties()
      Description copied from interface: StreamDatum
      Get the properties associated with this datum.
      Specified by:
      getProperties in interface StreamDatum
      Returns:
      the properties