T
- Parameterized type of iterator elementspublic class JSIterator<T> extends JSObject implements java.util.Iterator<T>
Modifier and Type | Class and Description |
---|---|
class |
JSIterator.Next
Represents the object returned by 'next'
|
JSObject.jsexport, JSObject.Property<T>
JSPropertyAttributeDontDelete, JSPropertyAttributeDontEnum, JSPropertyAttributeNone, JSPropertyAttributeReadOnly
Constructor and Description |
---|
JSIterator(JSObject iterator)
Wraps a JavaScript iterator in a Java iterator
|
Modifier and Type | Method and Description |
---|---|
JSObject |
getJSObject()
Gets underlying JSObject
|
boolean |
hasNext() |
JSIterator.Next |
jsnext()
The 'next' JavaScript iterator object
|
T |
next() |
void |
remove() |
__nullFunc, deleteProperty, getThis, hashCode, hasProperty, isConstructor, isFunction, property, property, property, propertyAtIndex, propertyAtIndex, propertyNames, prototype, prototype
equals, getContext, isArray, isBoolean, isDate, isEqual, isFloat32Array, isFloat64Array, isInstanceOfConstructor, isInt16Array, isInt32Array, isInt8Array, isNull, isNumber, isObject, isStrictEqual, isString, isTypedArray, isUint16Array, isUint32Array, isUint8Array, isUint8ClampedArray, isUndefined, toBoolean, toFunction, toJSArray, toJSON, toNumber, toObject, toString, valueHash, valueRef
public JSIterator(JSObject iterator)
iterator
- the JavaScript iterator object. Assumes the object is a properly formed JS
iteratorpublic JSIterator.Next jsnext()
public T next()
next
in interface java.util.Iterator<T>
Iterator.next()
public boolean hasNext()
hasNext
in interface java.util.Iterator<T>
Iterator.hasNext()
public void remove()
remove
in interface java.util.Iterator<T>
java.lang.UnsupportedOperationException
- alwaysIterator.remove()
public JSObject getJSObject()