org.jruby
Class RubyArray

java.lang.Object
  extended byorg.jruby.RubyObject
      extended byorg.jruby.RubyArray
All Implemented Interfaces:
java.lang.Cloneable, IRubyObject

public class RubyArray
extends RubyObject

Author:
jpetersen

Field Summary
 
Fields inherited from class org.jruby.RubyObject
runtime
 
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY
 
Method Summary
 RubyArray append(IRubyObject value)
           
 IRubyObject aref(IRubyObject[] args)
          rb_ary_aref
static RubyArray arrayValue(IRubyObject other)
          to_ary
 IRubyObject aset(IRubyObject[] args)
          rb_ary_aset
 IRubyObject assoc(IRubyObject arg)
          rb_ary_assoc
 IRubyObject at(RubyNumeric pos)
          rb_ary_at
 IRubyObject clear()
          rb_ary_clear
 RubyArray collect_bang()
          rb_ary_collect_bang
 RubyArray collect()
          rb_ary_collect
 IRubyObject compact_bang()
          rb_ary_compact_bang
 IRubyObject compact()
          rb_ary_compact
 RubyArray concat(IRubyObject obj)
          rb_ary_concat
static RubyArray create(IRubyObject recv, IRubyObject[] args)
          rb_ary_s_create
static RubyClass createArrayClass(Ruby ruby)
           
 IRubyObject delete_at(IRubyObject obj)
          rb_ary_delete_at
 IRubyObject delete_if()
          rb_ary_delete_if
 IRubyObject delete(IRubyObject obj)
          rb_ary_delete
 IRubyObject each_index()
          rb_ary_each_index
 IRubyObject each()
          rb_ary_each
 IRubyObject empty_p()
          rb_ary_empty_p
 IRubyObject entry(long offset)
          rb_ary_entry
 RubyBoolean eql(IRubyObject obj)
          rb_ary_eql
 RubyBoolean equal(IRubyObject obj)
          rb_ary_equal
 IRubyObject fill(IRubyObject[] args)
          rb_ary_fill
 IRubyObject first()
          rb_ary_first
 IRubyObject flatten_bang()
          rb_ary_flatten_bang
 IRubyObject flatten()
          rb_ary_flatten
 RubyBoolean frozen()
          rb_ary_frozen_p
 int getLength()
           
 java.util.ArrayList getList()
          Getter for property list.
 RubyFixnum hash()
           
 RubyBoolean include_p(IRubyObject item)
           
 boolean includes(IRubyObject item)
           
 IRubyObject index(IRubyObject obj)
          rb_ary_index
 RubyArray indices(IRubyObject[] args)
           
 IRubyObject initialize(IRubyObject[] args)
          rb_ary_initialize
 RubyString inspect()
          rb_ary_inspect
 boolean isTmpLock()
          Getter for property tmpLock.
 RubyString join(IRubyObject[] args)
          rb_ary_join_m
 IRubyObject last()
          rb_ary_last
 RubyFixnum length()
          rb_ary_length
 void marshalTo(MarshalStream output)
          Method marshalTo.
 void modify()
          rb_ary_modify
static RubyArray newArray(Ruby ruby)
          rb_ary_new
static RubyArray newArray(Ruby ruby, java.util.ArrayList list)
           
static RubyArray newArray(Ruby ruby, IRubyObject obj)
           
static RubyArray newArray(Ruby ruby, IRubyObject[] args)
           
static RubyArray newArray(Ruby ruby, IRubyObject car, IRubyObject cdr)
          rb_assoc_new
static RubyArray newArray(Ruby ruby, long len)
          rb_ary_new2
static RubyArray newInstance(IRubyObject recv, IRubyObject[] args)
          rb_ary_s_new
static RubyArray nilArray(Ruby ruby)
           
 IRubyObject nitems()
          rb_ary_nitems
 IRubyObject op_and(IRubyObject other)
          rb_ary_and
 IRubyObject op_cmp(IRubyObject other)
          rb_ary_cmp
 IRubyObject op_diff(IRubyObject other)
          rb_ary_diff
 IRubyObject op_or(IRubyObject other)
          rb_ary_or
 IRubyObject op_plus(IRubyObject other)
          rb_ary_plus
 IRubyObject op_times(IRubyObject arg)
          rb_ary_times
 RubyString pack(IRubyObject obj)
           
 IRubyObject pop()
          rb_ary_pop
 RubyArray push(IRubyObject[] items)
          rb_ary_push_m
 IRubyObject rassoc(IRubyObject arg)
          rb_ary_rassoc
 IRubyObject rbClone()
          rb_ary_clone
 IRubyObject reject_bang()
          rb_ary_reject_bang
 IRubyObject replace(IRubyObject other)
          rb_ary_replace
 void replace(long beg, long len, IRubyObject repl)
          rb_ary_replace
 RubyArray reverse_bang()
          rb_ary_reverse_bang
 IRubyObject reverse_each()
          rb_ary_reverse_each
 IRubyObject reverse()
          rb_ary_reverse_m
 IRubyObject rindex(IRubyObject obj)
          rb_ary_rindex
 void setTmpLock(boolean tmpLock)
          Setter for property tmpLock.
 IRubyObject shift()
          rb_ary_shift
 IRubyObject slice_bang(IRubyObject[] args)
          rb_ary_slice_bang
 IRubyObject sort_bang()
          rb_ary_sort_bang
 RubyArray sort()
          rb_ary_sort
 IRubyObject subseq(long beg, long len)
          rb_ary_subseq
 RubyArray to_a()
          rb_ary_to_a
 RubyString to_s()
          rb_ary_to_s
 IRubyObject[] toJavaArray()
           
 IRubyObject uniq_bang()
          rb_ary_uniq_bang
 IRubyObject uniq()
          rb_ary_uniq
static RubyArray unmarshalFrom(UnmarshalStream input)
           
 RubyArray unshift(IRubyObject item)
          rb_ary_unshift
 RubyArray unshift(IRubyObject[] items)
          rb_ary_unshift_m
 
Methods inherited from class org.jruby.RubyObject
argCount, asSymbol, callbackFactory, callInit, callMethod, callMethod, callMethod, checkSafeString, convertToString, convertToType, convertType, createObjectClass, defineSingletonMethod, display, dup, equals, eval, eval, evalUnder, extend, extendObject, freeze, getInstanceVariable, getInstanceVariables, getJavaClass, getMetaClass, getRuntime, getSingletonClass, getType, hashCode, hasInstanceVariable, id, infectBy, instance_eval, instance_of, instance_variables, instanceVariableNames, isFalse, isFrozen, isKindOf, isNil, isTaint, isTrue, kind_of, makeMetaClass, method_missing, method, methods, nilObject, private_methods, protected_methods, removeInstanceVariable, respond_to, respondsTo, send, setFrozen, setInstanceVariable, setInstanceVariable, setInstanceVariables, setMetaClass, setTaint, setupClone, singleton_methods, singletonMethodsAllowed, specificEval, taint, tainted, toString, type, untaint
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

nilArray

public static RubyArray nilArray(Ruby ruby)

getList

public java.util.ArrayList getList()
Getter for property list.

Returns:
Value of property list.

toJavaArray

public IRubyObject[] toJavaArray()

isTmpLock

public boolean isTmpLock()
Getter for property tmpLock.

Returns:
Value of property tmpLock.

setTmpLock

public void setTmpLock(boolean tmpLock)
Setter for property tmpLock.

Parameters:
tmpLock - New value of property tmpLock.

getLength

public int getLength()

includes

public boolean includes(IRubyObject item)

createArrayClass

public static RubyClass createArrayClass(Ruby ruby)

hash

public RubyFixnum hash()
Overrides:
hash in class RubyObject

modify

public void modify()
rb_ary_modify


entry

public IRubyObject entry(long offset)
rb_ary_entry


unshift

public RubyArray unshift(IRubyObject item)
rb_ary_unshift


subseq

public IRubyObject subseq(long beg,
                          long len)
rb_ary_subseq


replace

public void replace(long beg,
                    long len,
                    IRubyObject repl)
rb_ary_replace


arrayValue

public static RubyArray arrayValue(IRubyObject other)
to_ary


newArray

public static final RubyArray newArray(Ruby ruby,
                                       long len)
rb_ary_new2


newArray

public static final RubyArray newArray(Ruby ruby)
rb_ary_new


newArray

public static RubyArray newArray(Ruby ruby,
                                 IRubyObject obj)

newArray

public static RubyArray newArray(Ruby ruby,
                                 IRubyObject car,
                                 IRubyObject cdr)
rb_assoc_new


newArray

public static final RubyArray newArray(Ruby ruby,
                                       java.util.ArrayList list)

newArray

public static RubyArray newArray(Ruby ruby,
                                 IRubyObject[] args)

newInstance

public static RubyArray newInstance(IRubyObject recv,
                                    IRubyObject[] args)
rb_ary_s_new


create

public static RubyArray create(IRubyObject recv,
                               IRubyObject[] args)
rb_ary_s_create


length

public RubyFixnum length()
rb_ary_length


push

public RubyArray push(IRubyObject[] items)
rb_ary_push_m


append

public RubyArray append(IRubyObject value)

pop

public IRubyObject pop()
rb_ary_pop


shift

public IRubyObject shift()
rb_ary_shift


unshift

public RubyArray unshift(IRubyObject[] items)
rb_ary_unshift_m


include_p

public RubyBoolean include_p(IRubyObject item)

frozen

public RubyBoolean frozen()
rb_ary_frozen_p

Overrides:
frozen in class RubyObject

initialize

public IRubyObject initialize(IRubyObject[] args)
rb_ary_initialize


aref

public IRubyObject aref(IRubyObject[] args)
rb_ary_aref


aset

public IRubyObject aset(IRubyObject[] args)
rb_ary_aset


at

public IRubyObject at(RubyNumeric pos)
rb_ary_at


concat

public RubyArray concat(IRubyObject obj)
rb_ary_concat


inspect

public RubyString inspect()
rb_ary_inspect

Specified by:
inspect in interface IRubyObject
Overrides:
inspect in class RubyObject

first

public IRubyObject first()
rb_ary_first


last

public IRubyObject last()
rb_ary_last


each

public IRubyObject each()
rb_ary_each


each_index

public IRubyObject each_index()
rb_ary_each_index


reverse_each

public IRubyObject reverse_each()
rb_ary_reverse_each


join

public RubyString join(IRubyObject[] args)
rb_ary_join_m


to_s

public RubyString to_s()
rb_ary_to_s

Overrides:
to_s in class RubyObject

to_a

public RubyArray to_a()
rb_ary_to_a

Overrides:
to_a in class RubyObject

equal

public RubyBoolean equal(IRubyObject obj)
rb_ary_equal

Overrides:
equal in class RubyObject

eql

public RubyBoolean eql(IRubyObject obj)
rb_ary_eql


compact_bang

public IRubyObject compact_bang()
rb_ary_compact_bang


compact

public IRubyObject compact()
rb_ary_compact


empty_p

public IRubyObject empty_p()
rb_ary_empty_p


clear

public IRubyObject clear()
rb_ary_clear


fill

public IRubyObject fill(IRubyObject[] args)
rb_ary_fill


index

public IRubyObject index(IRubyObject obj)
rb_ary_index


rindex

public IRubyObject rindex(IRubyObject obj)
rb_ary_rindex


indices

public RubyArray indices(IRubyObject[] args)

rbClone

public IRubyObject rbClone()
rb_ary_clone

Specified by:
rbClone in interface IRubyObject
Overrides:
rbClone in class RubyObject

reverse_bang

public RubyArray reverse_bang()
rb_ary_reverse_bang


reverse

public IRubyObject reverse()
rb_ary_reverse_m


collect

public RubyArray collect()
rb_ary_collect


collect_bang

public RubyArray collect_bang()
rb_ary_collect_bang


delete

public IRubyObject delete(IRubyObject obj)
rb_ary_delete


delete_at

public IRubyObject delete_at(IRubyObject obj)
rb_ary_delete_at


reject_bang

public IRubyObject reject_bang()
rb_ary_reject_bang


delete_if

public IRubyObject delete_if()
rb_ary_delete_if


replace

public IRubyObject replace(IRubyObject other)
rb_ary_replace


op_cmp

public IRubyObject op_cmp(IRubyObject other)
rb_ary_cmp


slice_bang

public IRubyObject slice_bang(IRubyObject[] args)
rb_ary_slice_bang


assoc

public IRubyObject assoc(IRubyObject arg)
rb_ary_assoc


rassoc

public IRubyObject rassoc(IRubyObject arg)
rb_ary_rassoc


flatten_bang

public IRubyObject flatten_bang()
rb_ary_flatten_bang


flatten

public IRubyObject flatten()
rb_ary_flatten


nitems

public IRubyObject nitems()
rb_ary_nitems


op_plus

public IRubyObject op_plus(IRubyObject other)
rb_ary_plus


op_times

public IRubyObject op_times(IRubyObject arg)
rb_ary_times


uniq_bang

public IRubyObject uniq_bang()
rb_ary_uniq_bang


uniq

public IRubyObject uniq()
rb_ary_uniq


op_diff

public IRubyObject op_diff(IRubyObject other)
rb_ary_diff


op_and

public IRubyObject op_and(IRubyObject other)
rb_ary_and


op_or

public IRubyObject op_or(IRubyObject other)
rb_ary_or


sort

public RubyArray sort()
rb_ary_sort


sort_bang

public IRubyObject sort_bang()
rb_ary_sort_bang


marshalTo

public void marshalTo(MarshalStream output)
               throws java.io.IOException
Description copied from interface: IRubyObject
Method marshalTo.

Specified by:
marshalTo in interface IRubyObject
Overrides:
marshalTo in class RubyObject
Throws:
java.io.IOException

unmarshalFrom

public static RubyArray unmarshalFrom(UnmarshalStream input)
                               throws java.io.IOException
Throws:
java.io.IOException

pack

public RubyString pack(IRubyObject obj)
See Also:
Pack.pack(java.util.ArrayList, org.jruby.RubyString)


Copyright © 2002 Jan Arne Petersen. All Rights Reserved.