Package org.mozilla.javascript
Class ArrayLikeAbstractOperations
java.lang.Object
org.mozilla.javascript.ArrayLikeAbstractOperations
Contains implementation of shared methods useful for arrays and typed arrays.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static enum
static enum
static final class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Comparator
<Object> getSortComparator
(Context cx, Scriptable scope, Object[] args) getSortComparatorFromArguments
(Context cx, Scriptable scope, Object[] args) static Object
iterativeMethod
(Context cx, ArrayLikeAbstractOperations.IterativeOperation operation, Scriptable scope, Scriptable thisObj, Object[] args) Implements the methods "every", "filter", "forEach", "map", and "some" without using an IdFunctionObject.static Object
iterativeMethod
(Context cx, IdFunctionObject fun, ArrayLikeAbstractOperations.IterativeOperation operation, Scriptable scope, Scriptable thisObj, Object[] args) Implements the methods "every", "filter", "forEach", "map", and "some" using an IdFunctionObject.static Object
reduceMethod
(Context cx, ArrayLikeAbstractOperations.ReduceOperation operation, Scriptable scope, Scriptable thisObj, Object[] args) Implements the methods "reduce" and "reduceRight".static long
toSliceIndex
(double value, long length)
-
Constructor Details
-
ArrayLikeAbstractOperations
public ArrayLikeAbstractOperations()
-
-
Method Details
-
iterativeMethod
public static Object iterativeMethod(Context cx, ArrayLikeAbstractOperations.IterativeOperation operation, Scriptable scope, Scriptable thisObj, Object[] args) Implements the methods "every", "filter", "forEach", "map", and "some" without using an IdFunctionObject. -
iterativeMethod
public static Object iterativeMethod(Context cx, IdFunctionObject fun, ArrayLikeAbstractOperations.IterativeOperation operation, Scriptable scope, Scriptable thisObj, Object[] args) Implements the methods "every", "filter", "forEach", "map", and "some" using an IdFunctionObject. -
toSliceIndex
public static long toSliceIndex(double value, long length) -
reduceMethod
public static Object reduceMethod(Context cx, ArrayLikeAbstractOperations.ReduceOperation operation, Scriptable scope, Scriptable thisObj, Object[] args) Implements the methods "reduce" and "reduceRight". -
getSortComparator
-
getSortComparatorFromArguments
public static ArrayLikeAbstractOperations.ElementComparator getSortComparatorFromArguments(Context cx, Scriptable scope, Object[] args)
-