public class FlexiMinXML extends AbsFlexiMinXML
attributes, children, name| Constructor and Description |
|---|
FlexiMinXML(@NonNull java.lang.String name)
Constructs an element with a given name but no attributes or
children.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
static @NonNull FlexiMinXML |
deepCopy(@NonNull MinXML element) |
java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.String>> |
entries()
Returns a iterator over the attributes of an element, as if the
attributes were implemented as a
Map, which shares updates
with the original element (when updates are allowed). |
static MinXML |
fromString(java.lang.String input) |
java.lang.String |
getAttribute(java.lang.String key)
Gets the attribute value associated with a given key.
|
boolean |
hasAttribute()
Returns true if the element has any attributes, otherwise false.
|
boolean |
hasAttribute(java.lang.String key)
Returns true if the element has an attribute with the given key.
|
boolean |
hasAttribute(java.lang.String key,
java.lang.String value)
Returns true if the element has an attribute with the given key
whose value is equal to the given value.
|
boolean |
hasntAttribute()
Returns true if the element has no attributes, otherwise false.
|
int |
indexOf(java.lang.Object o) |
boolean |
isEmpty() |
boolean |
isntEmpty()
Returns true if the element has no children.
|
java.util.Iterator<MinXML> |
iterator() |
java.lang.Iterable<java.lang.String> |
keys()
Returns a iterator for the set of keys of the attributes of an element, as if the
attributes were implemented as a
Map, which shares updates
with the original element (when updates are allowed). |
int |
lastIndexOf(java.lang.Object o) |
static @NonNull FlexiMinXML |
shallowCopy(@NonNull MinXML element)
Creates a copy of the top-level node of the given element.
|
int |
size() |
int |
sizeAttributes()
Returns the number of attributes of the element.
|
void |
trimToSize()
This method signals that there will be no further updates to an element, at least for a while,
and the implementation should consider this a good opportunity to compact the space used
by this element and all child elements, including any shared elements.
|
asMap, getName, quickGetAttributes, setName, toListadd, add, addAll, addAll, asMapEntries, asMapKeys, clearAttributes, deepCopy, equals, get, getAttribute, getAttributes, hashCode, hasName, listIterator, listIterator, prettyPrint, prettyPrint, print, print, putAllAttributes, putAttribute, remove, remove, removeAll, retainAll, set, shallowCopy, subList, toArray, toArray, toStringpublic FlexiMinXML(@NonNull java.lang.String name)
name - the name of the elementpublic static MinXML fromString(java.lang.String input)
public static @NonNull FlexiMinXML shallowCopy(@NonNull MinXML element)
element - the element to copypublic static @NonNull FlexiMinXML deepCopy(@NonNull MinXML element)
public void trimToSize()
MinXMLIllegalStateException.trimToSize in interface MinXMLtrimToSize in class AbsMinXMLpublic java.lang.String getAttribute(java.lang.String key)
MinXMLgetAttribute in interface MinXMLgetAttribute in class AbsMinXMLkey - the attribute key being looked uppublic boolean hasAttribute()
MinXMLhasAttribute in interface MinXMLhasAttribute in class AbsMinXMLpublic boolean hasAttribute(java.lang.String key)
MinXMLhasAttribute in interface MinXMLhasAttribute in class AbsMinXMLkey - the attribute keypublic boolean hasAttribute(java.lang.String key,
java.lang.String value)
MinXMLhasAttribute in interface MinXMLhasAttribute in class AbsMinXMLkey - attribute being checkedvalue - value being checkedpublic boolean hasntAttribute()
MinXMLhasntAttribute in interface MinXMLhasntAttribute in class AbsMinXMLpublic java.lang.Iterable<java.lang.String> keys()
MinXMLMap, which shares updates
with the original element (when updates are allowed). If you want
updates to be shared use asMapKeys.public int sizeAttributes()
MinXMLRuntimeException must
be raised.sizeAttributes in interface MinXMLsizeAttributes in class AbsMinXMLpublic java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.String>> entries()
MinXMLMap, which shares updates
with the original element (when updates are allowed). If you want
updates to be shared use asMapEntries.public void clear()
public boolean contains(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<MinXML>containsAll in interface java.util.List<MinXML>containsAll in class AbsMinXMLpublic int indexOf(java.lang.Object o)
public boolean isEmpty()
public java.util.Iterator<MinXML> iterator()
public int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.List<MinXML>lastIndexOf in class AbsMinXMLpublic int size()