java.lang.Object
org.jruby.RubyBasicObject
org.jruby.RubyObject
org.jruby.RubyArray<T>
org.jruby.RubyArrayNative<T>
- Type Parameters:
T- What array holds
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<IRubyObject>,Iterable,Collection,List,RandomAccess,SequencedCollection,InstanceVariables,InternalVariables,IRubyObject,CoreObjectType
- Direct Known Subclasses:
RubyArraySpecialized,StringArraySet
The implementation of the built-in class Array in Ruby.
Concurrency: no synchronization is required among readers, but
all users must synchronize externally with writers.
Note: elt(long) is based on notion if we exceed precision by passing in a long larger
than int (actually Integer.MAX - 8) then it will just return nil. Anything using eltOk
must know this already to avoid an AIOOBE. We do catch that in eltOk but only as an
attempt at detecting concurrent modifications to the length. So if you improperly
use eltOk you will get a conc error and not AIOOBE.
Guidance for elt(long) is that if the Ruby method should raise if it is too large
then you need to do that before you call this (toLong vs getValue/asLong).
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceclassNested classes/interfaces inherited from class org.jruby.RubyArray
RubyArray.DefaultComparatorNested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.DataNested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.Finalizer -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected intstatic final intprotected intprotected IRubyObject[]Fields inherited from class org.jruby.RubyObject
IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATORFields inherited from class org.jruby.RubyBasicObject
ALL_F, BASICOBJECT_ALLOCATOR, ERR_INSECURE_SET_INST_VAR, FALSE_F, flags, FROZEN_F, metaClass, NEVER, NIL_F, STAMP_OFFSET, TAINTED_F, UNDEF, VAR_TABLE_OFFSET, varTable, varTableStampFields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY -
Constructor Summary
ConstructorsModifierConstructorDescriptionRubyArrayNative(RubyClass klass, IRubyObject[] vals, boolean shared) RubyArrayNative(Ruby runtime, int length) protectedRubyArrayNative(Ruby runtime, RubyClass klass) protectedRubyArrayNative(Ruby runtime, RubyClass klass, boolean objectSpace) RubyArrayNative(Ruby runtime, RubyClass klass, IRubyObject[] vals) RubyArrayNative(Ruby runtime, IRubyObject[] vals, int begin, int length) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanadd(ThreadContext context, Object element) booleanaddAll(int index, Collection c) booleanaddAll(Collection c) all_p(ThreadContext context, Block block) all_p(ThreadContext context, IRubyObject arg, Block block) all_pCommon(ThreadContext context, IRubyObject arg, Block block) any_p(ThreadContext context, Block block) any_p(ThreadContext context, IRubyObject arg, Block block) any_pCommon(ThreadContext context, IRubyObject arg, Block block) append(ThreadContext context, IRubyObject item) rb_ary_push - specialized rb_ary_storearef(ThreadContext context, IRubyObject arg0) rb_ary_arefaref(ThreadContext context, IRubyObject arg0, IRubyObject arg1) aryAppend(ThreadContext context, RubyArray<?> y) aryDup()rb_ary_dupstatic RubyArrayaryToAry(ThreadContext context, IRubyObject obj) rb_ary_to_aryaset(ThreadContext context, IRubyObject arg0, IRubyObject arg1) aset(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) rb_ary_asetassoc(ThreadContext context, IRubyObject key) rb_ary_assocat(ThreadContext context, IRubyObject pos) rb_ary_atbsearch(ThreadContext context, Block block) bsearch_index(ThreadContext context, Block block) voidclear()collect(ThreadContext context, Block block) collect_bang(ThreadContext context, Block block) rb_ary_collect_bangcollectArray(ThreadContext context, Block block) Collect the contents of this array after filtering through block, or return a new equivalent array if the block is not given (!isGiven()).collectBang(ThreadContext context, Block block) rb_ary_collect_bangcollectEnum(ThreadContext context) Produce a new enumerator that will filter the contents of this array usingcollectArray(ThreadContext, Block).combination(ThreadContext context, IRubyObject num, Block block) rb_ary_combinationcompact(ThreadContext context) compact_bang(ThreadContext context) rb_ary_compact_bangcompare(ThreadContext context, CallSite site, IRubyObject other) protected static intcompareFixnums(RubyFixnum o1, RubyFixnum o2) protected static intcompareOthers(ThreadContext context, IRubyObject o1, IRubyObject o2) concat(IRubyObject obj) concat(ThreadContext context, IRubyObject obj) rb_ary_concatconcat(ThreadContext context, IRubyObject[] objs) rb_ary_concat_multibooleanbooleanvoidcopyInto(ThreadContext context, IRubyObject[] target, int start) Copy the values contained in this array into the target array at the specified offset.voidcopyInto(ThreadContext context, IRubyObject[] target, int start, int len) Copy the specified number of values contained in this array into the target array at the specified offset.count(ThreadContext context, Block block) count(ThreadContext context, IRubyObject obj, Block block) static IRubyObjectcreate(ThreadContext context, IRubyObject klass, IRubyObject[] args, Block block) rb_ary_s_createcycle(ThreadContext context, Block block) rb_ary_cyclecycle(ThreadContext context, IRubyObject arg, Block block) rb_ary_cycledelete(ThreadContext context, IRubyObject item, Block block) rb_ary_deletedelete_at(ThreadContext context, int pos) rb_ary_delete_atdelete_at(ThreadContext context, IRubyObject obj) rb_ary_delete_at_mdelete_if(ThreadContext context, Block block) deleteIf(ThreadContext context, Block block) rb_ary_delete_ifdetectCommon(ThreadContext context, IRubyObject ifnone, Block block) difference(ThreadContext context, IRubyObject[] args) rb_ary_difference_multidig(ThreadContext context, IRubyObject arg0) dig(ThreadContext context, IRubyObject[] args) dig(ThreadContext context, IRubyObject arg0, IRubyObject arg1) dig(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) drop(ThreadContext context, IRubyObject n) rb_ary_takedrop_while(ThreadContext context, Block block) rb_ary_take_whiledup()Overridden dup for fast-path logic.protected RubyArrayNativeeach(ThreadContext context, Block block) mri: rb_ary_eacheach_index(ThreadContext context, Block block) each_slice(ThreadContext context, IRubyObject arg, Block block) eachIndex(ThreadContext context, Block block) rb_ary_each_indexeachSlice(ThreadContext context, int size, Block block) protected final IRubyObjectelt(long offset) rb_ary_elteltInternal(int offset) eltInternalSet(int offset, T item) eltOk(long offset) empty_p(ThreadContext context) rb_ary_empty_pfinal IRubyObjectentry(int offset) final IRubyObjectentry(long offset) rb_ary_entryeql(ThreadContext context, IRubyObject obj) rb_ary_eqlbooleanThis override does not do a "checked" dispatch.fetch(ThreadContext context, IRubyObject arg0, Block block) rb_ary_fetchfetch(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) rb_ary_fetchfetch_values(ThreadContext context, IRubyObject[] args, Block block) fill(ThreadContext context, Block block) fill(ThreadContext context, IRubyObject arg, Block block) fill(ThreadContext context, IRubyObject arg1, IRubyObject arg2, Block block) fill(ThreadContext context, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, Block block) protected IRubyObjectfillCommon(ThreadContext context, int beg, long len, Block block) protected IRubyObjectfillCommon(ThreadContext context, int beg, long len, IRubyObject item) find(ThreadContext context, IRubyObject ifnone, Block block) find_index(ThreadContext context, Block block) find_index(ThreadContext context, IRubyObject cond) first(ThreadContext context) first(ThreadContext context, IRubyObject arg0) flatten(ThreadContext context) protected booleanflatten(ThreadContext context, int level, RubyArrayNative result) flatten(ThreadContext context, IRubyObject arg) flatten_bang(ThreadContext context) flatten_bang(ThreadContext context, IRubyObject arg) get(int index) Will return the Java interface that most closely can represent this object, when working through Java integration translations.inthash(ThreadContext context) rb_ary_hashinclude_p(ThreadContext context, IRubyObject item) rb_ary_includesbooleanincludes(ThreadContext context, IRubyObject item) protected booleanincludesByEql(ThreadContext context, IRubyObject item) index(ThreadContext context, Block block) index(ThreadContext context, IRubyObject obj) rb_ary_indexindex(ThreadContext context, IRubyObject obj, Block unused) intinitialize(ThreadContext context, Block block) rb_ary_initializeinitialize(ThreadContext context, IRubyObject arg0, Block block) rb_ary_initializeinitialize(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) rb_ary_initializeinitialize_copy(ThreadContext context, IRubyObject orig) rb_ary_initialize_copyprotected IRubyObjectinitializeCommon(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) insert()insert(ThreadContext context, IRubyObject arg) rb_ary_insertinsert(ThreadContext context, IRubyObject[] args) insert(ThreadContext context, IRubyObject arg1, IRubyObject arg2) inspect(ThreadContext context) rb_ary_inspectprotected IRubyObjectinspectAry(ThreadContext context) inspect_aryprotected IRubyObjectinternalRotate(ThreadContext context, int cnt) protected IRubyObjectinternalRotateBang(ThreadContext context, int cnt) intersect_p(ThreadContext context, IRubyObject other) MRI: rb_ary_intersect_pintersection(ThreadContext context, IRubyObject[] args) booleanisEmpty()booleanisSharedJavaArray(RubyArray other) iterator()join(ThreadContext context) join(ThreadContext context, IRubyObject sep) rb_ary_joinprotected intjoinStrings(RubyString sep, int max, RubyString result) keep_if(ThreadContext context, Block block) last(ThreadContext context) last(ThreadContext context, IRubyObject arg0) rb_ary_lastintlastIndexOf(Object element) length(ThreadContext context) rb_ary_lengthlistIterator(int index) protected RubyHashary_make_hashprotected RubyHashprotected RubyArrayNative<?> rb_ary_make_sharedmap(ThreadContext context, Block block) map_bang(ThreadContext context, Block block) rb_ary_collect_bangmax(ThreadContext context, Block block) max(ThreadContext context, IRubyObject num, Block block) min(ThreadContext context, Block block) min(ThreadContext context, IRubyObject num, Block block) minmax(ThreadContext context, Block block) protected voidmodify()Deprecated.protected voidmodify(ThreadContext context) rb_ary_modifyprotected final voidDeprecated.protected final voidmodifyCheck(ThreadContext context) rb_ary_modify_checkstatic RubyArrayNative<?> static RubyArrayNative<?> newArray(Ruby runtime, Collection<? extends IRubyObject> collection) static RubyArrayNative<?> newArray(Ruby runtime, List<? extends IRubyObject> list) static RubyArrayNative<?> newArray(Ruby runtime, IRubyObject obj) static RubyArrayNative<?> newArray(Ruby runtime, IRubyObject[] args) rb_ary_new4, rb_ary_new3static RubyArrayNative<?> newArray(Ruby runtime, IRubyObject car, IRubyObject cdr) rb_assoc_newstatic RubyArrayNative<?> newArray(Ruby runtime, IRubyObject first, IRubyObject second, IRubyObject third) static RubyArrayNative<?> newArray(Ruby runtime, IRubyObject first, IRubyObject second, IRubyObject third, IRubyObject fourth) static final RubyArrayNative<?> newArray(ThreadContext context) rb_ary_newstatic final RubyArrayNative<?> newArray(ThreadContext context, int len) static final RubyArrayNative<?> newArrayLight(Ruby runtime) rb_ary_newstatic RubyArrayNative<?> newArrayLight(RubyClass arrayClass, IRubyObject obj) static RubyArrayNative<?> newArrayLight(RubyClass arrayClass, IRubyObject car, IRubyObject cdr) static final RubyArrayNative<?> newArrayLight(Ruby runtime, int len) static RubyArrayNative<?> newArrayLight(Ruby runtime, IRubyObject obj) static RubyArrayNative<?> newArrayLight(Ruby runtime, IRubyObject... objs) static RubyArrayNative<?> newArrayLight(Ruby runtime, IRubyObject car, IRubyObject cdr) static RubyArrayNativenewArrayMayCopy(Ruby runtime, IRubyObject... args) static RubyArrayNativenewArrayMayCopy(Ruby runtime, IRubyObject[] args, int start) static RubyArrayNativenewArrayMayCopy(Ruby runtime, IRubyObject[] args, int start, int length) Construct a new RubyArray given the specified range of elements in the source array.static RubyArrayNativenewArrayNoCopy(Ruby runtime, IRubyObject... args) static RubyArrayNativenewArrayNoCopy(Ruby runtime, IRubyObject[] args, int begin) static RubyArrayNativenewArrayNoCopy(Ruby runtime, IRubyObject[] args, int begin, int length) static RubyArrayNativenewArrayNoCopyLight(Ruby runtime, IRubyObject[] args) static RubyArraynewBlankArray(ThreadContext context, int size) Construct the most efficient array shape for the given size.static RubyArrayNative<?> newEmptyArray(Ruby runtime) static RubyArrayNative<?> newEmptyArray(Ruby runtime, RubyClass klass) static RubyArrayNative<?> newSharedArray(RubyClass arrayClass, IRubyObject[] shared) nitems(ThreadContext context) rb_ary_nitemsnone_p(ThreadContext context, Block block) none_p(ThreadContext context, IRubyObject arg, Block block) none_pCommon(ThreadContext context, IRubyObject arg, Block block) one_p(ThreadContext context, Block block) one_p(ThreadContext context, IRubyObject arg, Block block) one_pCommon(ThreadContext context, IRubyObject arg, Block block) op_and(ThreadContext context, IRubyObject other) MRI: rb_ary_andop_cmp(ThreadContext context, IRubyObject obj) rb_ary_cmpop_diff(ThreadContext context, IRubyObject other) rb_ary_diffop_equal(ThreadContext context, IRubyObject obj) rb_ary_equalop_or(ThreadContext context, IRubyObject other) rb_ary_orop_plus(ThreadContext context, IRubyObject obj) rb_ary_plusop_times(ThreadContext context, IRubyObject times) rb_ary_timespack(ThreadContext context, IRubyObject obj) pack(ThreadContext context, IRubyObject obj, IRubyObject maybeOpts) permutation(ThreadContext context, Block block) permutation(ThreadContext context, IRubyObject num, Block block) rb_ary_permutationpop(ThreadContext context) rb_ary_poppop(ThreadContext context, IRubyObject num) product(ThreadContext context, IRubyObject[] args) rb_ary_productproduct(ThreadContext context, IRubyObject[] args, Block block) push(ThreadContext context, IRubyObject item) push(ThreadContext context, IRubyObject[] items) rassoc(ThreadContext context, IRubyObject value) rb_ary_rassocrb_clear(ThreadContext context) rb_ary_clearrbCollect(ThreadContext context, Block block) rb_ary_collectreject(ThreadContext context, Block block) reject_bang(ThreadContext context, Block block) rejectBang(ThreadContext context, Block block) final IRubyObjectrejectCommon(ThreadContext context, Block block) rb_ary_reject_bangremove(int index) booleanbooleanrepeated_permutation(ThreadContext context, IRubyObject num, Block block) repeatedCombination(ThreadContext context, IRubyObject num, Block block) replace(ThreadContext context, IRubyObject orig) rb_ary_replacebooleanreverse(ThreadContext context) reverse_bang(ThreadContext context) rb_ary_reverse_bangreverse_each(ThreadContext context, Block block) reverseEach(ThreadContext context, Block block) rb_ary_reverse_eachrfind(ThreadContext context, Block block) rfind(ThreadContext context, IRubyObject ifnone, Block block) rindex(ThreadContext context, Block block) rindex(ThreadContext context, IRubyObject obj) rb_ary_rindexrindex(ThreadContext context, IRubyObject obj, Block unused) rotate(ThreadContext context) rotate(ThreadContext context, IRubyObject cnt) rotate_bang(ThreadContext context) rotate_bang(ThreadContext context, IRubyObject cnt) Returns a stream of each IRubyObjectprotected static IRubyObjectsafeArraySet(ThreadContext context, IRubyObject[] values, int i, IRubyObject value) protected RubyArraysample(ThreadContext context) sample(ThreadContext context, IRubyObject sampleOrOpts) sample(ThreadContext context, IRubyObject sample, IRubyObject opts) select(ThreadContext context, Block block) select_bang(ThreadContext context, Block block) selectCommon(ThreadContext context, Block block) rb_ary_selectshift(ThreadContext context) rb_ary_shiftshift(ThreadContext context, IRubyObject num) shuffle(ThreadContext context) shuffle(ThreadContext context, IRubyObject opts) shuffle_bang(ThreadContext context) shuffle_bang(ThreadContext context, IRubyObject opts) intsize()protected static IRubyObjectsize(ThreadContext context, RubyArray self, IRubyObject[] args) A size method suitable for lambda method reference implementation ofRubyEnumerator.SizeFn.size(ThreadContext, IRubyObject, IRubyObject[])slice_bang(ThreadContext context, IRubyObject arg0) rb_ary_slice_bangslice_bang(ThreadContext context, IRubyObject arg0, IRubyObject arg1) rb_ary_slice_bangsort(ThreadContext context, Block block) rb_ary_sortsort_bang(ThreadContext context, Block block) rb_ary_sort_bangsort_by_bang(ThreadContext context, Block block) rb_ary_sort_by_bangprotected IRubyObjectsortInternal(ThreadContext context, boolean honorOverride) protected IRubyObjectsortInternal(ThreadContext context, Block block) store(long index, IRubyObject value) store(ThreadContext context, long index, IRubyObject value) Store an element at the specified index or throw if the index is invalid.protected voidstoreInternal(ThreadContext context, int index, IRubyObject value) subList(int fromIndex, int toIndex) subseq(long beg, long len) rb_ary_subseqsubseq_step(ThreadContext context, RubyArithmeticSequence arg0) rb_ary_subseq_stepsubseqLight(long beg, long len) rb_ary_subseqsum(ThreadContext context, Block block) sum(ThreadContext context, IRubyObject init, Block block) sumCommon(ThreadContext context, IRubyObject init, Block block) take(ThreadContext context, IRubyObject n) rb_ary_taketake_while(ThreadContext context, Block block) rb_ary_take_whileto_a(ThreadContext context) rb_ary_to_ato_h(ThreadContext context, Block block) to_s(ThreadContext context) rb_ary_to_sObject[]toArray()Object[]<T> TConvert the object to the specified Java class, if possible.toJavaArray(ThreadContext context) Return a Java array copy of the elements contained in this Array.Return a Java array of the elements contained in this array, possibly a new array object.Return a reference to this RubyArray's underlying Java array, if it is not shared with another RubyArray, or an exact copy of the relevant range otherwise.transpose(ThreadContext context) rb_ary_transposestatic IRubyObjecttry_convert(ThreadContext context, IRubyObject self, IRubyObject arg) union(ThreadContext context, IRubyObject[] args) rb_ary_union_multiprotected voidunionInternal(ThreadContext context, RubyArray... args) rb_ary_unionuniq(ThreadContext context) rb_ary_uniquniq(ThreadContext context, Block block) uniq_bang(ThreadContext context) rb_ary_uniq_banguniq_bang(ThreadContext context, Block block) protected voidunpack(ThreadContext context) Overridden by specialized arrays to fall back to IRubyObject[].unshift(ThreadContext context) unshift(ThreadContext context, IRubyObject item) rb_ary_unshiftunshift(ThreadContext context, IRubyObject[] items) values_at(ThreadContext context, IRubyObject[] args) rb_values_atzip(ThreadContext context, IRubyObject[] args, Block block) rb_ary_zipMethods inherited from class org.jruby.RubyArray
append, aref, aref, aryAppend, aset, aset, aset, at, checkArrayType, checkLength, checkLength, compact, compact_bang, convertToArray, copyInto, copyInto, create, createArrayClass, deconstruct, delete_at, delete_at, empty_p, fetch, first, first, first, getList, getNativeClassIndex, indexes, indexes, insert, insert, insert, join19, join19, last, last, last, length, marshalTo, marshalTo, marshalTo, newArray, newBlankArray, nitems, op_and, op_diff, op_or, op_plus, push, push, push_m, rb_clear, replace, reverse, reverse_bang, slice_bang, slice_bang, slice_bang, to_ary, to_ary, toJavaArray, transpose, unmarshalFrom, unmarshalFrom, unshift, unshift, unshift, values_atMethods inherited from class org.jruby.RubyObject
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, dig, dig1, dig2, eqlInternal, equalInternal, finishObjectClass, hashCode, inspect, op_eqq, puts, toRubyString, toStringMethods inherited from class org.jruby.RubyBasicObject
__id__, addFinalizer, addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, checkCallMethod, checkCallMethod, checkFrozen, checkStringType, cloneSetup, compareTo, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, dataGetStruct, dataWrapStruct, decode, display, dupFinalizer, dupSetup, ensureInstanceVariablesSettable, eql, eql_p, eql_p, equal_p, evalUnder, extend, finishBasicObjectClass, forEachInstanceVariable, forEachInstanceVariableName, freeze, frozen_p, getCurrentContext, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getMarshalVariableList, getMetaClass, getMetaClass, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getSingletonClassCloneAndAttach, getSingletonClassCloneAndAttach, getType, getVariable, getVariableList, getVariableNameList, hash, hashyInspect, hashyInspect, hasInstanceVariable, hasInstanceVariables, hasInternalVariable, hasVariables, id, infectBy, initialize, initialize_copy, inspect, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval, instance_exec, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, isBuiltin, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isSpecialConst, isSpecialObject, isTaint, isTrue, kind_of_p, makeMetaClass, makeMetaClass, makeMetaClassBootstrap, method, method, method, method_missing, methods, nil_p, nonFixnumHashCode, nonFixnumHashCode, OBJ_INIT_COPY, objInitCopy, op_match, op_not, op_not_equal, op_not_match, private_methods, protected_methods, public_methods, rbClone, rbClone, rbInspect, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setTaint, setVariable, singleton_method, singleton_method, singleton_method_added, singleton_method_removed, singleton_method_undefined, singleton_methods, singletonClass, specificEval, specificEval, specificEval, specificEval, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_s, type, untaint, validateInstanceVariable, variableTableContains, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnderMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface org.jruby.runtime.builtin.IRubyObject
checkStringType19, dup, marshalLiveVariablesMethods inherited from interface java.util.List
addFirst, addLast, getFirst, getLast, hashCode, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Field Details
-
DEFAULT_INSPECT_STR_SIZE
public static final int DEFAULT_INSPECT_STR_SIZE- See Also:
-
ARRAY_DEFAULT_SIZE
public static final int ARRAY_DEFAULT_SIZE- See Also:
-
values
-
begin
protected int begin -
realLength
protected int realLength
-
-
Constructor Details
-
RubyArrayNative
-
RubyArrayNative
-
RubyArrayNative
-
RubyArrayNative
-
RubyArrayNative
-
RubyArrayNative
-
-
Method Details
-
create
public static IRubyObject create(ThreadContext context, IRubyObject klass, IRubyObject[] args, Block block) rb_ary_s_create -
newArray
-
newArray
-
newArrayLight
-
newArray
rb_ary_new -
newArrayLight
rb_ary_new -
newArray
-
newArrayLight
-
newArrayLight
-
newArrayLight
-
newArrayLight
public static RubyArrayNative<?> newArrayLight(RubyClass arrayClass, IRubyObject car, IRubyObject cdr) -
newArrayLight
-
newArray
rb_assoc_new -
newArray
public static RubyArrayNative<?> newArray(Ruby runtime, IRubyObject first, IRubyObject second, IRubyObject third) -
newArray
public static RubyArrayNative<?> newArray(Ruby runtime, IRubyObject first, IRubyObject second, IRubyObject third, IRubyObject fourth) -
newEmptyArray
-
newEmptyArray
-
newArray
rb_ary_new4, rb_ary_new3 -
newArray
public static RubyArrayNative<?> newArray(Ruby runtime, Collection<? extends IRubyObject> collection) -
newArray
-
newArrayMayCopy
- See Also:
-
newArrayMayCopy
- See Also:
-
newArrayMayCopy
public static RubyArrayNative newArrayMayCopy(Ruby runtime, IRubyObject[] args, int start, int length) Construct a new RubyArray given the specified range of elements in the source array. The elements may be copied into a new backing store, and therefore you should not expect future changes to the source array to be reflected. Conversely, you should not modify the array after passing it, since the contents may not be copied.- Parameters:
runtime- the runtimeargs- the argsstart- start indexlength- number of elements- Returns:
- an array referencing the given elements
-
newArrayNoCopy
-
newArrayNoCopy
-
newArrayNoCopy
public static RubyArrayNative newArrayNoCopy(Ruby runtime, IRubyObject[] args, int begin, int length) -
newArrayNoCopyLight
-
unpack
Overridden by specialized arrays to fall back to IRubyObject[]. -
getLength
public int getLength()- Specified by:
getLengthin classRubyArray<T extends IRubyObject>
-
toJavaArray
Return a Java array copy of the elements contained in this Array. This version always creates a new Java array that is exactly the length of the Array's elements.- Specified by:
toJavaArrayin classRubyArray<T extends IRubyObject>- Returns:
- a Java array with exactly the size and contents of this RubyArray's elements
-
toJavaArrayUnsafe
Return a reference to this RubyArray's underlying Java array, if it is not shared with another RubyArray, or an exact copy of the relevant range otherwise. This method is typically used to work with the underlying array directly, knowing that it is not shared and that all accesses must consider the begin offset.- Specified by:
toJavaArrayUnsafein classRubyArray<T extends IRubyObject>- Returns:
- The underlying Java array for this RubyArray, or a copy if that array is shared.
-
toJavaArrayMaybeUnsafe
Return a Java array of the elements contained in this array, possibly a new array object. Use this method to potentially avoid making a new array and copying elements when the Array does not view a subset of the underlying Java array.- Specified by:
toJavaArrayMaybeUnsafein classRubyArray<T extends IRubyObject>- Returns:
- a Java array with exactly the size and contents of this RubyArray's elements, possibly the actual underlying array.
-
modifyCheck
Deprecated. -
modifyCheck
rb_ary_modify_check -
modify
Deprecated. -
modify
rb_ary_modify -
initialize
rb_ary_initialize- Specified by:
initializein classRubyArray<T extends IRubyObject>
-
initialize
rb_ary_initialize- Specified by:
initializein classRubyArray<T extends IRubyObject>
-
initialize
public IRubyObject initialize(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) rb_ary_initialize- Specified by:
initializein classRubyArray<T extends IRubyObject>
-
initializeCommon
protected IRubyObject initializeCommon(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) -
initialize_copy
rb_ary_initialize_copy- Specified by:
initialize_copyin classRubyArray<T extends IRubyObject>- Parameters:
context- the thread contextorig- the original- Returns:
- a copy unless the same thing
-
dup
Overridden dup for fast-path logic.- Specified by:
dupin interfaceIRubyObject- Overrides:
dupin classRubyBasicObject- Returns:
- A new RubyArray sharing the original backing store.
-
dupImpl
-
aryDup
rb_ary_dup- Specified by:
aryDupin classRubyArray<T extends IRubyObject>
-
replace
rb_ary_replace- Specified by:
replacein classRubyArray<T extends IRubyObject>
-
to_s
rb_ary_to_s- Specified by:
to_sin classRubyArray<T extends IRubyObject>
-
includes
- Specified by:
includesin classRubyArray<T extends IRubyObject>
-
includesByEql
- Specified by:
includesByEqlin classRubyArray<T extends IRubyObject>
-
hash
rb_ary_hash- Specified by:
hashin classRubyArray<T extends IRubyObject>- Parameters:
context- the current thread context- Returns:
- the hash value
-
store
- Specified by:
storein classRubyArray<T extends IRubyObject>
-
store
Store an element at the specified index or throw if the index is invalid.- Specified by:
storein classRubyArray<T extends IRubyObject>- Parameters:
context- the current thread contextindex- the offset to store the valuevalue- the value to be stored- Returns:
- the value set
-
storeInternal
- Specified by:
storeInternalin classRubyArray<T extends IRubyObject>
-
elt
rb_ary_elt- Specified by:
eltin classRubyArray<T extends IRubyObject>
-
eltOk
- Specified by:
eltOkin classRubyArray<T extends IRubyObject>
-
eltSetOk
- Specified by:
eltSetOkin classRubyArray<T extends IRubyObject>
-
eltSetOk
- Specified by:
eltSetOkin classRubyArray<T extends IRubyObject>
-
entry
rb_ary_entry- Specified by:
entryin classRubyArray<T extends IRubyObject>
-
entry
- Specified by:
entryin classRubyArray<T extends IRubyObject>
-
eltInternal
- Specified by:
eltInternalin classRubyArray<T extends IRubyObject>
-
eltInternalSet
- Specified by:
eltInternalSetin classRubyArray<T extends IRubyObject>
-
fetch_values
- Specified by:
fetch_valuesin classRubyArray<T extends IRubyObject>
-
fetch
rb_ary_fetch- Specified by:
fetchin classRubyArray<T extends IRubyObject>
-
fetch
rb_ary_fetch- Specified by:
fetchin classRubyArray<T extends IRubyObject>
-
aryToAry
rb_ary_to_ary -
insert
-
insert
rb_ary_insert- Specified by:
insertin classRubyArray<T extends IRubyObject>
-
insert
- Specified by:
insertin classRubyArray<T extends IRubyObject>
-
insert
- Specified by:
insertin classRubyArray<T extends IRubyObject>
-
transpose
rb_ary_transpose- Specified by:
transposein classRubyArray<T extends IRubyObject>
-
values_at
rb_values_at- Specified by:
values_atin classRubyArray<T extends IRubyObject>
-
subseq
rb_ary_subseq -
subseq_step
rb_ary_subseq_step -
subseqLight
rb_ary_subseq- Specified by:
subseqLightin classRubyArray<T extends IRubyObject>
-
subseq
- Specified by:
subseqin classRubyArray<T extends IRubyObject>
-
length
rb_ary_length- Specified by:
lengthin classRubyArray<T extends IRubyObject>
-
size
A size method suitable for lambda method reference implementation ofRubyEnumerator.SizeFn.size(ThreadContext, IRubyObject, IRubyObject[])- See Also:
-
append
rb_ary_push - specialized rb_ary_store- Specified by:
appendin classRubyArray<T extends IRubyObject>
-
push
- Specified by:
pushin classRubyArray<T extends IRubyObject>
-
push
- Specified by:
pushin classRubyArray<T extends IRubyObject>
-
pop
rb_ary_pop- Specified by:
popin classRubyArray<T extends IRubyObject>
-
pop
- Specified by:
popin classRubyArray<T extends IRubyObject>
-
shift
rb_ary_shift- Specified by:
shiftin classRubyArray<T extends IRubyObject>
-
shift
- Specified by:
shiftin classRubyArray<T extends IRubyObject>
-
unshift
- Specified by:
unshiftin classRubyArray<T extends IRubyObject>
-
unshift
rb_ary_unshift- Specified by:
unshiftin classRubyArray<T extends IRubyObject>
-
unshift
- Specified by:
unshiftin classRubyArray<T extends IRubyObject>
-
include_p
rb_ary_includes- Specified by:
include_pin classRubyArray<T extends IRubyObject>
-
aref
rb_ary_aref- Specified by:
arefin classRubyArray<T extends IRubyObject>
-
aref
- Specified by:
arefin classRubyArray<T extends IRubyObject>
-
aset
- Specified by:
asetin classRubyArray<T extends IRubyObject>
-
aset
public IRubyObject aset(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) rb_ary_aset- Specified by:
asetin classRubyArray<T extends IRubyObject>
-
at
rb_ary_at- Specified by:
atin classRubyArray<T extends IRubyObject>
-
concat
rb_ary_concat- Specified by:
concatin classRubyArray<T extends IRubyObject>
-
aryAppend
- Specified by:
aryAppendin classRubyArray<T extends IRubyObject>
-
concat
rb_ary_concat_multi- Specified by:
concatin classRubyArray<T extends IRubyObject>
-
concat
- Specified by:
concatin classRubyArray<T extends IRubyObject>
-
inspectAry
inspect_ary -
inspect
rb_ary_inspect- Specified by:
inspectin interfaceIRubyObject- Specified by:
inspectin classRubyArray<T extends IRubyObject>
-
first
- Specified by:
firstin classRubyArray<T extends IRubyObject>
-
first
- Specified by:
firstin classRubyArray<T extends IRubyObject>
-
last
- Specified by:
lastin classRubyArray<T extends IRubyObject>
-
last
rb_ary_last- Specified by:
lastin classRubyArray<T extends IRubyObject>
-
each
mri: rb_ary_each- Specified by:
eachin classRubyArray<T extends IRubyObject>
-
eachSlice
- Specified by:
eachSlicein classRubyArray<T extends IRubyObject>
-
each_slice
- Specified by:
each_slicein classRubyArray<T extends IRubyObject>
-
eachIndex
rb_ary_each_index -
each_index
- Specified by:
each_indexin classRubyArray<T extends IRubyObject>
-
reverseEach
rb_ary_reverse_each -
reverse_each
- Specified by:
reverse_eachin classRubyArray<T extends IRubyObject>
-
joinStrings
-
join
rb_ary_join- Specified by:
joinin classRubyArray<T extends IRubyObject>
-
join
- Specified by:
joinin classRubyArray<T extends IRubyObject>
-
to_a
rb_ary_to_a- Specified by:
to_ain classRubyArray<T extends IRubyObject>
-
to_h
- Specified by:
to_hin classRubyArray<T extends IRubyObject>
-
op_equal
rb_ary_equal- Specified by:
op_equalin interfaceIRubyObject- Specified by:
op_equalin classRubyArray<T extends IRubyObject>
-
compare
- Specified by:
comparein classRubyArray<T extends IRubyObject>
-
eql
rb_ary_eql- Specified by:
eqlin classRubyArray<T extends IRubyObject>
-
compact_bang
rb_ary_compact_bang- Specified by:
compact_bangin classRubyArray<T extends IRubyObject>
-
compact
- Specified by:
compactin classRubyArray<T extends IRubyObject>
-
empty_p
rb_ary_empty_p- Specified by:
empty_pin classRubyArray<T extends IRubyObject>
-
rb_clear
rb_ary_clear- Specified by:
rb_clearin classRubyArray<T extends IRubyObject>
-
fill
- Specified by:
fillin classRubyArray<T extends IRubyObject>
-
fill
- Specified by:
fillin classRubyArray<T extends IRubyObject>
-
fill
- Specified by:
fillin classRubyArray<T extends IRubyObject>
-
fill
public IRubyObject fill(ThreadContext context, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, Block block) - Specified by:
fillin classRubyArray<T extends IRubyObject>
-
fillCommon
-
fillCommon
-
index
rb_ary_index- Specified by:
indexin classRubyArray<T extends IRubyObject>
-
index
- Specified by:
indexin classRubyArray<T extends IRubyObject>
-
index
- Specified by:
indexin classRubyArray<T extends IRubyObject>
-
bsearch
- Specified by:
bsearchin classRubyArray<T extends IRubyObject>
-
bsearch_index
- Specified by:
bsearch_indexin classRubyArray<T extends IRubyObject>
-
rindex
rb_ary_rindex -
rindex
- Specified by:
rindexin classRubyArray<T extends IRubyObject>
-
rindex
- Specified by:
rindexin classRubyArray<T extends IRubyObject>
-
reverse_bang
rb_ary_reverse_bang- Specified by:
reverse_bangin classRubyArray<T extends IRubyObject>
-
reverse
- Specified by:
reversein classRubyArray<T extends IRubyObject>
-
safeReverse
-
collectArray
Collect the contents of this array after filtering through block, or return a new equivalent array if the block is not given (!isGiven()).- Parameters:
context- the current contextblock- a block for filtering or NULL_BLOCK- Returns:
- an array of the filtered or unfiltered results
-
collectEnum
Produce a new enumerator that will filter the contents of this array usingcollectArray(ThreadContext, Block).- Parameters:
context- the current context- Returns:
- an enumerator that will filter results
-
collect
- See Also:
-
rbCollect
rb_ary_collect- Specified by:
rbCollectin classRubyArray<T extends IRubyObject>
-
map
- Specified by:
mapin classRubyArray<T extends IRubyObject>
-
collectBang
rb_ary_collect_bang -
collect_bang
rb_ary_collect_bang- Specified by:
collect_bangin classRubyArray<T extends IRubyObject>
-
map_bang
rb_ary_collect_bang- Specified by:
map_bangin classRubyArray<T extends IRubyObject>
-
selectCommon
rb_ary_select -
select
- Specified by:
selectin classRubyArray<T extends IRubyObject>
-
select_bang
- Specified by:
select_bangin classRubyArray<T extends IRubyObject>
-
keep_if
- Specified by:
keep_ifin classRubyArray<T extends IRubyObject>
-
delete
rb_ary_delete- Specified by:
deletein classRubyArray<T extends IRubyObject>
-
delete_at
rb_ary_delete_at- Specified by:
delete_atin classRubyArray<T extends IRubyObject>
-
delete_at
rb_ary_delete_at_m- Specified by:
delete_atin classRubyArray<T extends IRubyObject>
-
rejectCommon
rb_ary_reject_bang -
reject
- Specified by:
rejectin classRubyArray<T extends IRubyObject>
-
rejectBang
-
reject_bang
- Specified by:
reject_bangin classRubyArray<T extends IRubyObject>
-
deleteIf
rb_ary_delete_if -
delete_if
- Specified by:
delete_ifin classRubyArray<T extends IRubyObject>
-
zip
rb_ary_zip- Specified by:
zipin classRubyArray<T extends IRubyObject>
-
op_cmp
rb_ary_cmp- Specified by:
op_cmpin classRubyArray<T extends IRubyObject>
-
slice_bang
rb_ary_slice_bang- Specified by:
slice_bangin classRubyArray<T extends IRubyObject>
-
slice_bang
rb_ary_slice_bang- Specified by:
slice_bangin classRubyArray<T extends IRubyObject>
-
assoc
rb_ary_assoc- Specified by:
associn classRubyArray<T extends IRubyObject>
-
rassoc
rb_ary_rassoc- Specified by:
rassocin classRubyArray<T extends IRubyObject>
-
flatten
-
flatten_bang
- Specified by:
flatten_bangin classRubyArray<T extends IRubyObject>
-
flatten_bang
- Specified by:
flatten_bangin classRubyArray<T extends IRubyObject>
-
flatten
- Specified by:
flattenin classRubyArray<T extends IRubyObject>
-
flatten
- Specified by:
flattenin classRubyArray<T extends IRubyObject>
-
count
- Specified by:
countin classRubyArray<T extends IRubyObject>
-
count
- Specified by:
countin classRubyArray<T extends IRubyObject>
-
nitems
rb_ary_nitems- Specified by:
nitemsin classRubyArray<T extends IRubyObject>
-
op_plus
rb_ary_plus- Specified by:
op_plusin classRubyArray<T extends IRubyObject>
-
op_times
rb_ary_times- Specified by:
op_timesin classRubyArray<T extends IRubyObject>
-
makeHash
ary_make_hash- Specified by:
makeHashin classRubyArray<T extends IRubyObject>
-
makeHash
- Specified by:
makeHashin classRubyArray<T extends IRubyObject>
-
uniq_bang
rb_ary_uniq_bang -
uniq_bang
- Specified by:
uniq_bangin classRubyArray<T extends IRubyObject>
-
uniq
rb_ary_uniq -
uniq
- Specified by:
uniqin classRubyArray<T extends IRubyObject>
-
op_diff
rb_ary_diff- Specified by:
op_diffin classRubyArray<T extends IRubyObject>
-
difference
rb_ary_difference_multi- Specified by:
differencein classRubyArray<T extends IRubyObject>
-
intersection
- Specified by:
intersectionin classRubyArray<T extends IRubyObject>
-
intersect_p
MRI: rb_ary_intersect_p- Specified by:
intersect_pin classRubyArray<T extends IRubyObject>
-
op_and
MRI: rb_ary_and- Specified by:
op_andin classRubyArray<T extends IRubyObject>
-
op_or
rb_ary_or- Specified by:
op_orin classRubyArray<T extends IRubyObject>
-
union
rb_ary_union_multi- Specified by:
unionin classRubyArray<T extends IRubyObject>
-
unionInternal
rb_ary_union- Specified by:
unionInternalin classRubyArray<T extends IRubyObject>
-
sort
rb_ary_sort- Specified by:
sortin classRubyArray<T extends IRubyObject>
-
sort_bang
rb_ary_sort_bang- Specified by:
sort_bangin classRubyArray<T extends IRubyObject>
-
sortInternal
-
compareFixnums
-
compareOthers
-
sortInternal
-
sort_by_bang
rb_ary_sort_by_bang- Specified by:
sort_by_bangin classRubyArray<T extends IRubyObject>
-
take
rb_ary_take- Specified by:
takein classRubyArray<T extends IRubyObject>
-
take_while
rb_ary_take_while- Specified by:
take_whilein classRubyArray<T extends IRubyObject>
-
drop
rb_ary_take- Specified by:
dropin classRubyArray<T extends IRubyObject>
-
drop_while
rb_ary_take_while- Specified by:
drop_whilein classRubyArray<T extends IRubyObject>
-
cycle
rb_ary_cycle- Specified by:
cyclein classRubyArray<T extends IRubyObject>
-
cycle
rb_ary_cycle- Specified by:
cyclein classRubyArray<T extends IRubyObject>
-
product
rb_ary_product -
product
- Specified by:
productin classRubyArray<T extends IRubyObject>
-
combination
rb_ary_combination- Specified by:
combinationin classRubyArray<T extends IRubyObject>
-
repeatedCombination
- Specified by:
repeatedCombinationin classRubyArray<T extends IRubyObject>
-
permutation
rb_ary_permutation- Specified by:
permutationin classRubyArray<T extends IRubyObject>
-
permutation
- Specified by:
permutationin classRubyArray<T extends IRubyObject>
-
repeated_permutation
- Specified by:
repeated_permutationin classRubyArray<T extends IRubyObject>
-
shuffle_bang
- Specified by:
shuffle_bangin classRubyArray<T extends IRubyObject>
-
shuffle_bang
- Specified by:
shuffle_bangin classRubyArray<T extends IRubyObject>
-
shuffle
- Specified by:
shufflein classRubyArray<T extends IRubyObject>
-
shuffle
- Specified by:
shufflein classRubyArray<T extends IRubyObject>
-
sample
- Specified by:
samplein classRubyArray<T extends IRubyObject>
-
sample
- Specified by:
samplein classRubyArray<T extends IRubyObject>
-
sample
- Specified by:
samplein classRubyArray<T extends IRubyObject>
-
internalRotateBang
-
internalRotate
-
rotate_bang
- Specified by:
rotate_bangin classRubyArray<T extends IRubyObject>
-
rotate_bang
- Specified by:
rotate_bangin classRubyArray<T extends IRubyObject>
-
rotate
- Specified by:
rotatein classRubyArray<T extends IRubyObject>
-
rotate
- Specified by:
rotatein classRubyArray<T extends IRubyObject>
-
all_p
- Specified by:
all_pin classRubyArray<T extends IRubyObject>
-
all_p
- Specified by:
all_pin classRubyArray<T extends IRubyObject>
-
all_pCommon
-
any_p
- Specified by:
any_pin classRubyArray<T extends IRubyObject>
-
any_p
- Specified by:
any_pin classRubyArray<T extends IRubyObject>
-
any_pCommon
-
none_p
- Specified by:
none_pin classRubyArray<T extends IRubyObject>
-
none_p
- Specified by:
none_pin classRubyArray<T extends IRubyObject>
-
none_pCommon
-
one_p
- Specified by:
one_pin classRubyArray<T extends IRubyObject>
-
one_p
- Specified by:
one_pin classRubyArray<T extends IRubyObject>
-
one_pCommon
-
sum
- Specified by:
sumin classRubyArray<T extends IRubyObject>
-
sum
- Specified by:
sumin classRubyArray<T extends IRubyObject>
-
sumCommon
-
find
- Specified by:
findin classRubyArray<T extends IRubyObject>
-
find_index
- Specified by:
find_indexin classRubyArray<T extends IRubyObject>
-
find_index
- Specified by:
find_indexin classRubyArray<T extends IRubyObject>
-
detectCommon
-
newBlankArray
Construct the most efficient array shape for the given size. This should only be used when you intend to populate all elements, since the packed arrays will be born with a nonzero size and would have to be unpacked to partially populate. We nil-fill all cases, to ensure nulls will never leak out if there's an unpopulated element or an index accessed before assignment.- Parameters:
context- the current thread contextsize- the size- Returns:
- a RubyArray shaped for the given size
-
try_convert
-
pack
- Specified by:
packin classRubyArray<T extends IRubyObject>
-
pack
- Specified by:
packin classRubyArray<T extends IRubyObject>
-
dig
- Specified by:
digin classRubyArray<T extends IRubyObject>
-
dig
- Specified by:
digin classRubyArray<T extends IRubyObject>
-
dig
- Specified by:
digin classRubyArray<T extends IRubyObject>
-
dig
- Specified by:
digin classRubyArray<T extends IRubyObject>
-
max
- Specified by:
maxin classRubyArray<T extends IRubyObject>
-
max
- Specified by:
maxin classRubyArray<T extends IRubyObject>
-
min
- Specified by:
minin classRubyArray<T extends IRubyObject>
-
min
- Specified by:
minin classRubyArray<T extends IRubyObject>
-
minmax
- Specified by:
minmaxin classRubyArray<T extends IRubyObject>
-
getJavaClass
Description copied from class:RubyBasicObjectWill return the Java interface that most closely can represent this object, when working through Java integration translations.- Specified by:
getJavaClassin interfaceIRubyObject- Overrides:
getJavaClassin classRubyArray<T extends IRubyObject>- Returns:
- the true Java class of this (Ruby) object
-
copyInto
Copy the values contained in this array into the target array at the specified offset. It is expected that the target array is large enough to hold all necessary values.- Specified by:
copyIntoin classRubyArray<T extends IRubyObject>
-
copyInto
Copy the specified number of values contained in this array into the target array at the specified offset. It is expected that the target array is large enough to hold all necessary values.- Specified by:
copyIntoin classRubyArray<T extends IRubyObject>
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
toArray
-
toArray
-
toJava
Description copied from interface:IRubyObjectConvert the object to the specified Java class, if possible.- Specified by:
toJavain interfaceIRubyObject- Overrides:
toJavain classRubyBasicObject- Type Parameters:
T- type- Parameters:
target- The target type to which the object should be converted.- Returns:
- java type
- See Also:
-
add
-
add
-
remove
-
containsAll
-
addAll
-
addAll
-
removeAll
-
retainAll
-
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
-
iterator
-
listIterator
-
listIterator
-
subList
-
clear
public void clear() -
equals
Description copied from class:RubyObjectThis override does not do a "checked" dispatch.- Specified by:
equalsin interfaceCollection<T extends IRubyObject>- Specified by:
equalsin interfaceList<T extends IRubyObject>- Specified by:
equalsin classRubyArray<T extends IRubyObject>- Parameters:
other- object to compare- Returns:
- true if equals
- See Also:
-
rfind
- Specified by:
rfindin classRubyArray<T extends IRubyObject>
-
rfind
- Specified by:
rfindin classRubyArray<T extends IRubyObject>
-
safeArraySet
protected static IRubyObject safeArraySet(ThreadContext context, IRubyObject[] values, int i, IRubyObject value) -
rubyStream
Returns a stream of each IRubyObject- Specified by:
rubyStreamin classRubyArray<T extends IRubyObject>- Returns:
-