public final class NCMap extends NCType
NCType
keys to NCType
objects.
Note that this class is **NOT** Thread-safe in its current form.TYPE_BOOLEAN, TYPE_BYTEBUFFER, TYPE_DATE, TYPE_DOUBLE, TYPE_INTEGER, TYPE_LIST, TYPE_LONG, TYPE_MAP, TYPE_NULL, TYPE_STRING
Constructor and Description |
---|
NCMap()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
NCMap |
clear()
Removes all entries from this NCMap
object . |
boolean |
containsKey(NCType key)
Returns true if this NCMap contains a mapping for the specified key.
|
boolean |
containsKey(java.lang.String key)
Returns true if this NCMap contains a mapping for the specified key.
|
java.util.Iterator<java.util.Map.Entry<NCType,NCType>> |
entries()
Returns an iterator over the mappings in this IDicitonary.
|
java.util.Set<java.util.Map.Entry<NCType,NCType>> |
entrySet()
Returns a set of Map.Entry objects.
|
boolean |
equals(java.lang.Object other)
Force subclasses to implement.
|
NCType |
get(NCType key)
Returns the NCType object associated with the specified key.
|
NCType |
get(java.lang.String key)
Returns the NCType object associated with the specified key.
|
boolean |
getBool(java.lang.String key)
Returns the boolean value associated with the specified key.
|
byte[] |
getByteArray(java.lang.String key)
Returns the byte[] value associated with the specified key.
|
java.nio.ByteBuffer |
getBytes(java.lang.String key)
Returns the ByteBuffer value associated with the specified key.
|
java.util.Date |
getDate(java.lang.String key)
Returns the date value associated with the specified key.
|
double |
getDouble(java.lang.String key)
Returns the double value associated with the specified key.
|
int |
getInt(java.lang.String key)
Returns the int value associated with the specified key.
|
NCList |
getList(java.lang.String key)
Returns the NCList value associated with the specified key.
|
long |
getLong(java.lang.String key)
Returns the long value associated with the specified key.
|
NCMap |
getMap(java.lang.String key)
Returns the NCMap value associated with the specified key.
|
java.lang.String |
getString(java.lang.String key)
Returns the String value associated with the specified key.
|
int |
getType()
Returns the type of this
NCType object. |
int |
hashCode()
Force subclasses to implement.
|
boolean |
isEmtpy()
Returns true if the NCMap is empty
|
NCMap |
put(NCType key,
NCType value)
Add a key/value pair to this map.
|
NCMap |
put(java.lang.String key,
boolean value)
Add a key/value pair to this map.
|
NCMap |
put(java.lang.String key,
byte[] value)
Add a key/value pair to this map.
|
NCMap |
put(java.lang.String key,
java.nio.ByteBuffer value)
Add a key/value pair to this map.
|
NCMap |
put(java.lang.String key,
java.util.Date value)
Add a key/value pair to this map.
|
NCMap |
put(java.lang.String key,
double value)
Add a key/value pair to this map.
|
NCMap |
put(java.lang.String key,
INCExternalizable value)
Add a key/value pair to this map.
|
NCMap |
put(java.lang.String key,
int value)
Add a key/value pair to this map.
|
NCMap |
put(java.lang.String key,
long value)
Add a key/value pair to this map.
|
NCMap |
put(java.lang.String key,
NCType value)
Add a key/value pair to this map.
|
NCMap |
put(java.lang.String key,
java.lang.String value)
Add a key/value pair to this map.
|
NCType |
remove(NCType key)
Removes the mapping for this key from this
NCMap if it is present. |
NCType |
remove(java.lang.String key)
Removes the mapping for this key from this
NCMap if it is present. |
int |
size()
Returns the number of entries in the NCMap.
|
java.lang.String |
toString()
Force subclasses to implement.
|
externalize
public int size()
public boolean isEmtpy()
public java.util.Iterator<java.util.Map.Entry<NCType,NCType>> entries()
Iterator
containing
java.util.Map.Entry
Objectspublic java.util.Set<java.util.Map.Entry<NCType,NCType>> entrySet()
public boolean containsKey(NCType key)
key
- - key to checkpublic boolean containsKey(java.lang.String key)
key
- - key to checkpublic NCMap put(NCType key, NCType value)
key
- the keyvalue
- the valuepublic NCMap put(java.lang.String key, NCType value)
key
- the keyvalue
- the valuepublic NCMap put(java.lang.String key, INCExternalizable value)
key
- the keyvalue
- the valuepublic NCMap put(java.lang.String key, java.lang.String value)
key
- the keyvalue
- the valuepublic NCMap put(java.lang.String key, boolean value)
key
- the keyvalue
- the valuepublic NCMap put(java.lang.String key, int value)
key
- the keyvalue
- the valuepublic NCMap put(java.lang.String key, long value)
key
- the keyvalue
- the valuepublic NCMap put(java.lang.String key, double value)
key
- the keyvalue
- the valuepublic NCMap put(java.lang.String key, java.util.Date value)
key
- the keyvalue
- the valuepublic NCMap put(java.lang.String key, byte[] value)
key
- the keyvalue
- the valuepublic NCMap put(java.lang.String key, java.nio.ByteBuffer value)
key
- the keyvalue
- the valuepublic NCType get(NCType key)
key
- key to retrievepublic NCType get(java.lang.String key)
key
- key to retrievepublic java.lang.String getString(java.lang.String key) throws BadMessageException
key
- the key StringBadMessageException
- if the requested value is not present or of a bad typepublic boolean getBool(java.lang.String key) throws BadMessageException
key
- the key StringBadMessageException
- if the requested value is not present or of a bad typepublic double getDouble(java.lang.String key) throws BadMessageException
key
- the key StringBadMessageException
- if the requested value is not present or of a bad typepublic int getInt(java.lang.String key) throws BadMessageException
key
- the key StringBadMessageException
- if the requested value is not present or of a bad typepublic long getLong(java.lang.String key) throws BadMessageException
key
- the key StringBadMessageException
- if the requested value is not present or of a bad typepublic java.util.Date getDate(java.lang.String key) throws BadMessageException
key
- the key StringBadMessageException
- if the requested value is not present or of a bad typepublic byte[] getByteArray(java.lang.String key) throws BadMessageException
key
- the key StringBadMessageException
- if the requested value is not present or of a bad typepublic java.nio.ByteBuffer getBytes(java.lang.String key) throws BadMessageException
key
- the key StringBadMessageException
- if the requested value is not present or of a bad typepublic NCList getList(java.lang.String key) throws BadMessageException
key
- the key StringBadMessageException
- if the requested value is not present or of a bad typepublic NCMap getMap(java.lang.String key) throws BadMessageException
key
- the key StringBadMessageException
- if the associated value is not present or not of the correct
typepublic NCType remove(NCType key)
NCMap
if it is present.key
- key whose associated NCType
object is to be removedNCType
object associated with the specified
key, or null if there was no mapping for the keypublic NCType remove(java.lang.String key)
NCMap
if it is present.key
- key whose associated NCType
object is to be removedNCType
object associated with the specified
key, or null if there was no mapping for the keypublic NCMap clear()
object
.public int getType()
NCType
NCType
object.public boolean equals(java.lang.Object other)
NCType
public java.lang.String toString()
NCType
Copyright © 2010 - 2020 Adobe. All Rights Reserved