public class ListField extends DCField
Modifier and Type | Field and Description |
---|---|
static int |
LENGTH |
Constructor and Description |
---|
ListField() |
ListField(FieldKey key) |
ListField(FieldKey key,
byte[] val) |
ListField(int id,
byte[] val)
Deprecated.
|
ListField(int id,
java.util.Collection fields)
Deprecated.
|
ListField(java.lang.String id,
byte[] val)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addField(DCField field) |
void |
addFields(java.util.Collection fieldList) |
void |
appendList(ListField list) |
void |
clear() |
DCField |
firstField() |
byte[] |
getBytesValue() |
DCField |
getField(int index)
Returns the field at the specified position in this list.
|
int |
getLength() |
java.util.List |
getList()
Return the fields in the ListField as a List.
|
java.lang.String |
getStringValue() |
int |
getType() |
boolean |
isEmpty() |
java.util.Iterator |
iterator() |
DCField |
lastField() |
void |
removeField(DCField field) |
void |
removeField(int index) |
void |
removeField(java.lang.String key) |
void |
setValue(byte[] newVal)
Sets the value of this DCField to what is contained in
valueBytes |
void |
setValue(java.util.Collection fields) |
int |
size() |
java.lang.String |
toString() |
void |
updateBytes() |
clone, create, dup, equals, equalsValue, getBytes, getByteValue, getDateValue, getDCField, getDCField, getDCField, getDoubleValue, getFloatValue, getID, getIntValue, getKey, getLongValue, getShortValue, getStaticAttrLength, init, init, init, isVarLength, makeAttrfromBytes, makeAttrfromBytes, makeAttrfromBytes, makeAttrfromBytes, makeAttrfromStream, readValueFromStream, setID, setID, setKey, setType, writeValueToStream
public static final int LENGTH
public ListField()
public ListField(FieldKey key, byte[] val)
public ListField(FieldKey key)
public ListField(java.lang.String id, byte[] val)
public ListField(int id, java.util.Collection fields)
public ListField(int id, byte[] val)
public void addField(DCField field)
public void removeField(DCField field)
public void removeField(java.lang.String key)
public void removeField(int index)
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 addFields(java.util.Collection fieldList)
public void updateBytes()
public int getType()
public byte[] getBytesValue() throws java.lang.ClassCastException
getBytesValue
in class DCField
java.lang.ClassCastException
public java.lang.String getStringValue()
getStringValue
in class DCField
public int size()
public void setValue(java.util.Collection fields)
public DCField lastField()
public DCField firstField()
public DCField getField(int index)
index
- index of element to return.public void clear()
public void appendList(ListField list)
public java.util.Iterator iterator()
public int getLength()
public java.util.List getList()