|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jruby.RubyBasicObject
org.jruby.RubyObject
org.jruby.RubyArray
public class RubyArray
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.
| Nested Class Summary | |
|---|---|
class |
RubyArray.RubyArrayConversionIterator
|
| Nested classes/interfaces inherited from class org.jruby.RubyObject |
|---|
RubyObject.Data |
| Nested classes/interfaces inherited from class org.jruby.RubyBasicObject |
|---|
RubyBasicObject.Finalizer |
| Field Summary | |
|---|---|
static int |
ARRAY_DEFAULT_SIZE
|
| Fields inherited from class org.jruby.RubyObject |
|---|
OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATOR |
| Fields inherited from class org.jruby.RubyBasicObject |
|---|
ALL_F, BASICOBJECT_ALLOCATOR, COMPARE_BY_IDENTITY_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, metaClass, NEVER, NIL_F, TAINTED_F, UNDEF, UNTRUSTED_F, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, USER8_F |
| Fields inherited from interface org.jruby.runtime.builtin.IRubyObject |
|---|
NULL_ARRAY |
| Methods inherited from class org.jruby.RubyObject |
|---|
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, convertToType, createObjectClass, eqlInternal, equalInternal, equals, hashCode, initialize, op_eqq, puts, specificEval, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
equals, hashCode |
| Field Detail |
|---|
public static final int ARRAY_DEFAULT_SIZE
| Method Detail |
|---|
public static RubyClass createArrayClass(Ruby runtime)
public int getNativeTypeIndex()
RubyObject
getNativeTypeIndex in interface CoreObjectTypegetNativeTypeIndex in class RubyObjectorg.jruby.runtime.ClassInde
public static IRubyObject create(IRubyObject klass,
IRubyObject[] args,
Block block)
public static final RubyArray newArray(Ruby runtime,
long len)
public static final RubyArray newArrayLight(Ruby runtime,
long len)
public static final RubyArray newArray(Ruby runtime,
int len)
public static final RubyArray newArrayLight(Ruby runtime,
int len)
public static final RubyArray newArray(Ruby runtime)
public static final RubyArray newArrayLight(Ruby runtime)
public static RubyArray newArray(Ruby runtime,
IRubyObject obj)
public static RubyArray newArrayLight(Ruby runtime,
IRubyObject obj)
public static RubyArray newArrayLight(Ruby runtime,
IRubyObject... objs)
public static RubyArray newArray(Ruby runtime,
IRubyObject car,
IRubyObject cdr)
public static RubyArray newEmptyArray(Ruby runtime)
public static RubyArray newArray(Ruby runtime,
IRubyObject[] args)
public static RubyArray newArrayNoCopy(Ruby runtime,
IRubyObject[] args)
public static RubyArray newArrayNoCopy(Ruby runtime,
IRubyObject[] args,
int begin)
public static RubyArray newArrayNoCopy(Ruby runtime,
IRubyObject[] args,
int begin,
int length)
public static RubyArray newArrayNoCopyLight(Ruby runtime,
IRubyObject[] args)
public static RubyArray newArray(Ruby runtime,
java.util.Collection<? extends IRubyObject> collection)
public java.util.List getList()
public int getLength()
public void setRArray(RArray rarray)
public RArray getRArray()
public IRubyObject[] toJavaArray()
public IRubyObject[] toJavaArrayUnsafe()
public IRubyObject[] toJavaArrayMaybeUnsafe()
public IRubyObject initialize(ThreadContext context,
IRubyObject[] args,
Block block)
public IRubyObject initialize(ThreadContext context,
Block block)
public IRubyObject initialize(ThreadContext context,
IRubyObject arg0,
Block block)
public IRubyObject initialize(ThreadContext context,
IRubyObject arg0,
IRubyObject arg1,
Block block)
public IRubyObject initialize_copy(IRubyObject orig)
initialize_copy in class RubyBasicObjectpublic IRubyObject dup()
dup in interface IRubyObjectdup in class RubyBasicObjectpublic IRubyObject replace(IRubyObject orig)
public IRubyObject to_s()
to_s in class RubyBasicObject
public boolean includes(ThreadContext context,
IRubyObject item)
public RubyFixnum hash(ThreadContext context)
public RubyFixnum hash19(ThreadContext context)
public final IRubyObject store(long index,
IRubyObject value)
public final IRubyObject eltOk(long offset)
public final IRubyObject entry(long offset)
public final IRubyObject entry(int offset)
public final IRubyObject eltInternal(int offset)
public final IRubyObject eltInternalSet(int offset,
IRubyObject item)
public IRubyObject fetch(ThreadContext context,
IRubyObject[] args,
Block block)
public IRubyObject fetch(ThreadContext context,
IRubyObject arg0,
Block block)
public IRubyObject fetch(ThreadContext context,
IRubyObject arg0,
IRubyObject arg1,
Block block)
public IRubyObject insert()
public IRubyObject insert(IRubyObject arg)
public IRubyObject insert19(IRubyObject arg)
public IRubyObject insert(IRubyObject arg1,
IRubyObject arg2)
public IRubyObject insert19(IRubyObject arg1,
IRubyObject arg2)
public IRubyObject insert(IRubyObject[] args)
public IRubyObject insert19(IRubyObject[] args)
public final RubyArray aryDup()
public RubyArray transpose()
public IRubyObject values_at(IRubyObject[] args)
public IRubyObject subseq(long beg,
long len)
public IRubyObject subseqLight(long beg,
long len)
public RubyFixnum length()
public RubyArray append(IRubyObject item)
public RubyArray push_m(IRubyObject[] items)
public RubyArray push_m19(IRubyObject[] items)
public IRubyObject pop(ThreadContext context)
public IRubyObject pop(ThreadContext context,
IRubyObject num)
public IRubyObject shift(ThreadContext context)
public IRubyObject shift(ThreadContext context,
IRubyObject num)
public IRubyObject unshift()
public IRubyObject unshift19()
public IRubyObject unshift(IRubyObject item)
public IRubyObject unshift19(IRubyObject item)
public IRubyObject unshift(IRubyObject[] items)
public IRubyObject unshift19(IRubyObject[] items)
public RubyBoolean include_p(ThreadContext context,
IRubyObject item)
public RubyBoolean frozen_p(ThreadContext context)
frozen_p in class RubyBasicObjectpublic IRubyObject aref(IRubyObject[] args)
public IRubyObject aref(IRubyObject arg0)
public IRubyObject aref19(IRubyObject arg0)
public IRubyObject aref(IRubyObject arg0,
IRubyObject arg1)
public IRubyObject aref19(IRubyObject arg0,
IRubyObject arg1)
public IRubyObject aset(IRubyObject[] args)
public IRubyObject aset(IRubyObject arg0,
IRubyObject arg1)
public IRubyObject aset19(IRubyObject arg0,
IRubyObject arg1)
public IRubyObject aset(IRubyObject arg0,
IRubyObject arg1,
IRubyObject arg2)
public IRubyObject aset19(IRubyObject arg0,
IRubyObject arg1,
IRubyObject arg2)
public IRubyObject at(IRubyObject pos)
public RubyArray concat(IRubyObject obj)
public RubyArray concat19(IRubyObject obj)
public IRubyObject inspect()
inspect in interface IRubyObjectinspect in class RubyBasicObjectpublic IRubyObject first(IRubyObject[] args)
public IRubyObject first()
public IRubyObject first(IRubyObject arg0)
public IRubyObject last(IRubyObject[] args)
public IRubyObject last()
public IRubyObject last(IRubyObject arg0)
public IRubyObject eachCommon(ThreadContext context,
Block block)
public IRubyObject each(ThreadContext context,
Block block)
public IRubyObject eachSlice(ThreadContext context,
int size,
Block block)
public IRubyObject each_slice(ThreadContext context,
IRubyObject arg,
Block block)
public IRubyObject eachIndex(ThreadContext context,
Block block)
public IRubyObject each_index(ThreadContext context,
Block block)
public IRubyObject reverseEach(ThreadContext context,
Block block)
public IRubyObject reverse_each(ThreadContext context,
Block block)
public IRubyObject join(ThreadContext context,
IRubyObject sep)
public IRubyObject join(ThreadContext context)
public IRubyObject join19(ThreadContext context,
IRubyObject sep)
public IRubyObject join19(ThreadContext context)
public RubyArray to_a()
to_a in class RubyBasicObjectpublic IRubyObject to_ary()
public RubyArray convertToArray()
RubyBasicObject
convertToArray in interface IRubyObjectconvertToArray in class RubyBasicObjectpublic IRubyObject checkArrayType()
RubyBasicObject
checkArrayType in interface IRubyObjectcheckArrayType in class RubyBasicObject
public IRubyObject op_equal(ThreadContext context,
IRubyObject obj)
op_equal in interface IRubyObjectop_equal in class RubyBasicObject
public RubyBoolean compare(ThreadContext context,
java.lang.String method,
IRubyObject other,
java.util.Set<RecursiveComparator.Pair> seen)
public IRubyObject eql(ThreadContext context,
IRubyObject obj)
public IRubyObject compact_bang()
public IRubyObject compact()
public IRubyObject empty_p()
public IRubyObject rb_clear()
public IRubyObject fill(ThreadContext context,
Block block)
public IRubyObject fill(ThreadContext context,
IRubyObject arg,
Block block)
public IRubyObject fill(ThreadContext context,
IRubyObject arg1,
IRubyObject arg2,
Block block)
public IRubyObject fill(ThreadContext context,
IRubyObject arg1,
IRubyObject arg2,
IRubyObject arg3,
Block block)
public IRubyObject index(ThreadContext context,
IRubyObject obj)
public IRubyObject index(ThreadContext context,
IRubyObject obj,
Block unused)
public IRubyObject index(ThreadContext context,
Block block)
public IRubyObject rindex(ThreadContext context,
IRubyObject obj)
public IRubyObject rindex(ThreadContext context,
IRubyObject obj,
Block unused)
public IRubyObject rindex(ThreadContext context,
Block block)
public IRubyObject indexes(IRubyObject[] args)
public IRubyObject reverse_bang()
public IRubyObject reverse()
public IRubyObject collect(ThreadContext context,
Block block)
public IRubyObject collect19(ThreadContext context,
Block block)
public RubyArray collectBang(ThreadContext context,
Block block)
public IRubyObject collect_bang(ThreadContext context,
Block block)
public IRubyObject map_bang(ThreadContext context,
Block block)
public IRubyObject selectCommon(ThreadContext context,
Block block)
public IRubyObject select(ThreadContext context,
Block block)
public IRubyObject select_bang(ThreadContext context,
Block block)
public IRubyObject keep_if(ThreadContext context,
Block block)
public IRubyObject delete(ThreadContext context,
IRubyObject item,
Block block)
public IRubyObject delete_at(IRubyObject obj)
public IRubyObject rejectCommon(ThreadContext context,
Block block)
public IRubyObject reject(ThreadContext context,
Block block)
public IRubyObject rejectBang(ThreadContext context,
Block block)
public IRubyObject reject_bang(ThreadContext context,
Block block)
public IRubyObject deleteIf(ThreadContext context,
Block block)
public IRubyObject delete_if(ThreadContext context,
Block block)
public IRubyObject zip(ThreadContext context,
IRubyObject[] args,
Block block)
public IRubyObject op_cmp(ThreadContext context,
IRubyObject obj)
op_cmp in class RubyBasicObjectpublic IRubyObject slice_bang(IRubyObject[] args)
public IRubyObject slice_bang(IRubyObject arg0)
public IRubyObject slice_bang(IRubyObject arg0,
IRubyObject arg1)
public IRubyObject assoc(ThreadContext context,
IRubyObject key)
public IRubyObject rassoc(ThreadContext context,
IRubyObject value)
public IRubyObject flatten_bang(ThreadContext context)
public IRubyObject flatten_bang19(ThreadContext context)
public IRubyObject flatten_bang(ThreadContext context,
IRubyObject arg)
public IRubyObject flatten_bang19(ThreadContext context,
IRubyObject arg)
public IRubyObject flatten(ThreadContext context)
public IRubyObject flatten(ThreadContext context,
IRubyObject arg)
public IRubyObject flatten19(ThreadContext context)
public IRubyObject flatten19(ThreadContext context,
IRubyObject arg)
public IRubyObject count(ThreadContext context,
Block block)
public IRubyObject count(ThreadContext context,
IRubyObject obj,
Block block)
public IRubyObject nitems()
public IRubyObject op_plus(IRubyObject obj)
public IRubyObject op_times(ThreadContext context,
IRubyObject times)
public IRubyObject op_times19(ThreadContext context,
IRubyObject times)
public IRubyObject uniq_bang(ThreadContext context)
public IRubyObject uniq_bang19(ThreadContext context,
Block block)
public IRubyObject uniq(ThreadContext context)
public IRubyObject uniq19(ThreadContext context,
Block block)
public IRubyObject op_diff(IRubyObject other)
public IRubyObject op_and(IRubyObject other)
public IRubyObject op_or(IRubyObject other)
public RubyArray sort(ThreadContext context,
Block block)
public RubyArray sort19(ThreadContext context,
Block block)
public IRubyObject sort_bang(ThreadContext context,
Block block)
public IRubyObject sort_bang19(ThreadContext context,
Block block)
public IRubyObject sort_by_bang(ThreadContext context,
Block block)
public IRubyObject take(ThreadContext context,
IRubyObject n)
public IRubyObject take_while(ThreadContext context,
Block block)
public IRubyObject drop(ThreadContext context,
IRubyObject n)
public IRubyObject drop_while(ThreadContext context,
Block block)
public IRubyObject cycle(ThreadContext context,
Block block)
public IRubyObject cycle(ThreadContext context,
IRubyObject arg,
Block block)
public IRubyObject product(ThreadContext context,
IRubyObject[] args)
public IRubyObject product19(ThreadContext context,
IRubyObject[] args,
Block block)
public IRubyObject combination(ThreadContext context,
IRubyObject num,
Block block)
public IRubyObject repeatedCombination(ThreadContext context,
IRubyObject num,
Block block)
public IRubyObject permutation(ThreadContext context,
IRubyObject num,
Block block)
public IRubyObject permutation(ThreadContext context,
Block block)
public IRubyObject repeated_permutation(ThreadContext context,
IRubyObject num,
Block block)
public IRubyObject repeated_permutation(ThreadContext context,
Block block)
public IRubyObject choice(ThreadContext context)
public IRubyObject shuffle_bang(ThreadContext context)
public IRubyObject shuffle_bang(ThreadContext context,
IRubyObject[] args)
public IRubyObject shuffle(ThreadContext context)
public IRubyObject shuffle(ThreadContext context,
IRubyObject[] args)
public IRubyObject sample(ThreadContext context,
IRubyObject[] args)
public IRubyObject sample(ThreadContext context,
IRubyObject nv)
public IRubyObject rotate_bang(ThreadContext context)
public IRubyObject rotate_bang(ThreadContext context,
IRubyObject cnt)
public IRubyObject rotate(ThreadContext context)
public IRubyObject rotate(ThreadContext context,
IRubyObject cnt)
public IRubyObject all_p(ThreadContext context,
Block block)
public IRubyObject any_p(ThreadContext context,
Block block)
public IRubyObject find(ThreadContext context,
IRubyObject ifnone,
Block block)
public IRubyObject find_index(ThreadContext context,
Block block)
public IRubyObject find_index(ThreadContext context,
IRubyObject cond)
public IRubyObject detectCommon(ThreadContext context,
IRubyObject ifnone,
Block block)
public static void marshalTo(RubyArray array,
MarshalStream output)
throws java.io.IOException
java.io.IOException
public static RubyArray unmarshalFrom(UnmarshalStream input)
throws java.io.IOException
java.io.IOException
public static IRubyObject try_convert(ThreadContext context,
IRubyObject self,
IRubyObject arg)
public RubyString pack(ThreadContext context,
IRubyObject obj)
Pack.pack(org.jruby.Ruby, org.jruby.RubyArray, org.jruby.util.ByteList, boolean)
public RubyString pack19(ThreadContext context,
IRubyObject obj)
public java.lang.Class getJavaClass()
RubyBasicObject
getJavaClass in interface IRubyObjectgetJavaClass in class RubyBasicObjectpublic int size()
size in interface java.util.Collectionsize in interface java.util.Listpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.Listpublic boolean contains(java.lang.Object element)
contains in interface java.util.Collectioncontains in interface java.util.Listpublic java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.Listpublic java.lang.Object[] toArray(java.lang.Object[] arg)
toArray in interface java.util.CollectiontoArray in interface java.util.Listpublic java.lang.Object toJava(java.lang.Class target)
IRubyObject
toJava in interface IRubyObjecttoJava in class RubyBasicObjecttarget - The target type to which the object should be converted.IRubyObject.toJavapublic boolean add(java.lang.Object element)
add in interface java.util.Collectionadd in interface java.util.Listpublic boolean remove(java.lang.Object element)
remove in interface java.util.Collectionremove in interface java.util.Listpublic boolean containsAll(java.util.Collection c)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.Listpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.CollectionaddAll in interface java.util.List
public boolean addAll(int index,
java.util.Collection c)
addAll in interface java.util.Listpublic boolean removeAll(java.util.Collection c)
removeAll in interface java.util.CollectionremoveAll in interface java.util.Listpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.CollectionretainAll in interface java.util.Listpublic java.lang.Object get(int index)
get in interface java.util.List
public java.lang.Object set(int index,
java.lang.Object element)
set in interface java.util.List
public void add(int index,
java.lang.Object element)
add in interface java.util.Listpublic java.lang.Object remove(int index)
remove in interface java.util.Listpublic int indexOf(java.lang.Object element)
indexOf in interface java.util.Listpublic int lastIndexOf(java.lang.Object element)
lastIndexOf in interface java.util.Listpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Listpublic java.util.ListIterator listIterator()
listIterator in interface java.util.Listpublic java.util.ListIterator listIterator(int index)
listIterator in interface java.util.List
public java.util.List subList(int fromIndex,
int toIndex)
subList in interface java.util.Listpublic void clear()
clear in interface java.util.Collectionclear in interface java.util.List
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||