org.springframework.core.closure.support
Class AbstractClosure
java.lang.Object
org.springframework.core.closure.support.AlgorithmsAccessor
org.springframework.core.closure.support.AbstractClosure
- All Implemented Interfaces:
- Serializable, Closure
- Direct Known Subclasses:
- AbstractBinaryClosure, Block, NoArgBlock, StringLength, StringTrimmer
public abstract class AbstractClosure
- extends AlgorithmsAccessor
- implements Closure, Serializable
Convenience implementation for the closure interface. Extends
AlgorithmsAccessorSupport for convenient execution of various data structure
processing algorithms taking advantage of closures and constraints.
- Author:
- Keith Donald
- See Also:
- Serialized Form
Method Summary |
void |
forEach(Collection collection)
Execute this closure for each element in the provided collection. |
void |
forEach(Iterator it)
Execute this closure for each element traversable via the provided
iterator. |
Methods inherited from class org.springframework.core.closure.support.AlgorithmsAccessor |
allTrue, allTrue, anyTrue, anyTrue, findAll, findAll, findFirst, findFirst, forEach, forEach, getAlgorithms |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.core.closure.Closure |
call |
AbstractClosure
public AbstractClosure()
forEach
public final void forEach(Collection collection)
- Execute this closure for each element in the provided collection.
- Parameters:
collection
- The collection
forEach
public final void forEach(Iterator it)
- Execute this closure for each element traversable via the provided
iterator.
- Parameters:
it
- The iterator
Copyright © 2004-2008 The Spring Framework. All Rights Reserved.