public class ToDoubleMapMapping extends MapMapping implements ToDoubleMapping
_map
Constructor and Description |
---|
ToDoubleMapMapping(java.util.Map map)
Construct a ToDoubleMapMapping from a given map.
|
Modifier and Type | Method and Description |
---|---|
boolean |
inDomain(java.lang.Object object)
Return true if the given object is in the domain of this Mapping.
|
double |
toDouble(java.lang.Object object)
Return the double value that is associated with given object under
this mapping.
|
java.lang.Object |
toObject(java.lang.Object object)
Return the object associated with the given object.
|
equals, hashCode, toString
public ToDoubleMapMapping(java.util.Map map)
map
- The given map.public boolean inDomain(java.lang.Object object)
toDouble(Object)
, which means that the object is a
key in the Map that is associated with this Mapping and the value
in the Map is an instance of Double.inDomain
in interface Mapping
inDomain
in class MapMapping
object
- The given object.public double toDouble(java.lang.Object object)
inDomain(Object)
.toDouble
in interface ToDoubleMapping
object
- The given object.java.lang.RuntimeException
- If the given object is not an instance
of Double
or if the given object is not in the
domain of the mapping.