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
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic enumstatic enumstatic final class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Comparator<Object> getSortComparator(Context cx, Scriptable scope, Object[] args) getSortComparatorFromArguments(Context cx, Scriptable scope, Object[] args) static ObjectiterativeMethod(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 ObjectiterativeMethod(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 ObjectreduceMethod(Context cx, ArrayLikeAbstractOperations.ReduceOperation operation, Scriptable scope, Scriptable thisObj, Object[] args) Implements the methods "reduce" and "reduceRight".static longtoSliceIndex(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)
-