Modifier | Constructor and Description |
---|---|
protected |
OMNodeList(com.google.gwt.dom.client.NodeList<? extends com.google.gwt.dom.client.Node> nodeList)
Constructor
|
Modifier and Type | Method and Description |
---|---|
T |
getItem(int index)
Returns the
index th item in the collection. |
int |
getLength()
The number of nodes in the list.
|
Iterator<T> |
iterator()
Returns an iterator over the
OMNode
elements in this list in proper sequence. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
protected OMNodeList(com.google.gwt.dom.client.NodeList<? extends com.google.gwt.dom.client.Node> nodeList)
nodeList
- The wrapped node listpublic final T getItem(int index)
index
th item in the collection. If
index
is greater than or equal to the number of nodes in
the list, this returns null
.index
- Index into the collection.index
th position in the
NodeList
, or null
if that is not a valid
index.public final int getLength()
length-1
inclusive.public Iterator<T> iterator()
OMNode
elements in this list in proper sequence.
This implementation returns a straightforward implementation of the
iterator interface, relying on the backing list's getNumberOfItems()
,
and getItem(int)
methods.
Note that the iterator returned by this method will throw an
UnsupportedOperationException
in response to its
remove
method.
Copyright © 2018. All Rights Reserved.