public class MapImpl extends Object implements SDTMapIF, SDTSerializable
| Constructor and Description |
|---|
MapImpl()
For Writable Maps
|
MapImpl(int capacity)
For Writable Maps
|
MapImpl(MapTLVBuffer buffer)
For Readable Maps
|
| Modifier and Type | Method and Description |
|---|---|
ByteArray |
asByteArray() |
void |
clear()
Removes all mappings from the map.
|
boolean |
containsKey(String key)
Returns true if this map contains a mapping with the specified key.
|
boolean |
containsValue(Object value)
Returns true if this map contains one or more mappings with the
specified value.
|
boolean |
equals(Object obj) |
Object |
get(String key)
Returns the value mapped to the specified case-sensitive key.
|
Boolean |
getBoolean(String key)
Returns the Boolean value mapped to the specified case-sensitive key.
|
Byte |
getByte(String key)
Returns the Byte value mapped to the specified case-sensitive key.
|
ByteArray |
getByteArray(String key) |
byte[] |
getBytes(String key)
Returns the byte[] value mapped to the specified case-sensitive key.
|
Character |
getCharacter(String key)
Returns the Character value mapped to the specified case-sensitive key.
|
Destination |
getDestination(String key)
Returns the Destination value mapped to the specified case-sensitive key.
|
Double |
getDouble(String key)
Returns the Double value mapped to the specified case-sensitive key.
|
Float |
getFloat(String key)
Returns the Float value mapped to the specified case-sensitive key.
|
Integer |
getInteger(String key)
Returns the Integer value mapped to the specified case-sensitive key.
|
Long |
getLong(String key)
Returns the Long value mapped to the specified case-sensitive key.
|
Map<String,Object> |
getMap() |
SDTMap |
getMap(String key)
Returns the SDTMap value mapped to the specified case-sensitive key.
|
RawSMFMessage |
getMessage(String key)
SolReserved - Returns the RawSMFMessage value mapped to the specified case-sensitive key.
|
Short |
getShort(String key)
Returns the Short value mapped to the specified case-sensitive key.
|
SDTStream |
getStream(String key)
Returns the SDTStream value mapped to the specified case-sensitive key.
|
String |
getString(String key)
Returns the String value mapped to the specified case-sensitive key.
|
long |
getVersion() |
int |
hashCode() |
void |
invalidateChangedBuffers() |
boolean |
isEmpty()
Returns true if there are no mappings.
|
Set<String> |
keySet()
Returns a Set of all the keys in the map.
|
void |
putAll(SDTMap map)
Copies the mappings from the given SDTMap and puts them in this SDTMap.
|
void |
putBigInteger(String key,
BigInteger value) |
void |
putBoolean(String key,
Boolean value)
Associates the specified case-sensitive key with the value in the map.
|
void |
putByte(String key,
Byte value)
Associates the specified case-sensitive key with the value in the map.
|
void |
putByteArray(String key,
ByteArray value) |
void |
putBytes(String key,
byte[] value)
Associates the specified case-sensitive key with the value in the map.
|
void |
putBytes(String key,
byte[] value,
int offset,
int length)
Associates the specified case-sensitive key with the value in the map.
|
void |
putCharacter(String key,
Character value)
Associates the specified case-sensitive key with the value in the map.
|
void |
putDestination(String key,
Destination value)
Associates the specified case-sensitive key with the value in the map.
|
void |
putDouble(String key,
Double value)
Associates the specified case-sensitive key with the value in the map.
|
void |
putFloat(String key,
Float value)
Associates the specified case-sensitive key with the value in the map.
|
void |
putInteger(String key,
Integer value)
Associates the specified case-sensitive key with the value in the map.
|
void |
putLong(String key,
Long value)
Associates the specified case-sensitive key with the value in the map.
|
void |
putMap(String key,
SDTMap value)
Associates the specified case-sensitive key with the value in the map.
|
void |
putMessage(String key,
RawSMFMessage value)
SolReserved - Associates the specified case-sensitive key with the value in the map.
|
void |
putObject(String key,
Object value)
Associates the specified case-sensitive key with the value in the map.
|
void |
putShort(String key,
Short value)
Associates the specified case-sensitive key with the value in the map.
|
void |
putStream(String key,
SDTStream value)
Associates the specified case-sensitive key with the value in the map.
|
void |
putString(String key,
String value)
Associates the specified case-sensitive key with the value in the map.
|
void |
putUnknownType(String key,
SDTUnknownType value) |
void |
remove(String key)
Removes the mapping for the specified key if present.
|
void |
serialize(TLVBuffer buffer) |
void |
setFormatter(Formatter fmter) |
int |
size()
Returns the number of mappings.
|
String |
toString() |
static SDTMap |
valueOf(Map<String,Object> map) |
Collection<Object> |
values()
Returns a collection of all the values in the map.
|
public MapImpl()
public MapImpl(int capacity)
public MapImpl(MapTLVBuffer buffer)
buffer - parameterpublic long getVersion()
public void setFormatter(Formatter fmter)
setFormatter in interface SDTMapIFpublic void invalidateChangedBuffers()
public void serialize(TLVBuffer buffer)
serialize in interface SDTSerializablepublic ByteArray asByteArray()
asByteArray in interface SDTMapIFpublic boolean containsKey(String key)
SDTMapcontainsKey in interface SDTMapkey - Mapping key to search for.public boolean containsValue(Object value)
SDTMapcontainsValue in interface SDTMapvalue - The mapping value to search for.public void remove(String key)
SDTMappublic void clear()
SDTMappublic Object get(String key) throws SDTException
SDTMapget in interface SDTMapkey - The case-sensitive key of the mapping value to return.SDTException - Thrown if an internal error occurs accessing the map.public Boolean getBoolean(String key) throws SDTException
SDTMapgetBoolean in interface SDTMapkey - The case-sensitive key of the mapping value to return.SDTException - Thrown if an internal error occurs accessing the map.SDTFormatException - If the conversion from the mapped type to Boolean is invalid.public Byte getByte(String key) throws SDTException
SDTMapgetByte in interface SDTMapkey - The case-sensitive key of the mapping value to return.SDTException - Thrown if an internal error occurs accessing the mapSDTFormatException - If the conversion from the mapped type to Byte is invalid.public byte[] getBytes(String key) throws SDTException
SDTMapgetBytes in interface SDTMapkey - The case-sensitive key of the mapping value to return.SDTException - Thrown if an internal error occurs accessing the map.SDTFormatException - If the conversion from the mapped type to byte[] is invalid.public ByteArray getByteArray(String key) throws SDTException
getByteArray in interface SDTMapSDTExceptionpublic Character getCharacter(String key) throws SDTException
SDTMapgetCharacter in interface SDTMapkey - The case-sensitive key of the mapping value to return.SDTException - Thrown if an internal error occurs accessing the map.SDTFormatException - If the conversion from the mapped type to Character is invalid.public Destination getDestination(String key) throws SDTException
SDTMapgetDestination in interface SDTMapkey - The case-sensitive key of the mapping value to return.SDTException - Thrown if an internal error occurs accessing the mapSDTFormatException - If the conversion from the mapped type to Destination is invalid.public Double getDouble(String key) throws SDTException
SDTMapgetDouble in interface SDTMapkey - The case-sensitive key of the mapping value to return.SDTException - Thrown if an internal error occurs accessing the map.SDTFormatException - If the conversion from the mapped type to Double is invalid.public Float getFloat(String key) throws SDTException
SDTMapgetFloat in interface SDTMapkey - The case-sensitive key of the mapping value to return.SDTException - Thrown if an internal error occurs accessing the mapSDTFormatException - If the conversion from the mapped type to Float is invalid.public Integer getInteger(String key) throws SDTException
SDTMapgetInteger in interface SDTMapkey - The case-sensitive key of the mapping value to return.SDTException - Thrown if an internal error occurs accessing the map.SDTFormatException - If the conversion from the mapped type to Integer is invalid.public Long getLong(String key) throws SDTException
SDTMapgetLong in interface SDTMapkey - The case-sensitive key of the mapping value to return.SDTException - Thrown if an internal error occurs accessing the map.SDTFormatException - If the conversion from the mapped type to Long is invalid.public SDTMap getMap(String key) throws SDTException
SDTMapThe returned SDTMap is backed by this SDTMap, so changes to it will modify the SDTMap.
getMap in interface SDTMapkey - The case-sensitive key of the mapping value to return.SDTException - Thrown if an internal error occurs accessing the map.SDTFormatException - If the conversion from the mapped type to a SDTMap is invalid.public RawSMFMessage getMessage(String key) throws SDTException
SDTMapgetMessage in interface SDTMapkey - The case-sensitive key of the mapping value to return.SDTException - Thrown if an internal error occurs accessing the map.SDTFormatException - If the conversion from the mapped type to a RawSMFMessage is invalid.public Short getShort(String key) throws SDTException
SDTMapgetShort in interface SDTMapkey - The case-sensitive key of the mapping value to return.SDTException - Thrown if an internal error occurs accessing the map.SDTFormatException - If the conversion from the mapped type to Short is invalid.public SDTStream getStream(String key) throws SDTException
SDTMapThe returned SDTStream is backed by the SDTMap, so changes to it will modify the SDTMap.
getStream in interface SDTMapkey - The case-sensitive key of the mapping value to return.SDTException - Thrown if an internal error occurs accessing the map.SDTFormatException - If the conversion from the mapped type to a SDTStream is invalid.public String getString(String key) throws SDTException
SDTMapgetString in interface SDTMapkey - The case-sensitive key of the mapping value to return.SDTException - Thrown if an internal error occurs accessing the map.SDTFormatException - If the conversion from the mapped type to String is invalid.public boolean isEmpty()
SDTMappublic Set<String> keySet()
SDTMappublic void putAll(SDTMap map) throws SDTException
SDTMapputAll in interface SDTMapmap - SDTMap with the mappings to add.SDTException - Thrown if an internal error occurs accessing the map.public void putBigInteger(String key, BigInteger value)
public void putBoolean(String key, Boolean value)
SDTMapputBoolean in interface SDTMapkey - The case-sensitive key that the value is associated with.value - The value to associate with the specified key.public void putByte(String key, Byte value)
SDTMappublic void putBytes(String key, byte[] value)
SDTMappublic void putBytes(String key, byte[] value, int offset, int length)
SDTMappublic void putByteArray(String key, ByteArray value)
putByteArray in interface SDTMappublic void putCharacter(String key, Character value)
SDTMapputCharacter in interface SDTMapkey - The case-sensitive key that the value is associated with.value - The value to associate with the specified key.public void putDestination(String key, Destination value)
SDTMapputDestination in interface SDTMapkey - The case-sensitive key that the value is associated with.value - The value to associate with the specified key.public void putDouble(String key, Double value)
SDTMappublic void putFloat(String key, Float value)
SDTMappublic void putInteger(String key, Integer value)
SDTMapputInteger in interface SDTMapkey - The case-sensitive key that the value is associated with.value - The value to associate with the specified key.public void putLong(String key, Long value)
SDTMappublic void putMap(String key, SDTMap value)
SDTMappublic void putMessage(String key, RawSMFMessage value)
SDTMapputMessage in interface SDTMapkey - The case-sensitive key that the value is associated with.value - The value to associate with the specified key.public void putUnknownType(String key, SDTUnknownType value)
public void putObject(String key, Object value)
SDTMappublic void putShort(String key, Short value)
SDTMappublic void putStream(String key, SDTStream value)
SDTMappublic void putString(String key, String value)
SDTMappublic int size()
SDTMappublic Collection<Object> values()
SDTMapCopyright 2004-2020 Solace Corporation. All rights reserved.