public class ToIntMapMapping extends MapMapping implements ToIntMapping
| Red (ssb) |
| Red (ssb) |
_map| Constructor and Description |
|---|
ToIntMapMapping(java.util.Map map)
Construct a ToIntMapMapping 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.
|
int |
toInt(java.lang.Object object)
Return the int 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 in the mapping.
|
equals, hashCode, toStringpublic ToIntMapMapping(java.util.Map map)
map - The given map.public boolean inDomain(java.lang.Object object)
toInt(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 Integer.inDomain in interface MappinginDomain in class MapMappingobject - The given object.public int toInt(java.lang.Object object)
Mapping.inDomain(Object).toInt in interface ToIntMappingobject - The given object.java.lang.RuntimeException - If the given object is not an instance
of Integer or if the given object is not in the
domain of the mapping.public java.lang.Object toObject(java.lang.Object object)
Mapping