Logo Search packages:      
Sourcecode: jruby1.0 version File versions

org::jruby::RubyArray Class Reference

Inheritance diagram for org::jruby::RubyArray:

org::jruby::RubyObject org::jruby::runtime::builtin::IRubyObject

List of all members.


Detailed Description

The implementation of the built-in class Array in Ruby.

Definition at line 66 of file RubyArray.java.


Public Member Functions

void add (int index, Object element)
boolean add (Object element)
boolean addAll (int index, Collection c)
boolean addAll (Collection c)
void addFinalizer (RubyProc finalizer)
IRubyObject anyToString ()
RubyArray append (IRubyObject item)
IRubyObject aref (IRubyObject[] args)
IRubyObject aset (IRubyObject[] args)
IRubyObject assoc (IRubyObject key)
RubyString asString ()
String asSymbol ()
IRubyObject at (IRubyObject pos)
void attachToObjectSpace ()
void callInit (IRubyObject[] args, Block block)
IRubyObject callMethod (ThreadContext context, String name, IRubyObject arg)
IRubyObject callMethod (ThreadContext context, String name, Block block)
IRubyObject callMethod (ThreadContext context, int methodIndex, String name)
IRubyObject callMethod (ThreadContext context, String name)
IRubyObject callMethod (ThreadContext context, RubyModule rubyclass, String name, IRubyObject[] args, CallType callType, Block block)
IRubyObject callMethod (ThreadContext context, RubyModule rubyclass, int methodIndex, String name, IRubyObject[] args, CallType callType)
IRubyObject callMethod (ThreadContext context, int methodIndex, String name, IRubyObject[] args, CallType callType)
IRubyObject callMethod (ThreadContext context, int methodIndex, String name, IRubyObject[] args)
IRubyObject callMethod (ThreadContext context, int methodIndex, String name, IRubyObject arg)
IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args, CallType callType, Block block)
IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args, CallType callType)
IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args, Block block)
IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args)
IRubyObject callMethod (ThreadContext context, RubyModule rubyclass, int methodIndex, String name, IRubyObject[] args, CallType callType, Block block)
IRubyObject callSuper (ThreadContext context, IRubyObject[] args, Block block)
IRubyObject checkArrayType ()
IRubyObject checkStringType ()
void clear ()
RubyArray collect (Block block)
RubyArray collect_bang (Block block)
IRubyObject compact ()
IRubyObject compact_bang ()
IRubyObject compilerCallMethod (ThreadContext context, String name, IRubyObject[] args, IRubyObject self, CallType callType, Block block)
IRubyObject compilerCallMethodWithIndex (ThreadContext context, int methodIndex, String name, IRubyObject[] args, IRubyObject self, CallType callType, Block block)
RubyArray concat (IRubyObject obj)
boolean contains (Object element)
boolean containsAll (Collection c)
RubyArray convertToArray ()
RubyFloat convertToFloat ()
RubyHash convertToHash ()
RubyInteger convertToInteger ()
RubyString convertToString ()
IRubyObject convertToType (RubyClass targetType, int convertMethodIndex, String convertMethod, boolean raiseOnMissingMethod, boolean raiseOnWrongTypeResult, boolean allowNilThrough)
IRubyObject convertToType (RubyClass targetType, int convertMethodIndex, boolean raise)
IRubyObject convertToType (RubyClass targetType, int convertMethodIndex, String convertMethod, boolean raise)
IRubyObject convertToTypeWithCheck (RubyClass targetType, int convertMethodIndex, String convertMethod)
synchronized Object dataGetStruct ()
synchronized void dataWrapStruct (Object obj)
IRubyObject delete (IRubyObject item, Block block)
IRubyObject delete_at (IRubyObject obj)
IRubyObject delete_if (Block block)
IRubyObject display (IRubyObject[] args)
IRubyObject dup ()
IRubyObject each (Block block)
IRubyObject each_index (Block block)
final IRubyObject eltInternal (int offset)
final IRubyObject eltInternalSet (int offset, IRubyObject item)
IRubyObject empty_p ()
final IRubyObject entry (int offset)
final IRubyObject entry (long offset)
boolean eql (IRubyObject other)
RubyBoolean eql_p (IRubyObject obj)
final boolean eqlInternal (final ThreadContext context, final IRubyObject other)
IRubyObject equal (IRubyObject other)
final IRubyObject equalInternal (final ThreadContext context, final IRubyObject other)
boolean equals (Object other)
IRubyObject evalSimple (ThreadContext context, IRubyObject src, String file)
IRubyObject evalUnder (RubyModule under, IRubyObject src, IRubyObject file, IRubyObject line)
IRubyObject evalWithBinding (ThreadContext context, IRubyObject src, IRubyObject scope, String file)
IRubyObject extend (IRubyObject[] args)
IRubyObject fetch (IRubyObject[] args, Block block)
IRubyObject fill (IRubyObject[] args, Block block)
IRubyObject first (IRubyObject[] args)
IRubyObject flatten ()
IRubyObject flatten_bang ()
IRubyObject freeze ()
RubyBoolean frozen ()
Object get (int index)
IRubyObject getInstanceVariable (String name)
Map getInstanceVariables ()
Map getInstanceVariablesSnapshot ()
Class getJavaClass ()
int getLength ()
List getList ()
final RubyClass getMetaClass ()
int getNativeTypeIndex ()
Ruby getRuntime ()
RubyClass getSingletonClass ()
RubyClass getSingletonClassClone ()
RubyClass getType ()
RubyFixnum hash ()
int hashCode ()
synchronized RubyFixnum id ()
synchronized RubyFixnum id_deprecated ()
RubyBoolean include_p (IRubyObject item)
boolean includes (IRubyObject item)
IRubyObject index (IRubyObject obj)
IRubyObject indexes (IRubyObject[] args)
int indexOf (Object element)
IRubyObject infectBy (IRubyObject obj)
IRubyObject inherited (IRubyObject arg, Block block)
IRubyObject initialize (IRubyObject[] args, Block block)
IRubyObject initialize_copy (IRubyObject original)
IRubyObject insert (IRubyObject[] args)
IRubyObject inspect ()
IRubyObject instance_eval (IRubyObject[] args, Block block)
IRubyObject instance_exec (IRubyObject[] args, Block block)
RubyBoolean instance_of (IRubyObject type)
IRubyObject instance_variable_get (IRubyObject var)
IRubyObject instance_variable_set (IRubyObject var, IRubyObject value)
RubyArray instance_variables ()
Iterator instanceVariableNames ()
boolean isEmpty ()
final boolean isFalse ()
boolean isFrozen ()
boolean isImmediate ()
boolean isKindOf (RubyModule type)
boolean isNil ()
boolean isSingleton ()
boolean isTaint ()
final boolean isTrue ()
Iterator iterator ()
RubyString join (IRubyObject sep)
RubyString join_m (IRubyObject[] args)
RubyBoolean kind_of (IRubyObject type)
IRubyObject last (IRubyObject[] args)
int lastIndexOf (Object element)
RubyFixnum length ()
ListIterator listIterator (int index)
ListIterator listIterator ()
RubyClass makeMetaClass (RubyClass superClass, SinglyLinkedList parentCRef)
IRubyObject match (IRubyObject arg)
IRubyObject method (IRubyObject symbol)
IRubyObject method_missing (IRubyObject[] args, Block block)
IRubyObject methods (IRubyObject[] args)
IRubyObject nil_p ()
IRubyObject nitems ()
IRubyObject obj_equal (IRubyObject obj)
IRubyObject op_and (IRubyObject other)
IRubyObject op_cmp (IRubyObject obj)
IRubyObject op_diff (IRubyObject other)
IRubyObject op_equal (IRubyObject obj)
IRubyObject op_or (IRubyObject other)
IRubyObject op_plus (IRubyObject obj)
IRubyObject op_times (IRubyObject times)
RubyString pack (IRubyObject obj)
IRubyObject pop ()
IRubyObject private_methods ()
IRubyObject protected_methods ()
IRubyObject public_methods (IRubyObject[] args)
RubyArray push_m (IRubyObject[] items)
IRubyObject rassoc (IRubyObject value)
IRubyObject rb_clear ()
IRubyObject rbClone (Block unusedBlock)
IRubyObject reject (Block block)
IRubyObject reject_bang (Block block)
Object remove (int index)
boolean remove (Object element)
IRubyObject remove_instance_variable (IRubyObject name, Block block)
boolean removeAll (Collection c)
void removeFinalizers ()
IRubyObject removeInstanceVariable (String name)
IRubyObject replace (IRubyObject orig)
RubyBoolean respond_to (IRubyObject[] args)
boolean respondsTo (String name)
boolean retainAll (Collection c)
IRubyObject reverse ()
IRubyObject reverse_bang ()
IRubyObject reverse_each (Block block)
IRubyObject rindex (IRubyObject obj)
 RubyArray (Ruby runtime, RubyClass klass)
 RubyArray (Ruby runtime, long length, IRubyObject[] vals)
Map safeGetInstanceVariables ()
boolean safeHasInstanceVariables ()
RubyArray select (Block block)
IRubyObject send (IRubyObject[] args, Block block)
Object set (int index, Object element)
void setFrozen (boolean frozen)
IRubyObject setInstanceVariable (String name, IRubyObject value)
IRubyObject setInstanceVariable (String name, IRubyObject value, String taintError, String freezeError)
void setInstanceVariables (Map instanceVariables)
void setMetaClass (RubyClass metaClass)
void setTaint (boolean taint)
IRubyObject shift ()
RubyArray singleton_methods (IRubyObject[] args)
int size ()
IRubyObject slice_bang (IRubyObject[] args)
RubyArray sort (Block block)
RubyArray sort_bang (Block block)
IRubyObject specificEval (RubyModule mod, IRubyObject[] args, Block block)
final IRubyObject store (long index, IRubyObject value)
List subList (int fromIndex, int toIndex)
IRubyObject subseq (long beg, long len)
IRubyObject subseqLight (long beg, long len)
IRubyObject taint ()
RubyBoolean tainted ()
RubyArray to_a ()
IRubyObject to_ary ()
IRubyObject to_s ()
Object[] toArray (final Object[] arg)
Object[] toArray ()
IRubyObject[] toJavaArray ()
IRubyObject[] toJavaArrayMaybeUnsafe ()
IRubyObject[] toJavaArrayUnsafe ()
String toString ()
RubyArray transpose ()
RubyClass type ()
RubyClass type_deprecated ()
IRubyObject uniq ()
IRubyObject uniq_bang ()
RubyArray unshift (IRubyObject item)
RubyArray unshift_m (IRubyObject[] items)
IRubyObject untaint ()
IRubyObject values_at (IRubyObject[] args)
IRubyObject zip (IRubyObject[] args, Block block)

Static Public Member Functions

static IRubyObject callMethodMissingIfNecessary (ThreadContext context, IRubyObject receiver, DynamicMethod method, String name, IRubyObject[] args, IRubyObject self, CallType callType, Block block)
static IRubyObject create (IRubyObject klass, IRubyObject[] args, Block block)
static RubyClass createArrayClass (Ruby runtime)
static RubyClass createObjectClass (Ruby runtime, RubyClass objectClass)
static void initCopy (IRubyObject clone, IRubyObject original)
static void marshalTo (RubyArray array, MarshalStream output) throws IOException
static RubyArray newArray (Ruby runtime, Collection collection)
static RubyArray newArray (Ruby runtime, IRubyObject[] args)
static RubyArray newArray (Ruby runtime, IRubyObject car, IRubyObject cdr)
static RubyArray newArray (Ruby runtime, IRubyObject obj)
static final RubyArray newArray (final Ruby runtime)
static final RubyArray newArray (final Ruby runtime, final long len)
static final RubyArray newArrayLight (final Ruby runtime)
static final RubyArray newArrayLight (final Ruby runtime, final long len)
static RubyArray newArrayNoCopy (Ruby runtime, IRubyObject[] args)
static RubyArray newArrayNoCopyLight (Ruby runtime, IRubyObject[] args)
static void puts (Object obj)
static String trueFalseNil (String v)
static String trueFalseNil (IRubyObject v)
static RubyArray unmarshalFrom (UnmarshalStream input) throws IOException

Static Public Attributes

static final byte AREF_SWITCHVALUE = 2
static final int ARRAY_DEFAULT_SIZE = 16
static final byte ASET_SWITCHVALUE = 3
static final byte AT_SWITCHVALUE = 12
static final byte EMPTY_P_SWITCHVALUE = 10
static final byte EQUALEQUAL_SWITCHVALUE = 7
static final byte HASH_SWITCHVALUE = 15
static final byte LAST_SWITCHVALUE = 19
static final byte LENGTH_SWITCHVALUE = 18
static final IRubyObject NEVER = new RubyObject()
static final byte NIL_P_SWITCHVALUE = 6
static final IRubyObject[] NULL_ARRAY = new IRubyObject[0]
static ObjectAllocator OBJECT_ALLOCATOR
static final byte OP_LSHIFT_SWITCHVALUE = 9
static final byte OP_PLUS_SWITCHVALUE = 1
static final byte OP_SPACESHIP_SWITCHVALUE = 17
static final byte OP_TIMES_SWITCHVALUE = 16
static final byte POP_SWITCHVALUE = 4
static final byte PUSH_SWITCHVALUE = 5
static final byte SHIFT_SWITCHVALUE = 20
static final byte TO_A_SWITCHVALUE = 14
static final byte TO_ARY_SWITCHVALUE = 13
static final byte TO_S_SWITCHVALUE = 11
static final byte UNSHIFT_SWITCHVALUE = 8

Protected Member Functions

void checkFrozen ()
IRubyObject doClone ()
void testFrozen (String message)

Protected Attributes

Map instanceVariables
boolean isTrue = true
RubyClass metaClass

Private Member Functions

final void alloc (int length)
final RubyArray aryDup ()
final void checkLength (long length)
final IRubyObject delete_at (int pos)
final IRubyObject elt (int offset)
final IRubyObject elt (long offset)
final IRubyObject elt_f (int offset)
final IRubyObject elt_f (long offset)
final int flatten (int index, RubyArray ary2, RubyArray memo)
final IRubyObject inspectJoin (IRubyObject sep)
final Set makeSet (RubyArray ary2)
final RubyArray makeShared (int beg, int len, RubyClass klass, boolean objectSpace)
final void modify ()
final void modifyCheck ()
final void realloc (int newLength)
final IRubyObject[] reserve (int length)
 RubyArray (Ruby runtime, RubyClass klass, RubyArray original)
 RubyArray (Ruby runtime, RubyClass klass, boolean objectSpace)
 RubyArray (Ruby runtime, RubyClass klass, long length, boolean objectspace)
 RubyArray (Ruby runtime, RubyClass klass, long length)
 RubyArray (Ruby runtime, RubyClass klass, int length)
 RubyArray (Ruby runtime)
 RubyArray (Ruby runtime, boolean objectSpace)
 RubyArray (Ruby runtime, long length, boolean objectspace)
 RubyArray (Ruby runtime, long length)
 RubyArray (Ruby runtime, IRubyObject[] vals)
final void splice (long beg, long len, IRubyObject rpl)
final IRubyObject values_at (long olen, IRubyObject[] args)

Static Private Member Functions

static RubyArray aryToAry (IRubyObject obj)

Private Attributes

int begin = 0
int realLength = 0
boolean shared = false
boolean tmpLock = false
IRubyObject[] values

Static Private Attributes

static ObjectAllocator ARRAY_ALLOCATOR

Classes

class  BlockComparator
class  DefaultComparator
class  RubyArrayConversionIterator
class  RubyArrayConversionListIterator

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index