public class VElement extends Vector<KElement>
capacityIncrement, elementCount, elementData
modCount
Constructor and Description |
---|
VElement()
constructor
|
VElement(NodeList n)
constructor
|
VElement(Vector m)
constructor
|
Modifier and Type | Method and Description |
---|---|
<a extends KElement> |
addAll(a[] l)
create a all elements of an Array
|
void |
addAll(VElement elem)
addAll ignoring null collections
|
void |
appendUnique(KElement elem)
AppendUnique - append a string but ignore multiple entries
|
void |
appendUnique(VElement v)
AppendUnique - append a vector but ignore multiple entries - equivalence is calculated with .equals
|
void |
appendUniqueElement(VElement v)
AppendUnique - append a vector but ignore multiple entries - equivalence is calculated with isEqual,
|
void |
appendUniqueNotNull(KElement v)
Deprecated.
simply use appendUnique
|
void |
appendUniqueNotNull(VElement v)
Deprecated.
simply use appendUnique
|
boolean |
containsElement(KElement elem)
does this contain an equivalent element similar to contains but uses isEqual() instead of equals()
|
KElement |
elementAt(int index)
item - returns null if index is out of bounds or the requested item is not an ELEMENT_NODE !
|
KElement |
get(int index)
item - returns null if index is out of bounds or the requested item is not an ELEMENT_NODE !
|
VString |
getElementNameVector(boolean bLocal)
get the node names of this vector in the same order
|
boolean |
hasElement(KElement kElem)
Deprecated.
060216 use containsElement
|
int |
index(KElement s)
index - get the index of s in the vector using isEquals or ID rather than equals
|
boolean |
isEqual(VElement v)
are the two vectors equivalent, i.e. do thay only contain elements that are isEqual() or if this is empty and the comparison is against null
|
KElement |
item(int index)
item - returns null if index is out of bounds or the requested item is not an ELEMENT_NODE !
|
void |
removeAttribute(String key,
String nameSpaceURI)
Remove Attribute in all elements of this
|
void |
removeElements(KElement testElem,
int nMax)
RemoveElements
|
void |
removeElements(VElement v)
Remove elements listed in v from this
|
void |
setAttribute(String key,
String value,
String nameSpaceURI)
SetAttribute in all elements of this
|
void |
setAttributes(String key,
Vector<String> vValue,
String nameSpaceURI)
set the values of attribute key to the values defined in vValue
|
void |
sort()
sorts the vector in canonical order using SimpleNodeComparator
|
String |
toString()
toString
|
VElement |
toVector(String element,
JDFAttributeMap mAttrib,
boolean bAnd,
String nameSpaceURI)
ToVector - parse a node list for elements spezified through parameters note that the vector is static - i.e. the elements are NOT modified by operations
to the nodeList.
|
void |
unify()
unify - make VElement unique, retaining initial order
|
void |
unifyElement()
unify - make VElement unique, retaining initial order uses containsElement, not contains
|
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elements, ensureCapacity, equals, firstElement, forEach, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, trimToSize
finalize, getClass, notify, notifyAll, wait, wait, wait
parallelStream, stream
public VElement()
public VElement(Vector m)
m
- public VElement(NodeList n)
n
- public String toString()
public int index(KElement s)
s
- KElement to search for@Deprecated public boolean hasElement(KElement kElem)
kElem
- the element to look for@Deprecated public void appendUniqueNotNull(KElement v)
v
- @Deprecated public void appendUniqueNotNull(VElement v)
v
- public void appendUnique(KElement elem)
elem
- the element to appendpublic void addAll(VElement elem)
elem
- the vector of elements to appendpublic <a extends KElement> void addAll(a[] l)
a
- l
- public boolean containsElement(KElement elem)
elem
- the element to look forpublic boolean isEqual(VElement v)
v
- the vector to comparepublic void appendUnique(VElement v)
v
- the vector of elements to appendpublic void appendUniqueElement(VElement v)
v
- the vector of elements to appendpublic void setAttributes(String key, Vector<String> vValue, String nameSpaceURI)
key
- key the attribute namevValue
- vValue the vector of valuesnameSpaceURI
- nameSpace of the attribute to setIllegalArgumentException
- if size mismatch of vValue anf thispublic void sort()
public void setAttribute(String key, String value, String nameSpaceURI)
key
- key the attribute namevalue
- the valuenameSpaceURI
- nameSpace of the attribute to setpublic void removeAttribute(String key, String nameSpaceURI)
key
- key the attribute namenameSpaceURI
- nameSpace of the attribute to setpublic void removeElements(VElement v)
v
- elements to removepublic void removeElements(KElement testElem, int nMax)
testElem
- the element to removenMax
- maximum number of dulicate elements to removepublic VString getElementNameVector(boolean bLocal)
bLocal
- if true use getLocalName() else getNodeName() o each itempublic VElement toVector(String element, JDFAttributeMap mAttrib, boolean bAnd, String nameSpaceURI)
element
- name of the element typ you wantmAttrib
- a attribute typ you wantbAnd
- true, if you want to add the element if mAttrib was found in the elementnameSpaceURI
- the namespace to search inpublic KElement elementAt(int index)
public KElement get(int index)
public KElement item(int index)
index
- vector index of the element you wantpublic void unify()
public void unifyElement()
Copyright © 2018. All rights reserved.