public class IteratorClosureAdapter<T>
extends Closure
A closure which stores calls in a List so that method calls can be iterated over in a 'yield' style way
| Fields inherited from class | Fields |
|---|---|
class Closure |
DELEGATE_FIRST, DELEGATE_ONLY, DONE, IDENTITY, OWNER_FIRST, OWNER_ONLY, TO_SELF, maximumNumberOfParameters, parameterTypes |
| Constructor and description |
|---|
IteratorClosureAdapter(Object delegate)Creates an adapter whose owner is delegate. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public List<T> |
asList()Returns the values passed to doCall, in call order. |
|
protected Object |
doCall(T argument)Appends argument to the list returned by asList. |
|
public MetaClass |
getMetaClass() |
|
public void |
setMetaClass(MetaClass metaClass) |
| Methods inherited from class | Name |
|---|---|
class Closure |
additionalReferences, andThen, andThenSelf, andThenSelf, asWritable, call, call, call, checkForReferenceCycle, clone, compose, composeSelf, composeSelf, curry, curry, dehydrate, getDelegate, getDirective, getMaximumNumberOfParameters, getOwner, getParameterTypes, getProperty, getResolveStrategy, getThisObject, isCase, leftShift, leftShift, memoize, memoizeAtLeast, memoizeAtMost, memoizeBetween, mopUnperturbed, ncurry, ncurry, rcurry, rcurry, rehydrate, rightShift, run, setDelegate, setDirective, setMetaClass, setProperty, setResolveStrategy, throwRuntimeException, trampoline, trampoline |
class GroovyObjectSupport |
getMetaClass, setMetaClass |
Creates an adapter whose owner is delegate. Calls are
collected in a list that starts empty.
delegate - closure ownerReturns the values passed to doCall, in call order. Later calls append to the same list.
Appends argument to the list returned by asList.
argument - value yielded by one callnullCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.