org.springframework.core.closure.support
Class AbstractClosure

java.lang.Object
  extended by org.springframework.core.closure.support.AlgorithmsAccessor
      extended by 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

Constructor Summary
AbstractClosure()
           
 
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
 

Constructor Detail

AbstractClosure

public AbstractClosure()
Method Detail

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.