public class XMLEntity extends SimpleKeyValueList<java.lang.String,java.lang.Object> implements Entity, EntityList
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
END |
static java.lang.String |
PROPERTY_TAG
Constant of TAG.
|
static java.lang.String |
PROPERTY_VALUE
Constant of VALUE.
|
static java.lang.String |
START |
ALLOWDUPLICATE, ALLOWEMPTYVALUE, BIDI, CASESENSITIVE, flag, MAP, READONLY, REMOVED, VISIBLE| Constructor and Description |
|---|
XMLEntity()
Simple Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(java.lang.Object... values)
Adds the child.
|
XMLEntity |
createChild()
Method to create a new Child and add it to Children
|
EntityList |
getChild(int index)
Gets the children.
|
Entity |
getElementBy(java.lang.String key,
java.lang.String value)
Return first Children with Filter
|
EntityList |
getElementsBy(java.lang.String key,
java.lang.String value)
Return first Children with Filter
|
MapEntry |
getNewEntity() |
XMLEntity |
getNewList(boolean keyValue) |
java.lang.String |
getTag()
Gets the tag.
|
java.lang.String |
getValue()
Gets the value.
|
boolean |
has(java.lang.String key)
check if Entity has the Key
|
protected java.lang.String |
parseItem(EntityStringConverter converter) |
XMLEntity |
setType(java.lang.String value)
Sets the tag.
|
int |
sizeChildren() |
static XMLEntity |
TAG(java.lang.String tag)
Static Method to generate XMLEntity.
|
java.lang.String |
toString()
Convert Element to String
|
java.lang.String |
toString(int indentFactor)
Make a prettyprinted Text of this Entity.
|
protected void |
toStringChildren(CharacterBuffer sb,
EntityStringConverter converter)
Add The Children to StringBuilder.
|
XMLEntity |
withChild(EntityList value)
Method to add a new Child to List.
|
XMLEntity |
withCloseTag() |
XMLEntity |
withKeyValue(java.lang.Object key,
java.lang.Object value) |
XMLEntity |
without(java.lang.String key) |
XMLEntity |
withValue(Buffer values) |
XMLEntity |
withValue(java.lang.String value)
Instantiates a new XMLEntity.
|
XMLEntity |
withValue(Tokener tokener)
Construct a XMLEntity from a Tokener.
|
XMLEntity |
withValueItem(java.lang.String value) |
add, add, addToKeyValue, comparator, containsKey, containsValue, copyEntity, entrySet, equals, get, getBoolean, getDouble, getInt, getKey, getKeyByIndex, getLong, getPositionValue, getString, getString, getValueByIndex, increment, indexOfValue, isComparator, iterator, keyIterator, keySet, put, putAll, remove, removeByIndex, removePos, replaceAllValues, setValue, setValueItem, values, valuesArrayIntern, with, withComparator, withKeyValueString, withList, withMap, withMultIndexaddHashItem, addKeyValue, checkValue, clear, contains, containsAll, containsAll, fireProperty, first, flag, get, getByIndex, getPositionKey, getTypClass, getValue, hashKey, hasKeyAndPos, indexOf, init, init, init, isAllowDuplicate, isAllowEmptyValue, isCaseSensitive, isEmpty, isReadOnly, isVisible, last, lastIndexOf, move, pack, removeAll, removeByObject, removeItem, reset, retainAll, setAllowEmptyValue, setFlag, setValue, size, subList, toArray, toArray, toString, with, withAllowDuplicate, withAllowEmptyValue, withCaseSensitive, withFlag, without, withSize, withType, withVisibleclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetKeyByIndex, getString, getValue, put, setAllowEmptyValuecomparator, isComparatorpublic static final java.lang.String PROPERTY_TAG
public static final java.lang.String PROPERTY_VALUE
public static final java.lang.String START
public static final java.lang.String END
public XMLEntity withValue(java.lang.String value)
value - the tagpublic XMLEntity withValue(Tokener tokener)
tokener - A Tokener object containing the source string. or a duplicated key.public EntityList getChild(int index)
getChild in interface EntityListindex - the Index of Childpublic int sizeChildren()
sizeChildren in interface EntityListpublic boolean add(java.lang.Object... values)
add in interface BaseItemadd in class SimpleKeyValueList<java.lang.String,java.lang.Object>values - the childpublic XMLEntity withChild(EntityList value)
value - the new Childpublic XMLEntity createChild()
public java.lang.String getTag()
public java.lang.String getValue()
public java.lang.String toString()
BaseItemtoString in interface BaseItemtoString in class AbstractArray<java.lang.String>public java.lang.String toString(int indentFactor)
EntityWarning: This method assumes that the data structure is acyclical.
toString in interface EntitytoString in interface EntityListindentFactor - The number of spaces to add to each level of indentation.{ (left
brace) and ending with } (right
brace).protected java.lang.String parseItem(EntityStringConverter converter)
parseItem in class AbstractArray<java.lang.String>protected void toStringChildren(CharacterBuffer sb, EntityStringConverter converter)
sb - The StringBuilder where The Children addconverter - The Current Converterpublic XMLEntity withCloseTag()
public MapEntry getNewEntity()
public XMLEntity getNewList(boolean keyValue)
getNewList in interface BaseItemgetNewList in class SimpleKeyValueList<java.lang.String,java.lang.Object>public static XMLEntity TAG(java.lang.String tag)
tag - The namepublic XMLEntity withKeyValue(java.lang.Object key, java.lang.Object value)
withKeyValue in class SimpleKeyValueList<java.lang.String,java.lang.Object>public boolean has(java.lang.String key)
Entitypublic XMLEntity withValue(Buffer values)
withValue in interface EntitywithValue in interface EntityListpublic XMLEntity setType(java.lang.String value)
public Entity getElementBy(java.lang.String key, java.lang.String value)
getElementBy in interface Entitykey - The key of Filtervalue - The Value of Filterpublic EntityList getElementsBy(java.lang.String key, java.lang.String value)
key - The key of Filtervalue - The Value of Filterpublic XMLEntity withValueItem(java.lang.String value)