Package nz.org.riskscape.engine.types
Class OfUnit
java.lang.Object
nz.org.riskscape.engine.types.OfUnit
- All Implemented Interfaces:
Type
,WrappingType
Wraps a type adding some extra unit metadata, e.g. adding the word "metre" to a decimal
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface nz.org.riskscape.engine.types.Type
checkForNull, find, findAllowNull, getUnwrappedType, isA, isNumeric, isWrapped, toString, unwrap
Methods inherited from interface nz.org.riskscape.engine.types.WrappingType
asStruct, estimateSize, fromBytes, isNullable, toBytes, visit
-
Constructor Details
-
OfUnit
-
-
Method Details
-
coerce
Description copied from interface:Type
Attempt to convert the given value in to one represented by this type.
-
internalType
Description copied from interface:Type
The underlying java class used to represent this type.
- Specified by:
internalType
in interfaceType
-
getUnit
-
getUnderlyingType
- Specified by:
getUnderlyingType
in interfaceWrappingType
- Returns:
- the type that we immediately wrap. Used by
Type.getUnwrappedType()
to descend through all wrappedType
to find the first unwrapped one.
-