org.jruby
Class RubyEnumerator.SlicedBlockCallback
java.lang.Object
org.jruby.RubyEnumerator.SlicedBlockCallback
- All Implemented Interfaces:
- BlockCallback
- Enclosing class:
- RubyEnumerator
- public static class RubyEnumerator.SlicedBlockCallback
- extends java.lang.Object
- implements BlockCallback
Block callback for slicing the results of calling the client block
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
slice
protected RubyArray slice
sliceSize
protected final long sliceSize
clientBlock
protected final Block clientBlock
runtime
protected final Ruby runtime
RubyEnumerator.SlicedBlockCallback
public RubyEnumerator.SlicedBlockCallback(Ruby runtime,
Block clientBlock,
long sliceSize)
call
public IRubyObject call(ThreadContext context,
IRubyObject[] args,
Block block)
- Specified by:
call
in interface BlockCallback
hasLeftovers
public boolean hasLeftovers()
- Slice may be over but there weren't enough items to make the slice
yieldLeftovers
public void yieldLeftovers(ThreadContext context)
- Pass slice dregs on to client blcok
Copyright © 2002-2007 JRuby Team. All Rights Reserved.