Top Description Fields Constructors Methods
org.jruby.specialized

public Class RubyArrayOneObject

extends RubyArraySpecialized
Class Inheritance
Imports
org.jcodings.specific.USASCIIEncoding, org.jruby.Ruby, .RubyArray, .RubyClass, .RubyString, org.jruby.javasupport.JavaUtil, org.jruby.runtime.Block, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.util.io.EncodingUtils

One object version of RubyArraySpecialized.

Field Summary

Modifier and TypeField and Description
private IRubyObject
Inherited from org.jruby.specialized.RubyArraySpecialized:
MAX_PACKED_SIZE

Constructor Summary

AccessConstructor and Description
public
public
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public RubyArray<?>
aryDup()

Overrides org.jruby.RubyArray.aryDup.

rb_ary_dup

public RubyArray<?>
collectArray(ThreadContext
the current context
context
,
Block
a block for filtering or NULL_BLOCK
block
)

Overrides org.jruby.RubyArray.collectArray.

Collect the contents of this array after filtering through block, or return a new equivalent array if the block is not given (!isGiven()).

public void
copyInto(ThreadContext context, IRubyObject[] target, int start)

Overrides org.jruby.RubyArray.copyInto.

Copy the values contained in this array into the target array at the specified offset.

public void
copyInto(ThreadContext context, IRubyObject[] target, int start, int len)

Overrides org.jruby.RubyArray.copyInto.

Copy the specified number of values contained in this array into the target array at the specified offset.

protected RubyArray<?>
dupImpl(Ruby runtime, RubyClass metaClass)

Overrides org.jruby.RubyArray.dupImpl.

public final IRubyObject
public final IRubyObject
protected void
public boolean
public int
indexOf(Object
element to search for
element
)

Overrides org.jruby.RubyArray.indexOf.

Implements java.util.List.indexOf.

Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.

protected IRubyObject
protected IRubyObject
protected IRubyObject
protected RubyArray<?>
makeShared()

Overrides org.jruby.RubyArray.makeShared.

rb_ary_make_shared

public IRubyObject
op_plus(ThreadContext context, IRubyObject obj)

Overrides org.jruby.RubyArray.op_plus.

rb_ary_plus

public IRubyObject
rb_clear(ThreadContext context)

Overrides org.jruby.RubyArray.rb_clear.

rb_ary_clear

public IRubyObject
replace(ThreadContext context, IRubyObject orig)

Overrides org.jruby.RubyArray.replace.

rb_ary_replace

public IRubyObject
reverse_bang(ThreadContext context)

Overrides org.jruby.RubyArray.reverse_bang.

rb_ary_reverse_bang

protected RubyArray<?>
protected IRubyObject
protected IRubyObject
sortInternal(final ThreadContext context, boolean honorOverride)

Overrides org.jruby.RubyArray.sortInternal.

protected void
storeInternal(final int index, final IRubyObject value)
Deprecated

protected void
storeInternal(ThreadContext context, final int index, final IRubyObject value)

Overrides org.jruby.RubyArray.storeInternal.

public IRubyObject
subseq(RubyClass metaClass, long beg, long len, boolean light)

Overrides org.jruby.RubyArray.subseq.

public IRubyObject[]
toJavaArray(ThreadContext context)

Overrides org.jruby.RubyArray.toJavaArray.

Return a Java array copy of the elements contained in this Array.

public IRubyObject
uniq(ThreadContext context)

Overrides org.jruby.RubyArray.uniq.

rb_ary_uniq

Inherited from org.jruby.specialized.RubyArraySpecialized:
packedunpack

Field Detail

valueback to summary
private IRubyObject value

Constructor Detail

RubyArrayOneObjectback to summary
public RubyArrayOneObject(Ruby runtime, IRubyObject value)
RubyArrayOneObjectback to summary
public RubyArrayOneObject(RubyClass otherClass, IRubyObject value)
RubyArrayOneObjectback to summary
pack-priv RubyArrayOneObject(RubyArrayOneObject other)
RubyArrayOneObjectback to summary
pack-priv RubyArrayOneObject(RubyClass metaClass, RubyArrayOneObject other)

Method Detail

aryDupback to summary
public RubyArray<?> aryDup()

Overrides org.jruby.RubyArray.aryDup.

Doc from org.jruby.RubyArray.aryDup.

rb_ary_dup

Annotations
@Override
collectArrayback to summary
public RubyArray<?> collectArray(ThreadContext context, Block block)

Overrides org.jruby.RubyArray.collectArray.

Doc from org.jruby.RubyArray.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:ThreadContext

the current context

block:Block

a block for filtering or NULL_BLOCK

Returns:RubyArray<?>

an array of the filtered or unfiltered results

Annotations
@Override
copyIntoback to summary
public void copyInto(ThreadContext context, IRubyObject[] target, int start)

Overrides org.jruby.RubyArray.copyInto.

Doc from org.jruby.RubyArray.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.

Annotations
@Override
copyIntoback to summary
public void copyInto(ThreadContext context, IRubyObject[] target, int start, int len)

Overrides org.jruby.RubyArray.copyInto.

Doc from org.jruby.RubyArray.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.

Annotations
@Override
dupImplback to summary
protected RubyArray<?> dupImpl(Ruby runtime, RubyClass metaClass)

Overrides org.jruby.RubyArray.dupImpl.

Annotations
@Override
eltInternalback to summary
public final IRubyObject eltInternal(int index)

Overrides org.jruby.RubyArray.eltInternal.

Annotations
@Override
eltInternalSetback to summary
public final IRubyObject eltInternalSet(int index, IRubyObject value)

Overrides org.jruby.RubyArray.eltInternalSet.

Annotations
@Override
finishUnpackback to summary
protected void finishUnpack(IRubyObject nil)

Implements abstract org.jruby.specialized.RubyArraySpecialized.finishUnpack.

Annotations
@Override
includesback to summary
public boolean includes(ThreadContext context, IRubyObject item)

Overrides org.jruby.RubyArray.includes.

Annotations
@Override
indexOfback to summary
public int indexOf(Object element)

Overrides org.jruby.RubyArray.indexOf.

Implements java.util.List.indexOf.

Doc from java.util.List.indexOf.

Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element. More formally, returns the lowest index i such that Objects.equals(o, get(i)), or -1 if there is no such index.

Parameters
element:Object

element to search for

Returns:int

the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element

Annotations
@Override
inspectAryback to summary
protected IRubyObject inspectAry(ThreadContext context)

Overrides org.jruby.RubyArray.inspectAry.

Doc from org.jruby.RubyArray.inspectAry.

inspect_ary

Annotations
@Override
internalRotateback to summary
protected IRubyObject internalRotate(ThreadContext context, int cnt)

Overrides org.jruby.RubyArray.internalRotate.

Annotations
@Override
internalRotateBangback to summary
protected IRubyObject internalRotateBang(ThreadContext context, int cnt)

Overrides org.jruby.RubyArray.internalRotateBang.

Annotations
@Override
makeSharedback to summary
protected RubyArray<?> makeShared()

Overrides org.jruby.RubyArray.makeShared.

Doc from org.jruby.RubyArray.makeShared.

rb_ary_make_shared

Annotations
@Override
op_plusback to summary
public IRubyObject op_plus(ThreadContext context, IRubyObject obj)

Overrides org.jruby.RubyArray.op_plus.

Doc from org.jruby.RubyArray.op_plus.

rb_ary_plus

Annotations
@Override
rb_clearback to summary
public IRubyObject rb_clear(ThreadContext context)

Overrides org.jruby.RubyArray.rb_clear.

Doc from org.jruby.RubyArray.rb_clear.

rb_ary_clear

Annotations
@Override
replaceback to summary
public IRubyObject replace(ThreadContext context, IRubyObject orig)

Overrides org.jruby.RubyArray.replace.

Doc from org.jruby.RubyArray.replace.

rb_ary_replace

Annotations
@Override
reverse_bangback to summary
public IRubyObject reverse_bang(ThreadContext context)

Overrides org.jruby.RubyArray.reverse_bang.

Doc from org.jruby.RubyArray.reverse_bang.

rb_ary_reverse_bang

Annotations
@Override
safeReverseback to summary
protected RubyArray<?> safeReverse()

Overrides org.jruby.RubyArray.safeReverse.

Annotations
@Override
sortInternalback to summary
protected IRubyObject sortInternal(ThreadContext context, Block block)

Overrides org.jruby.RubyArray.sortInternal.

Annotations
@Override
sortInternalback to summary
protected IRubyObject sortInternal(final ThreadContext context, boolean honorOverride)

Overrides org.jruby.RubyArray.sortInternal.

Annotations
@Override
storeInternalback to summary
protected void storeInternal(final int index, final IRubyObject value)

Deprecated

Annotations
@Deprecated
storeInternalback to summary
protected void storeInternal(ThreadContext context, final int index, final IRubyObject value)

Overrides org.jruby.RubyArray.storeInternal.

Annotations
@Override
subseqback to summary
public IRubyObject subseq(RubyClass metaClass, long beg, long len, boolean light)

Overrides org.jruby.RubyArray.subseq.

Annotations
@Override
toJavaArrayback to summary
public IRubyObject[] toJavaArray(ThreadContext context)

Overrides org.jruby.RubyArray.toJavaArray.

Doc from org.jruby.RubyArray.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.

Returns:IRubyObject[]

a Java array with exactly the size and contents of this RubyArray's elements

Annotations
@Override
uniqback to summary
public IRubyObject uniq(ThreadContext context)

Overrides org.jruby.RubyArray.uniq.

Doc from org.jruby.RubyArray.uniq.

rb_ary_uniq

Annotations
@Override