org.exist.fluent
Class ItemList.NodesFacet

java.lang.Object
  extended by org.exist.fluent.ItemList.NodesFacet
All Implemented Interfaces:
Iterable<Node>
Enclosing class:
ItemList

public class ItemList.NodesFacet
extends Object
implements Iterable<Node>

A facet that treats each item in the list as a node. If an operation accesses an item that is not a node, it will throw a DatabaseException.


Method Summary
 List<Node> asList()
          Return an unmodifiable list view over the list of nodes.
 Set<XMLDocument> documents()
          Return the set of documents to which the nodes in this list belong.
 boolean equals(Object o)
           
 int hashCode()
           
 Iterator<Node> iterator()
          Return an iterator over the list of nodes.
 Node[] toArray()
          Convert the list of nodes to an array.
 Node[] toArray(Node[] a)
          Convert the list of nodes to an array.
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

iterator

public Iterator<Node> iterator()
Return an iterator over the list of nodes.

Specified by:
iterator in interface Iterable<Node>
Returns:
an iterator over the list of nodes

documents

public Set<XMLDocument> documents()
Return the set of documents to which the nodes in this list belong.

Returns:
the set of documents convering the nodes in the list

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

asList

public List<Node> asList()
Return an unmodifiable list view over the list of nodes.

Returns:
a list view

toArray

public Node[] toArray()
Convert the list of nodes to an array.

Returns:
an array of nodes

toArray

public Node[] toArray(Node[] a)
Convert the list of nodes to an array. If the given array is large enough, fill it; if it's larger than necessary, put a null marker after the end of the list. If the array is not large enough, allocate a new one.

Parameters:
a - the array to fill with the list of nodes
Returns:
an array of nodes

toString

public String toString()
Overrides:
toString in class Object


Copyright (C) All rights reserved.