public class MapField extends DCField implements java.io.Externalizable
Modifier and Type | Field and Description |
---|---|
static int |
LENGTH |
Constructor and Description |
---|
MapField() |
MapField(FieldKey key) |
MapField(FieldKey key,
byte[] val) |
MapField(FieldKey id,
java.util.Collection fields) |
MapField(int id,
byte[] val)
Deprecated.
|
MapField(java.lang.String id,
byte[] val)
Deprecated.
|
MapField(java.lang.String id,
java.util.Collection fields)
Deprecated.
Use new MapField(FieldKey,Collection)
|
Modifier and Type | Method and Description |
---|---|
void |
addField(DCField field) |
void |
addFields(java.util.Collection fieldList) |
java.util.Map |
getFieldMap() |
java.util.Map |
getMap()
Deprecated.
Use getFieldMap. CAUTION: Keys of getFieldMap are FieldKey
objects instead of String objects.
|
java.lang.String |
getStringValue() |
int |
getType() |
java.util.Iterator |
iterator() |
void |
readExternal(java.io.ObjectInput obj_in) |
void |
removeField(DCField field) |
void |
removeField(java.lang.String key) |
void |
setValue(byte[] newVal)
Sets the value of this DCField to what is contained in
valueBytes |
void |
writeExternal(java.io.ObjectOutput obj_out) |
clone, create, dup, equals, equalsValue, getBytes, getBytesValue, getByteValue, getDateValue, getDCField, getDCField, getDCField, getDoubleValue, getFloatValue, getID, getIntValue, getKey, getLength, getLongValue, getShortValue, getStaticAttrLength, init, init, init, isEmpty, isVarLength, makeAttrfromBytes, makeAttrfromBytes, makeAttrfromBytes, makeAttrfromBytes, makeAttrfromStream, readValueFromStream, setID, setID, setKey, setType, toString, writeValueToStream
public static final int LENGTH
public MapField()
public MapField(FieldKey key)
public MapField(FieldKey id, java.util.Collection fields)
public MapField(FieldKey key, byte[] val)
public MapField(java.lang.String id, java.util.Collection fields)
public MapField(int id, byte[] val)
public MapField(java.lang.String id, byte[] val)
public void setValue(byte[] newVal) throws NDKException
DCField
valueBytes
NOTE: Caveat Machinator (Engineer beware)
At this time, there is no validation of the byte array passed
in to this method. The developer should ensure that the bytes
used to create this DCField object are appropriate for the
specific data type. For example, a byte[] consisting of 7 bytes
should not be used to create an IntField object.
setValue
in class DCField
NDKException
public void removeField(DCField field)
public void removeField(java.lang.String key)
public void addField(DCField field)
public void addFields(java.util.Collection fieldList)
fieldList
- Collection of DCField objects to add to mappublic java.util.Map getFieldMap()
public java.util.Map getMap()
public int getType()
public java.lang.String getStringValue()
getStringValue
in class DCField
public java.util.Iterator iterator()
public void readExternal(java.io.ObjectInput obj_in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput obj_out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException