org.jruby
Class RubyEnumerable

java.lang.Object
  extended by org.jruby.RubyEnumerable

public class RubyEnumerable
extends java.lang.Object

The implementation of Ruby's Enumerable module.


Nested Class Summary
static class RubyEnumerable.AppendBlockCallback
           
static class RubyEnumerable.ChunkedBlockCallback
           
 
Constructor Summary
RubyEnumerable()
           
 
Method Summary
static IRubyObject all_p(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject all_pCommon(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject any_p(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject any_pCommon(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject callEach(Ruby runtime, ThreadContext context, IRubyObject self, Arity arity, BlockCallback callback)
           
static IRubyObject callEach(Ruby runtime, ThreadContext context, IRubyObject self, BlockCallback callback)
           
static IRubyObject callEach(Ruby runtime, ThreadContext context, IRubyObject self, IRubyObject[] args, Arity arity, BlockCallback callback)
          Deprecated. 
static IRubyObject callEach(Ruby runtime, ThreadContext context, IRubyObject self, IRubyObject[] args, BlockCallback callback)
          Deprecated. 
static IRubyObject callEach19(Ruby runtime, ThreadContext context, IRubyObject self, Arity arity, BlockCallback callback)
           
static IRubyObject callEach19(Ruby runtime, ThreadContext context, IRubyObject self, BlockCallback callback)
           
static IRubyObject checkArgs(Ruby runtime, IRubyObject[] largs)
           
static IRubyObject chunk(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject chunk(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block)
          Deprecated. 
static IRubyObject chunk(ThreadContext context, IRubyObject self, IRubyObject initialState, Block block)
           
static IRubyObject collect_concat19(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject collect(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject collect19(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject collectCommon(ThreadContext context, Ruby runtime, IRubyObject self, RubyArray result, Block block, BlockCallback blockCallback)
           
static IRubyObject count(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject count(ThreadContext context, IRubyObject self, IRubyObject arg, Block block)
           
static RubyModule createEnumerableModule(Ruby runtime)
           
static IRubyObject cycle(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject cycle(ThreadContext context, IRubyObject self, IRubyObject arg, Block block)
           
static IRubyObject detect(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject detect(ThreadContext context, IRubyObject self, IRubyObject ifnone, Block block)
           
static IRubyObject detectCommon(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject detectCommon(ThreadContext context, IRubyObject self, IRubyObject ifnone, Block block)
           
static IRubyObject drop_while(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject drop(ThreadContext context, IRubyObject self, IRubyObject n, Block block)
           
static IRubyObject each_entry(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block)
           
static IRubyObject each_with_index(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject each_with_index19(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block)
           
static IRubyObject each_with_indexCommon(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject each_with_indexCommon19(ThreadContext context, IRubyObject self, Block block, IRubyObject[] args)
           
static IRubyObject enum_with_index(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject find_all(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject find_index(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject find_index(ThreadContext context, IRubyObject self, IRubyObject cond, Block block)
           
static IRubyObject find_indexCommon(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject find_indexCommon(ThreadContext context, IRubyObject self, IRubyObject cond)
           
static IRubyObject find(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject find(ThreadContext context, IRubyObject self, IRubyObject ifnone, Block block)
           
static IRubyObject first(ThreadContext context, IRubyObject self)
           
static IRubyObject first(ThreadContext context, IRubyObject self, IRubyObject num)
           
static IRubyObject flat_map19(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject grep(ThreadContext context, IRubyObject self, IRubyObject pattern, Block block)
           
static IRubyObject group_by(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject include_p(ThreadContext context, IRubyObject self, IRubyObject arg)
           
static IRubyObject inject(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject inject(ThreadContext context, IRubyObject self, IRubyObject arg, Block block)
           
static IRubyObject inject(ThreadContext context, IRubyObject self, IRubyObject init, IRubyObject method, Block block)
           
static IRubyObject injectCommon(ThreadContext context, IRubyObject self, IRubyObject init, Block block)
           
static IRubyObject join(ThreadContext context, IRubyObject self)
           
static IRubyObject join(ThreadContext context, IRubyObject self, IRubyObject sep)
           
static IRubyObject map19(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject max_by(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject max(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject min_by(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject min(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject minmax_by(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject minmax(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject none_p(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject one_p(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject partition(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject partitionCommon(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject reject(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject rejectCommon(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject reverse_each(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject reverse_each(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block)
           
static IRubyObject select(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject selectCommon(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject sort_by(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject sort_byCommon(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject sort(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject take_while(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject take(ThreadContext context, IRubyObject self, IRubyObject n, Block block)
           
static IRubyObject to_a(ThreadContext context, IRubyObject self)
           
static IRubyObject to_a(ThreadContext context, IRubyObject self, IRubyObject[] args)
           
static IRubyObject to_a19(ThreadContext context, IRubyObject self)
           
static IRubyObject to_a19(ThreadContext context, IRubyObject self, IRubyObject[] args)
           
static IRubyObject zip(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block)
           
static IRubyObject zip19(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block)
           
static IRubyObject zipCommon(ThreadContext context, IRubyObject self, IRubyObject[] aArgs, Block block)
           
static IRubyObject zipCommon19(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block)
           
static IRubyObject zipCommonAry(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block)
           
static IRubyObject[] zipCommonConvert(Ruby runtime, IRubyObject[] args)
           
static IRubyObject[] zipCommonConvert(Ruby runtime, IRubyObject[] args, java.lang.String method)
           
static IRubyObject zipCommonEnum(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RubyEnumerable

public RubyEnumerable()
Method Detail

createEnumerableModule

public static RubyModule createEnumerableModule(Ruby runtime)

callEach

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

callEach19

public static IRubyObject callEach19(Ruby runtime,
                                     ThreadContext context,
                                     IRubyObject self,
                                     BlockCallback callback)

callEach

@Deprecated
public static IRubyObject callEach(Ruby runtime,
                                              ThreadContext context,
                                              IRubyObject self,
                                              IRubyObject[] args,
                                              BlockCallback callback)
Deprecated. 


callEach

public static IRubyObject callEach(Ruby runtime,
                                   ThreadContext context,
                                   IRubyObject self,
                                   Arity arity,
                                   BlockCallback callback)

callEach19

public static IRubyObject callEach19(Ruby runtime,
                                     ThreadContext context,
                                     IRubyObject self,
                                     Arity arity,
                                     BlockCallback callback)

callEach

@Deprecated
public static IRubyObject callEach(Ruby runtime,
                                              ThreadContext context,
                                              IRubyObject self,
                                              IRubyObject[] args,
                                              Arity arity,
                                              BlockCallback callback)
Deprecated. 


checkArgs

public static IRubyObject checkArgs(Ruby runtime,
                                    IRubyObject[] largs)

count

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

count

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

cycle

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

cycle

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

take

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

take_while

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

drop

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

drop_while

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

first

public static IRubyObject first(ThreadContext context,
                                IRubyObject self)

first

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

to_a

public static IRubyObject to_a(ThreadContext context,
                               IRubyObject self)

to_a

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

to_a19

public static IRubyObject to_a19(ThreadContext context,
                                 IRubyObject self)

to_a19

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

sort

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

sort_byCommon

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

sort_by

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

grep

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

detectCommon

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

detectCommon

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

detect

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

detect

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

find

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

find

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

find_index

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

find_index

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

find_indexCommon

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

find_indexCommon

public static IRubyObject find_indexCommon(ThreadContext context,
                                           IRubyObject self,
                                           IRubyObject cond)

selectCommon

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

select

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

find_all

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

rejectCommon

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

reject

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

collect

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

collect19

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

map19

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

collectCommon

public static IRubyObject collectCommon(ThreadContext context,
                                        Ruby runtime,
                                        IRubyObject self,
                                        RubyArray result,
                                        Block block,
                                        BlockCallback blockCallback)

flat_map19

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

collect_concat19

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

injectCommon

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

inject

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

inject

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

inject

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

partitionCommon

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

partition

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

each_with_indexCommon

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

each_with_indexCommon19

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

each_with_index

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

each_with_index19

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

enum_with_index

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

each_entry

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

reverse_each

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

reverse_each

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

include_p

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

max

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

max_by

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

min

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

min_by

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

minmax

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

minmax_by

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

none_p

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

one_p

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

all_p

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

all_pCommon

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

any_p

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

any_pCommon

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

zip

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

zip19

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

zipCommonConvert

public static IRubyObject[] zipCommonConvert(Ruby runtime,
                                             IRubyObject[] args)

zipCommonConvert

public static IRubyObject[] zipCommonConvert(Ruby runtime,
                                             IRubyObject[] args,
                                             java.lang.String method)

zipCommon

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

zipCommon19

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

zipCommonAry

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

zipCommonEnum

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

group_by

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

chunk

@Deprecated
public static IRubyObject chunk(ThreadContext context,
                                           IRubyObject self,
                                           IRubyObject[] args,
                                           Block block)
Deprecated. 


chunk

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

chunk

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

join

public static IRubyObject join(ThreadContext context,
                               IRubyObject self)

join

public static IRubyObject join(ThreadContext context,
                               IRubyObject self,
                               IRubyObject sep)


Copyright © 2002-2009 JRuby Team. All Rights Reserved.