|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ilog.server.jcomp.MvUserType | +--ilog.server.jcomp.MvKeyValueTable
This class carries out the association between a key and a value, based on the Map interface. The key and value are of the MvValue type, thus allowing the use of this class in a large variety of cases. All instances of subclasses of MvUserType can also be used as keys or values. This kind of table can be transmitted between Rogue Wave Server processed.
Inner classes inherited from class java.util.Map |
Map.Entry |
Field Summary | |
protected Map |
_map
|
Constructor Summary | |
MvKeyValueTable()
This constructor initializes an empty table. |
|
MvKeyValueTable(List orig)
This constructor initializes the MvKeyValueTable instance with orig. |
|
MvKeyValueTable(Map orig)
Copy constructor. |
|
MvKeyValueTable(MvKeyValueTable orig)
Copy constructor. |
Method Summary | |
void |
clear()
Removes all mappings from this map (optional operation). |
boolean |
containsKey(Object key)
Returns true if this map contains a mapping for the specified key. |
boolean |
containsValue(Object value)
Returns true if this map maps one or more keys to the specified value. |
static MvKeyValueTable |
Decode(MvMessage msg)
|
static MvKeyValueTable |
DeepClone(Map map)
|
MvMessage |
encode(MvMessage msg)
Writes an instance into an MvMessage for transfer to another process. |
Set |
entrySet()
Returns a set view of the mappings contained in this map. |
boolean |
equals(Object o)
Compares the specified object with this map to check whether they are equal. |
Object |
get(Object key)
Returns the value to which this map maps the specified key. |
int |
hashCode()
Returns the hash code value for this map. |
boolean |
isEmpty()
Returns true if this map contains no key-value mappings. |
Set |
keySet()
Returns a set view of the keys contained in this map. |
Object |
put(Object key,
Object value)
Associates the specified value with the specified key in this map (optional operation). |
void |
putAll(Map t)
Copies all the mappings from the specified map to this map (optional operation). |
Object |
remove(Object key)
Removes the mapping for this key from the map if one exists (optional operation). |
int |
size()
Returns the number of key-value mappings in this map. |
protected MvArray |
toMvArray()
|
Collection |
values()
Returns a collection view of the values contained in this map. |
Methods inherited from class ilog.server.jcomp.MvUserType |
asAny, asBoolean, asChar, asDouble, asFloat, asHRef, asLong, asObjectRef, asRef, asString, asValue, clone, duplicate, stream |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map |
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, put, putIfAbsent, remove, replace, replace, replaceAll |
Field Detail |
protected Map _map
Constructor Detail |
public MvKeyValueTable()
public MvKeyValueTable(List orig)
orig
- An instance of List containing Lists of
two items.public MvKeyValueTable(MvKeyValueTable orig)
orig
- Table to copy.public MvKeyValueTable(Map orig)
orig
- Table to copy.Method Detail |
public static MvKeyValueTable DeepClone(Map map)
public int size()
size
in interface Map
public boolean isEmpty()
isEmpty
in interface Map
public boolean containsKey(Object key)
containsKey
in interface Map
key
- The key to be tested.ClassCastException
- if the key is of an inappropriate
type for this map.NullPointerException
- if the key is null and
this map does not allow null keys.public boolean containsValue(Object value)
containsValue
in interface Map
value
- The value to be tested.public Object get(Object key)
get
in interface Map
key
- The key whose associated value is to be returned.ClassCastException
- if the key is of an inappropriate
type for this map.NullPointerException
- if the key is null and
this map does not allow null keys.containsKey(Object)
public Object put(Object key, Object value)
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key.UnsupportedOperationException
- if this map does not
support the put operation.ClassCastException
- if the class of the specified key or
value prevents it from being stored in this map.IllegalArgumentException
- if some aspects of this key or
value prevent it from being stored in this map.NullPointerException
- if this map does not allow
null keys or values, and the specified key or
value is null.public Object remove(Object key)
remove
in interface Map
key
- The key whose mapping is to be removed from the map.UnsupportedOperationException
- if this map does not
support the remove method.public void putAll(Map t)
putAll
in interface Map
t
- The mappings to be stored in this map.UnsupportedOperationException
- if this map does not
support the putAll method.ClassCastException
- if the class of a key or value in
the specified table prevents it from being stored in this
map.IllegalArgumentException
- if some aspects of a key or
value in the specified map prevent it from being stored in
this map.NullPointerException
- if this map does not allow
null keys or values, and the specified key or
value is null.public void clear()
clear
in interface Map
UnsupportedOperationException
- if this map does not
support clear.public Set keySet()
keySet
in interface Map
public Collection values()
values
in interface Map
public Set entrySet()
entrySet
in interface Map
public boolean equals(Object o)
equals
in interface Map
equals
in class MvUserType
o
- Object to be compared with this map.public int hashCode()
hashCode
in interface Map
hashCode
in class Object
Map.Entry#hashCode()
,
Object.hashCode()
,
Object.equals(Object)
,
equals(Object)
public static MvKeyValueTable Decode(MvMessage msg)
public MvMessage encode(MvMessage msg)
encode
method in
MvUserType
for more details.encode
in class MvUserType
msg
- The message to encode.protected MvArray toMvArray()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |