Top Description Inners Fields Constructors Methods
org.jruby

public Class RubyEnumerable

extends Object
Class Inheritance
Annotations
@JRubyModule
name:Enumerable
Imports
org.jruby.anno.JRubyMethod, .JRubyModule, org.jruby.api.Access, org.jruby.exceptions.JumpException, .RaiseException, org.jruby.runtime.Block, .BlockBody, .BlockCallback, .CallBlock, .CallBlock19, .CallSite, .ClassIndex, .Helpers, .JavaInternalBlockBody, .JavaSites.EnumerableSites, .Signature, .ThreadContext, .Visibility, org.jruby.runtime.builtin.IRubyObject, .InternalVariables, org.jruby.runtime.callsite.CachingCallSite, .MonomorphicCallSite, org.jruby.util.TypeConverter, org.jruby.util.collections.DoubleObject, .SingleBoolean, .SingleDouble, .SingleInt, .SingleLong, .SingleObject, org.jruby.util.func.ObjectObjectIntFunction, java.util.ArrayList, .Collections, .List, java.util.concurrent.atomic.AtomicInteger

The implementation of Ruby's Enumerable module.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
private static class
public static class
pack-priv static class
public static class
public static class

Field Summary

Modifier and TypeField and Description
private static final int
private static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static IRubyObject
all_p(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
all_p(ThreadContext context, IRubyObject self, IRubyObject arg, final Block block)

public static IRubyObject
all_p(ThreadContext context, IRubyObject self, IRubyObject[] args, final Block block)

public static IRubyObject
all_pCommon(ThreadContext context, IRubyObject self, IRubyObject pattern, final Block block)

public static IRubyObject
all_pCommon(ThreadContext localContext, CallSite each, IRubyObject self, IRubyObject pattern, final Block block)

public static IRubyObject
any_p(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
any_p(ThreadContext context, IRubyObject self, IRubyObject arg, final Block block)

public static IRubyObject
any_p(ThreadContext context, IRubyObject self, IRubyObject[] args, final Block block)

public static IRubyObject
any_pCommon(ThreadContext context, IRubyObject self, IRubyObject pattern, final Block block)

public static IRubyObject
any_pCommon(ThreadContext localContext, CallSite site, IRubyObject self, IRubyObject pattern, final Block block)

public static IRubyObject
callEach(ThreadContext context, IRubyObject self, Signature signature, BlockCallback callback)

public static IRubyObject
callEach(ThreadContext context, CallSite each, IRubyObject self, Signature signature, BlockCallback callback)

public static IRubyObject
callEach(ThreadContext context, CallSite each, IRubyObject self, BlockCallback callback)

public static IRubyObject
callEach(ThreadContext context, CallSite each, IRubyObject self, IRubyObject[] args, Signature signature, BlockCallback callback)

public static IRubyObject
callEach(ThreadContext context, CallSite each, IRubyObject self, IRubyObject arg0, Signature signature, BlockCallback callback)

public static IRubyObject
callEach(ThreadContext context, IRubyObject self, IRubyObject[] args, Signature signature, BlockCallback callback)
Deprecated

public static IRubyObject
callEach(ThreadContext context, IRubyObject self, BlockCallback callback)
Deprecated

public static IRubyObject
chain(ThreadContext context, IRubyObject self, final IRubyObject[] args)

private static void
checkContext(ThreadContext firstContext, ThreadContext secondContext, String name)

public static IRubyObject
chunk(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
collect(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
collect_concat(ThreadContext context, IRubyObject self, final Block block)

private static IRubyObject
collectCommon(ThreadContext context, IRubyObject self, final Block block, String methodName)

public static IRubyObject
public static IRubyObject
count(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
count(ThreadContext context, IRubyObject self, final IRubyObject methodArg, final Block block)

private static IRubyObject
countCommon(ThreadContext context, CallSite each, IRubyObject self, final Block block)

public static RubyModule
public static IRubyObject
cycle(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
cycle(ThreadContext context, IRubyObject self, IRubyObject arg, final Block block)

private static IRubyObject
cycleCommon(ThreadContext context, IRubyObject self, long nv, final Block block)

private static IRubyObject
cycleSize(ThreadContext context, IRubyObject self, IRubyObject[] args)

A cycle size method suitable for lambda method reference implementation of SizeFn#size(ThreadContext, IRubyObject, IRubyObject[])

public static IRubyObject
detect(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
detect(ThreadContext context, IRubyObject self, IRubyObject ifnone, final Block block)

public static IRubyObject
detectCommon(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
detectCommon(ThreadContext context, CallSite each, IRubyObject self, final Block block)

public static IRubyObject
detectCommon(final ThreadContext context, IRubyObject self, IRubyObject ifnone, final Block block)

public static IRubyObject
detectCommon(final ThreadContext context, CallSite each, IRubyObject self, IRubyObject ifnone, final Block block)

public static IRubyObject
drop(ThreadContext context, IRubyObject self, IRubyObject n, final Block block)

public static IRubyObject
drop_while(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
each(ThreadContext context, CallSite site, IRubyObject self, BlockBody body)

public static IRubyObject
each(ThreadContext context, IRubyObject self, BlockBody body)
Deprecated

public static IRubyObject
each_cons(ThreadContext context, IRubyObject self, IRubyObject arg, final Block block)

pack-priv static IRubyObject
each_consCommon(ThreadContext context, IRubyObject self, final int size, final Block block)

public static IRubyObject
each_entry(ThreadContext context, final IRubyObject self, final IRubyObject[] args, final Block block)

public static IRubyObject
each_entryCommon(ThreadContext context, final IRubyObject self, final IRubyObject arg0, final Block block)

public static IRubyObject
each_entryCommon(ThreadContext context, final IRubyObject self, final IRubyObject[] args, final Block block)

public static IRubyObject
each_slice(ThreadContext context, IRubyObject self, IRubyObject arg, final Block block)

pack-priv static IRubyObject
each_sliceCommon(ThreadContext context, IRubyObject self, final int size, final Block block)

public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
private static IRubyObject
public static IRubyObject
public static IRubyObject
each_with_objectCommon(ThreadContext context, IRubyObject self, final Block block, final IRubyObject arg)

private static IRubyObject
eachConsSize(ThreadContext context, IRubyObject self, IRubyObject[] args)

A each_cons size method suitable for lambda method reference implementation of SizeFn#size(ThreadContext, IRubyObject, IRubyObject[])

protected static CachingCallSite
private static IRubyObject
eachSliceSize(ThreadContext context, IRubyObject self, IRubyObject[] args)

A each_slice size method suitable for lambda method reference implementation of SizeFn#size(ThreadContext, IRubyObject, IRubyObject[])

public static IRubyObject
filter_map(ThreadContext context, IRubyObject self, Block block)

public static IRubyObject
find(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
find(ThreadContext context, IRubyObject self, IRubyObject ifnone, final Block block)

public static IRubyObject
find_all(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
find_index(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
find_index(ThreadContext context, IRubyObject self, final IRubyObject cond, final Block block)

public static IRubyObject
find_indexCommon(ThreadContext context, IRubyObject self, final Block block, Signature callbackArity)

public static IRubyObject
find_indexCommon(ThreadContext context, CallSite each, IRubyObject self, final Block block, Signature callbackArity)

public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
first(ThreadContext context, IRubyObject self, final IRubyObject num)

public static IRubyObject
flat_map(ThreadContext context, IRubyObject self, final Block block)

private static IRubyObject
flatMapCommon(ThreadContext context, IRubyObject self, final Block block, String methodName)

public static IRubyObject
grep(ThreadContext context, IRubyObject self, final IRubyObject pattern, final Block block)

private static IRubyObject
grep(ThreadContext context, IRubyObject self, final IRubyObject pattern, final Block block, final boolean isPresent)

public static IRubyObject
group_by(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
include_p(final ThreadContext context, IRubyObject self, final IRubyObject arg)

public static IRubyObject
inject(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
inject(ThreadContext context, IRubyObject self, IRubyObject arg, final Block block)

public static IRubyObject
inject(ThreadContext context, IRubyObject self, IRubyObject init, IRubyObject method, final Block block)

public static IRubyObject
injectCommon(final ThreadContext context, IRubyObject self, IRubyObject init, final Block block)

public static IRubyObject
inverseGrep(ThreadContext context, IRubyObject self, final IRubyObject pattern, final Block block)

public static IRubyObject
map(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
max(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
max(ThreadContext context, IRubyObject self, IRubyObject arg, final Block block)

public static IRubyObject
max_by(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
max_by(ThreadContext context, IRubyObject self, IRubyObject arg, final Block block)

public static IRubyObject
min(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
min(ThreadContext context, IRubyObject self, IRubyObject arg, final Block block)

public static IRubyObject
min_by(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
min_by(ThreadContext context, IRubyObject self, IRubyObject arg, final Block block)

public static IRubyObject
minmax(final ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
minmax_by(final ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
none_p(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
none_p(ThreadContext context, IRubyObject self, IRubyObject arg, final Block block)

public static IRubyObject
none_pCommon(ThreadContext context, IRubyObject self, IRubyObject pattern, final Block block)

public static IRubyObject
none_pCommon(ThreadContext context, CallSite each, IRubyObject self, IRubyObject pattern, final Block block)

public static IRubyObject
one_p(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
one_p(ThreadContext context, IRubyObject self, IRubyObject arg, final Block block)

public static IRubyObject
one_pCommon(ThreadContext context, IRubyObject self, IRubyObject pattern, final Block block)

public static IRubyObject
one_pCommon(ThreadContext context, CallSite each, IRubyObject self, IRubyObject pattern, final Block block)

pack-priv static IRubyObject
packEnumValues(ThreadContext context, IRubyObject[] args)

Package the arguments appropriately depending on how many there are Corresponds to rb_enum_values_pack in MRI

public static IRubyObject
partition(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
reject(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
public static IRubyObject
reverse_each(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block)

private static IRubyObject
public static IRubyObject
select(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
selectCommon(ThreadContext context, IRubyObject self, final Block block, String methodName)

private static IRubyObject
singleExtent(final ThreadContext context, IRubyObject self, final String op, final int sortDirection, final Block block)

private static IRubyObject
singleExtentBy(final ThreadContext context, IRubyObject self, final String op, final int sortDirection, final Block block)

private static JavaSites.EnumerableSites
pack-priv static IRubyObject
size(ThreadContext context, IRubyObject self, IRubyObject[] args)

A size method suitable for lambda method reference implementation of SizeFn#size(ThreadContext, IRubyObject, IRubyObject[])

public static IRubyObject
sort(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
sort_by(final ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
sum(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
sum(ThreadContext context, IRubyObject self, IRubyObject init, final Block block)

public static IRubyObject
sumAdd(final ThreadContext context, IRubyObject lhs, IRubyObject rhs, final SingleDouble c)

public static IRubyObject
sumCommon(final ThreadContext context, IRubyObject self, IRubyObject init, final Block block)

public static IRubyObject
sumCommon(final ThreadContext context, CallSite each, IRubyObject self, IRubyObject init, final Block block)

public static IRubyObject
take(ThreadContext context, IRubyObject self, IRubyObject n, Block block)

public static IRubyObject
take_while(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject

Returns:

an array of the object's elements
takeItems
(ThreadContext
current context
context
,
IRubyObject
object from which to take
enumerable
)

Take all items from the given enumerable and insert them into a new array.

public static IRubyObject
public static IRubyObject
tally(ThreadContext context, IRubyObject self, IRubyObject hashArg)

public static IRubyObject
public static IRubyObject
public static IRubyObject
to_a(ThreadContext context, IRubyObject self, IRubyObject[] args)

public static IRubyObject
to_h(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block)

public static IRubyObject
uniq(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
zip(ThreadContext context, IRubyObject self, final Block block)

public static IRubyObject
zip(ThreadContext context, IRubyObject self, final IRubyObject arg0, final Block block)

public static IRubyObject
zip(ThreadContext context, IRubyObject self, final IRubyObject[] args, final Block block)

public static IRubyObject
zipCommon(ThreadContext context, IRubyObject self, IRubyObject arg0, final Block block)

public static IRubyObject
zipCommon(ThreadContext context, IRubyObject self, IRubyObject[] args, final Block block)

public static IRubyObject
public static IRubyObject
public static IRubyObject
zipCommonAry(ThreadContext context, IRubyObject self, final IRubyObject[] args, final Block block)

public static IRubyObject
zipCommonAry(ThreadContext context, IRubyObject self, final IRubyObject arg0, final Block block)

public static IRubyObject
zipCommonEnum(ThreadContext context, IRubyObject self, final IRubyObject[] args, final Block block)

public static IRubyObject
zipCommonEnum(ThreadContext context, IRubyObject self, final IRubyObject arg0, final Block block)

public static IRubyObject
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait