This class represents the immutable result of a measurement stated in a known quantity.
All instances of this class shall be immutable.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class | AbstractMeasurement.
This class represents the default measurement. |
| Modifier and Type | Field and Description |
|---|---|
| private final Instant | |
| private final Quantity | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
| public final Instant | Returns: the instant.Implements tech. Returns the measurement instant. |
| public Quantity | Returns: the quantity.Implements tech. Returns the measurement quantity. |
| public final long | Returns: the timestamp.Implements tech. Returns the measurement timestamp. |
| public int | |
| public String |
| instant | back to summary |
|---|---|
| private final Instant instant | |
| quantity | back to summary |
|---|---|
| private final Quantity<Q> quantity | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| AbstractMeasurement | back to summary |
|---|---|
| protected AbstractMeasurement(Quantity<Q> q, Instant i) constructor. | |
| AbstractMeasurement | back to summary |
|---|---|
| protected AbstractMeasurement(Quantity<Q> q, long t) constructor. | |
| AbstractMeasurement | back to summary |
|---|---|
| protected AbstractMeasurement(Quantity<Q> q) constructor. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getInstant | back to summary |
|---|---|
| public final Instant getInstant() Implements tech. Returns the measurement instant.
| |
| getQuantity | back to summary |
|---|---|
| public Quantity Implements tech. Returns the measurement quantity.
| |
| getTimestamp | back to summary |
|---|---|
| public final long getTimestamp() Implements tech. Returns the measurement timestamp.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(Measurement<Q>
the object to be compared. m)Implements java. Compares this object with the specified object for order. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides tech. | |
| Default | back to summary |
|---|---|
protected Default(Quantity<Q extends Quantity<Q>> q, Instant i)
| |
| Default | back to summary |
|---|---|
protected Default(Quantity<Q extends Quantity<Q>> q, long t)
| |
| Default | back to summary |
|---|---|
protected Default(Quantity<Q extends Quantity<Q>> q)
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(Measurement<Q> m) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(Measurement<Q>
the object to be compared. m)Implements java. Compares this object with the specified object for order. |
| public ComparableQuantity | getQuantity()
Overrides tech. Implements tech. Returns the measurement quantity. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides tech. | |
| DefaultComparable | back to summary |
|---|---|
protected DefaultComparable(ComparableQuantity<Q extends Quantity<Q>> q, Instant i)
| |
| DefaultComparable | back to summary |
|---|---|
protected DefaultComparable(ComparableQuantity<Q extends Quantity<Q>> q, long t)
| |
| DefaultComparable | back to summary |
|---|---|
protected DefaultComparable(ComparableQuantity<Q extends Quantity<Q>> q)
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(Measurement<Q> m) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| getQuantity | back to summary |
|---|---|
| public ComparableQuantity Overrides tech. Implements tech. Doc from tech. Returns the measurement quantity.
| |