Package dev.webfx.platform.ast
Class ReadOnlyAstArrayWrapper
java.lang.Object
dev.webfx.platform.ast.ReadOnlyAstArrayWrapper
- All Implemented Interfaces:
ReadOnlyAstArray
,ReadOnlyAstNode
,Iterable<Object>
- Direct Known Subclasses:
ConfigArray
- Author:
- Bruno Salmon
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<V> V
getElement
(int index) Return the ith element of the array.protected ReadOnlyAstArray
int
Returns the first index of the given value, or -1 if it cannot be found.int
size()
Length of the array or number of keys of the objectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface dev.webfx.platform.ast.ReadOnlyAstArray
getArray, getBoolean, getBoolean, getDouble, getDouble, getInteger, getInteger, getLong, getLong, getObject, getScalar, getScalar, getString, getString, isArray, isNull, isObject, isScalar, iterator
-
Constructor Details
-
ReadOnlyAstArrayWrapper
-
-
Method Details
-
getWrappedArray
-
size
public int size()Description copied from interface:ReadOnlyAstArray
Length of the array or number of keys of the object- Specified by:
size
in interfaceReadOnlyAstArray
- Specified by:
size
in interfaceReadOnlyAstNode
-
indexOf
Description copied from interface:ReadOnlyAstArray
Returns the first index of the given value, or -1 if it cannot be found.- Specified by:
indexOf
in interfaceReadOnlyAstArray
-
getElement
public <V> V getElement(int index) Description copied from interface:ReadOnlyAstArray
Return the ith element of the array. Most consuming call.- Specified by:
getElement
in interfaceReadOnlyAstArray
-