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()
Quantified
unit
in interface Quantified
public java.lang.Boolean validity()
ValidityAware
validity
in interface ValidityAware
true
if the content is valid, false
if it is not.public com.google.common.base.Optional<V> error()
ErronousValue
error
in interface ErronousValue<V>
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object