Package nz.org.riskscape.engine.types
Class Value
java.lang.Object
nz.org.riskscape.engine.types.Value
- Record Components:
type
- to coerce to.
Represents any java object that has been coerced to the associated type.
-
Constructor Details
-
Value
Creates a new value.
- Parameters:
type
- the type that the value must conform torawValue
- unchecked value, that will be coerced before this object is fully created- Throws:
CoercionException
-
-
Method Details
-
of
- Throws:
CoercionException
-
toString
-
toStruct
- Returns:
- If the unwrapped type of this value is not a struct, then this method will return a structed version of the value where, value is the only member of the struct
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getValue
The underlying value, matches
getType()
. -
getType
The type that represents
getValue()
-