|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector<KElement>
org.cip4.jdflib.core.VElement
public class VElement
| Field Summary |
|---|
| Fields inherited from class java.util.Vector |
|---|
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
VElement()
constructor |
|
VElement(NodeList n)
constructor |
|
VElement(Vector m)
constructor |
|
| Method Summary | ||
|---|---|---|
|
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 e,
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 |
|
| Methods inherited from class java.util.Vector |
|---|
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elements, ensureCapacity, equals, firstElement, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
iterator, listIterator, listIterator |
| Constructor Detail |
|---|
public VElement()
public VElement(Vector m)
m - public VElement(NodeList n)
n - | Method Detail |
|---|
public String toString()
toString in class Vector<KElement>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 for
public boolean isEqual(VElement v)
v - the vector to compare
public void appendUnique(VElement v)
v - the vector of elements to appendpublic void appendUniqueElement(VElement v)
v - the vector of elements to append
public void setAttributes(String key,
Vector<String> vValue,
String nameSpaceURI)
key - key the attribute namevValue - vValue the vector of valuesnameSpaceURI - nameSpace of the attribute to set
IllegalArgumentException - 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 set
public void removeAttribute(String key,
String nameSpaceURI)
key - key the attribute namenameSpaceURI - nameSpace of the attribute to setpublic void removeElements(VElement v)
v - elements to remove
public void removeElements(KElement e,
int nMax)
e - the element to removenMax - maximum number of dulicate elements to removepublic VString getElementNameVector(boolean bLocal)
bLocal - if true use getLocalName() else getNodeName() o each item
public 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 in
public KElement elementAt(int index)
elementAt in class Vector<KElement>index - vector index of the element you want
public KElement get(int index)
get in interface List<KElement>get in class Vector<KElement>index - vector index of the element you want
public KElement item(int index)
index - vector index of the element you want
public void unify()
public void unifyElement()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||