V - the type of the (numerical) scalar values.public final class ImmutableQuantifiedValue<V> extends java.lang.Object implements QuantifiedValue<V>
true and the (optional) error will not be
present.| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
com.google.common.base.Optional<V> |
error()
Retrieve the error of the scalar
|
int |
hashCode() |
static <V> ImmutableQuantifiedValue<V> |
of(V value,
Unit unit) |
java.lang.String |
toString() |
Unit |
unit()
Retrieves the base of the entity
|
java.lang.Boolean |
validity()
Retrieves the validity flag of the object.
|
V |
value() |
ImmutableQuantifiedValue<V> |
withError(com.google.common.base.Optional<V> newError) |
ImmutableQuantifiedValue<V> |
withError(V newError) |
ImmutableQuantifiedValue<V> |
withValidity(boolean newValidity) |
public static <V> ImmutableQuantifiedValue<V> of(V value, Unit unit)
public ImmutableQuantifiedValue<V> withValidity(boolean newValidity)
public ImmutableQuantifiedValue<V> withError(com.google.common.base.Optional<V> newError)
public ImmutableQuantifiedValue<V> withError(V newError)
public V value()
value in interface ErronousValue<V>public Unit unit()
Quantifiedunit in interface Quantifiedpublic java.lang.Boolean validity()
ValidityAwarevalidity in interface ValidityAwaretrue if the content is valid, false if it is not.public com.google.common.base.Optional<V> error()
ErronousValueerror in interface ErronousValue<V>public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object