Class NCMap
java.lang.Object
com.adobe.versioncue.nativecomm.msg.NCType
com.adobe.versioncue.nativecomm.msg.NCMap
- All Implemented Interfaces:
INCExternalizable
A Dictionary mapping
NCType
keys to NCType
objects.
Note that this class is **NOT** Thread-safe in its current form.-
Field Summary
Fields inherited from class com.adobe.versioncue.nativecomm.msg.NCType
TYPE_BOOLEAN, TYPE_BYTEBUFFER, TYPE_DATE, TYPE_DOUBLE, TYPE_INTEGER, TYPE_LIST, TYPE_LONG, TYPE_MAP, TYPE_NULL, TYPE_STRING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclear()
Removes all entries from this NCMapobject
.boolean
containsKey
(NCType key) Returns true if this NCMap contains a mapping for the specified key.boolean
containsKey
(String key) Returns true if this NCMap contains a mapping for the specified key.entries()
Returns an iterator over the mappings in this IDicitonary.entrySet()
Returns a set of Map.Entry objects.boolean
Force subclasses to implement.Returns the NCType object associated with the specified key.Returns the NCType object associated with the specified key.boolean
Returns the boolean value associated with the specified key.byte[]
getByteArray
(String key) Returns the byte[] value associated with the specified key.Returns the ByteBuffer value associated with the specified key.Returns the date value associated with the specified key.double
Returns the double value associated with the specified key.int
Returns the int value associated with the specified key.Returns the NCList value associated with the specified key.long
Returns the long value associated with the specified key.Returns the NCMap value associated with the specified key.Returns the String value associated with the specified key.int
getType()
Returns the type of thisNCType
object.int
hashCode()
Force subclasses to implement.boolean
isEmtpy()
Returns true if the NCMap is emptyAdd a key/value pair to this map.Add a key/value pair to this map.Add a key/value pair to this map.Add a key/value pair to this map.Add a key/value pair to this map.Add a key/value pair to this map.put
(String key, INCExternalizable value) Add a key/value pair to this map.Add a key/value pair to this map.Add a key/value pair to this map.put
(String key, ByteBuffer value) Add a key/value pair to this map.Add a key/value pair to this map.Removes the mapping for this key from thisNCMap
if it is present.Removes the mapping for this key from thisNCMap
if it is present.int
size()
Returns the number of entries in the NCMap.toString()
Force subclasses to implement.Methods inherited from class com.adobe.versioncue.nativecomm.msg.NCType
externalize
-
Constructor Details
-
NCMap
public NCMap()Default constructor
-
-
Method Details
-
size
public int size()Returns the number of entries in the NCMap.- Returns:
- number of entries in the NCMap.
-
isEmtpy
public boolean isEmtpy()Returns true if the NCMap is empty- Returns:
- true if the NCMap is empty
-
entries
Returns an iterator over the mappings in this IDicitonary. The elements are returned in no particular order.- Returns:
- a
Iterator
containingjava.util.Map.Entry
Objects
-
entrySet
Returns a set of Map.Entry objects.- Returns:
- set of Map.Entry objects.
-
containsKey
Returns true if this NCMap contains a mapping for the specified key.- Parameters:
key
- - key to check- Returns:
- true if this NCMap contains a mapping for the specified key.
-
containsKey
Returns true if this NCMap contains a mapping for the specified key.- Parameters:
key
- - key to check- Returns:
- true if this NCMap contains a mapping for the specified key.
-
put
Add a key/value pair to this map.- Parameters:
key
- the keyvalue
- the value- Returns:
- the NCMap
-
put
Add a key/value pair to this map.- Parameters:
key
- the keyvalue
- the value- Returns:
- the NCMap
-
put
Add a key/value pair to this map.- Parameters:
key
- the keyvalue
- the value- Returns:
- the NCMap
-
put
Add a key/value pair to this map.- Parameters:
key
- the keyvalue
- the value- Returns:
- the NCMap
-
put
Add a key/value pair to this map.- Parameters:
key
- the keyvalue
- the value- Returns:
- the NCMap
-
put
Add a key/value pair to this map.- Parameters:
key
- the keyvalue
- the value- Returns:
- the NCMap
-
put
Add a key/value pair to this map.- Parameters:
key
- the keyvalue
- the value- Returns:
- the NCMap
-
put
Add a key/value pair to this map.- Parameters:
key
- the keyvalue
- the value- Returns:
- the NCMap
-
put
Add a key/value pair to this map.- Parameters:
key
- the keyvalue
- the value- Returns:
- the NCMap
-
put
Add a key/value pair to this map.- Parameters:
key
- the keyvalue
- the value- Returns:
- the NCMap
-
put
Add a key/value pair to this map.- Parameters:
key
- the keyvalue
- the value- Returns:
- the NCMap
-
get
Returns the NCType object associated with the specified key. Returns null if the NCMap contains no entry for this key.- Parameters:
key
- key to retrieve- Returns:
- value associated with the specified key; null if the key has no value associated
-
get
Returns the NCType object associated with the specified key. Returns null if the NCMap contains no entry for this key.- Parameters:
key
- key to retrieve- Returns:
- value associated with the specified key; null if the key has no value associated
-
getString
Returns the String value associated with the specified key.- Parameters:
key
- the key String- Returns:
- String value
- Throws:
BadMessageException
- if the requested value is not present or of a bad type
-
getBool
Returns the boolean value associated with the specified key.- Parameters:
key
- the key String- Returns:
- boolean value
- Throws:
BadMessageException
- if the requested value is not present or of a bad type
-
getDouble
Returns the double value associated with the specified key.- Parameters:
key
- the key String- Returns:
- double value
- Throws:
BadMessageException
- if the requested value is not present or of a bad type
-
getInt
Returns the int value associated with the specified key.- Parameters:
key
- the key String- Returns:
- int value
- Throws:
BadMessageException
- if the requested value is not present or of a bad type
-
getLong
Returns the long value associated with the specified key.- Parameters:
key
- the key String- Returns:
- long value
- Throws:
BadMessageException
- if the requested value is not present or of a bad type
-
getDate
Returns the date value associated with the specified key.- Parameters:
key
- the key String- Returns:
- date value
- Throws:
BadMessageException
- if the requested value is not present or of a bad type
-
getByteArray
Returns the byte[] value associated with the specified key.- Parameters:
key
- the key String- Returns:
- byte[] value
- Throws:
BadMessageException
- if the requested value is not present or of a bad type
-
getBytes
Returns the ByteBuffer value associated with the specified key.- Parameters:
key
- the key String- Returns:
- ByteBuffer value
- Throws:
BadMessageException
- if the requested value is not present or of a bad type
-
getList
Returns the NCList value associated with the specified key.- Parameters:
key
- the key String- Returns:
- NCList value
- Throws:
BadMessageException
- if the requested value is not present or of a bad type
-
getMap
Returns the NCMap value associated with the specified key.- Parameters:
key
- the key String- Returns:
- NCMap value
- Throws:
BadMessageException
- if the associated value is not present or not of the correct type
-
remove
Removes the mapping for this key from thisNCMap
if it is present.- Parameters:
key
- key whose associatedNCType
object is to be removed- Returns:
- previous
NCType
object associated with the specified key, or null if there was no mapping for the key
-
remove
Removes the mapping for this key from thisNCMap
if it is present.- Parameters:
key
- key whose associatedNCType
object is to be removed- Returns:
- previous
NCType
object associated with the specified key, or null if there was no mapping for the key
-
clear
Removes all entries from this NCMapobject
.- Returns:
- the NCMap
-
getType
public int getType()Description copied from class:NCType
Returns the type of thisNCType
object. -
equals
Description copied from class:NCType
Force subclasses to implement. -
toString
Description copied from class:NCType
Force subclasses to implement. -
hashCode
public int hashCode()Description copied from class:NCType
Force subclasses to implement.
-