|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap
ilog.cpl.util.IlpDefaultValueMap
public class IlpDefaultValueMap
CPL mapping table implementation using hash map.
Note that this implementation does not ensure consistency between the key and value type declaration and the content of the map itself.
Compatibility Note: In JViews 8.0, this class was moved from
ilog.cpl.service to ilog.cpl.util.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
IlpDefaultValueMap(Class keyClass,
Class valueClass)
Constructs a new, empty mapping. |
|
IlpDefaultValueMap(Class keyClass,
Class valueClass,
Map map)
Constructs a new mapping from the given map. |
|
| Method Summary | |
|---|---|
boolean |
addValue(Object key,
Object value)
Adds a new key-value set. |
Object |
clone()
Returns a shallow copy of this instance: the keys and values themselves are not cloned. |
Class |
getKeyClass()
Returns the Java type of the keys used in this mapping. |
Object |
getValue(Object key)
Returns the value of the mapping for a specific key. |
Class |
getValueClass()
Returns the type of the values returned by this mapping. |
| Methods inherited from class java.util.HashMap |
|---|
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
|---|
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
| Constructor Detail |
|---|
public IlpDefaultValueMap(Class keyClass,
Class valueClass)
keyClass - The Java type of the keys in the mapping.valueClass - The Java type of the values returned by the mapping.
public IlpDefaultValueMap(Class keyClass,
Class valueClass,
Map map)
keyClass - The Java type of the keys in the mapping.valueClass - The Java type of the values returned by the mapping.map - The map to be copied into this one.| Method Detail |
|---|
public Object clone()
clone in class HashMappublic Class getKeyClass()
getKeyClass in interface IlpValueMappublic Class getValueClass()
Object.
getValueClass in interface IlpValueMappublic Object getValue(Object key)
getValue in interface IlpValueMapkey - The key for which to get the value.
public boolean addValue(Object key,
Object value)
addValue in interface IlpValueMapkey - The key for the mapping. The key may be null.value - The value to be added. The value may be null.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||