|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.planx.xpath.expr.Expression
org.planx.xpath.object.XObject
org.planx.xpath.object.XNodeSet
public class XNodeSet
A node set returned by an XPath expression.
Note: This class is not synchronized.
The terms "set" and "list" are used interchangably in this
class, since semantically it should be a set but this is not
inforced due to performance considerations. In fact it is a
list. However, the XPath implementation garuantees that only
XNodeSets without duplicates are returned.
| Constructor Summary | |
|---|---|
XNodeSet()
Creates an empty node set. |
|
XNodeSet(Collection c)
Creates a node set containing all elements in the specified collection. |
|
XNodeSet(int initialCapacity)
Creates an empty node set with the specified initial capacity. |
|
| Method Summary | |
|---|---|
void |
add(int index,
Object element)
Inserts the specified element at the specified position in this list. |
boolean |
add(Object o)
Appends the specified element. |
boolean |
addAll(Collection c)
Appends all of the elements in the specified collection. |
boolean |
addAll(int index,
Collection c)
Inserts all of the elements in the specified collection at the specified position. |
boolean |
booleanValue()
Returns true if this node set
contains any elements. |
void |
clear()
Removes all of the elements from this set. |
boolean |
contains(Object o)
Returns true if this set contains the specified element. |
boolean |
containsAll(Collection c)
Returns true if this set contains all of the elements of the specified collection. |
boolean |
equals(Object o)
Compares the specified object with this set for equality. |
Object |
get(int index)
Returns the element at the specified position in this list. |
int |
hashCode()
Returns the hash code value for this set. |
int |
indexOf(Object o)
Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element. |
boolean |
isEmpty()
Returns true if this set contains no elements. |
Iterator |
iterator()
Returns an iterator over the elements in this set. |
int |
lastIndexOf(Object o)
Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element. |
ListIterator |
listIterator()
Returns a list iterator of the elements in this list. |
ListIterator |
listIterator(int index)
Returns a list iterator of the elements in this list, starting at the specified position in this list. |
Object |
remove(int index)
Removes the element at the specified position in this list. |
boolean |
remove(Object o)
Removes the specified element from this set if it is present. |
boolean |
removeAll(Collection c)
Removes from this set all of its elements that are contained in the specified collection. |
boolean |
retainAll(Collection c)
Retains only the elements in this set that are contained in the specified collection. |
Object |
set(int index,
Object element)
Replaces the element at the specified position in this list with the specified element. |
int |
size()
Returns the number of elements in this set. |
List |
subList(int fromIndex,
int toIndex)
Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive. |
Object[] |
toArray()
Returns an array containing all of the elements in this set. |
Object[] |
toArray(Object[] a)
Returns an array containing all of the elements in this set; the runtime type of the returned array is that of the specified array. |
String |
toString()
Returns a comma-separated list in square brackets of the contents of this node set. |
| Methods inherited from class org.planx.xpath.object.XObject |
|---|
evaluate |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public XNodeSet()
public XNodeSet(int initialCapacity)
public XNodeSet(Collection c)
| Method Detail |
|---|
public boolean booleanValue()
true if this node set
contains any elements. Otherwise returns false.
booleanValue in class XObjectpublic String toString()
toString() method.
toString in class Objectpublic int size()
size in interface Collectionsize in interface Listpublic boolean isEmpty()
isEmpty in interface CollectionisEmpty in interface Listpublic boolean contains(Object o)
contains in interface Collectioncontains in interface Listpublic Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in interface Listpublic Object[] toArray()
toArray in interface CollectiontoArray in interface Listpublic Object[] toArray(Object[] a)
toArray in interface CollectiontoArray in interface Listpublic boolean add(Object o)
add in interface Collectionadd in interface Listpublic boolean remove(Object o)
remove in interface Collectionremove in interface Listpublic boolean containsAll(Collection c)
containsAll in interface CollectioncontainsAll in interface Listpublic boolean addAll(Collection c)
addAll in interface CollectionaddAll in interface List
public boolean addAll(int index,
Collection c)
addAll in interface Listpublic boolean retainAll(Collection c)
retainAll in interface CollectionretainAll in interface Listpublic boolean removeAll(Collection c)
removeAll in interface CollectionremoveAll in interface Listpublic void clear()
clear in interface Collectionclear in interface Listpublic boolean equals(Object o)
equals in interface Collectionequals in interface Listequals in class Objectpublic int hashCode()
hashCode in interface CollectionhashCode in interface ListhashCode in class Objectpublic Object get(int index)
get in interface List
public Object set(int index,
Object element)
set in interface List
public void add(int index,
Object element)
add in interface Listpublic Object remove(int index)
remove in interface Listpublic int indexOf(Object o)
indexOf in interface Listpublic int lastIndexOf(Object o)
lastIndexOf in interface Listpublic ListIterator listIterator()
listIterator in interface Listpublic ListIterator listIterator(int index)
listIterator in interface List
public List subList(int fromIndex,
int toIndex)
subList in interface List
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||