org.springframework.rules.closure
Class Minimum
java.lang.Object
org.springframework.core.closure.support.AlgorithmsAccessor
org.springframework.core.closure.support.AbstractClosure
org.springframework.rules.closure.AbstractBinaryClosure
org.springframework.rules.closure.Minimum
- All Implemented Interfaces:
- Serializable, Closure, BinaryClosure
public class Minimum
- extends AbstractBinaryClosure
Returns the maximum of two Comparable
objects; with nulls regarded a
being less than non null.
- Author:
- Keith Donald
- See Also:
- Serialized Form
Methods inherited from class org.springframework.core.closure.support.AlgorithmsAccessor |
allTrue, allTrue, anyTrue, anyTrue, findAll, findAll, findFirst, findFirst, forEach, forEach, getAlgorithms |
Minimum
public Minimum()
instance
public static final BinaryClosure instance()
- Returns the shared instance--this is possible as the default functor for
this class is immutable and stateless.
- Returns:
- the shared instance
call
public Object call(Object comparable1,
Object comparable2)
- Return the minimum of two Comparable objects.
- Parameters:
comparable1
- the first comparablecomparable2
- the second comparable
- Returns:
- the minimum
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2004-2008 The Spring Framework. All Rights Reserved.