OOscheme.visitor
Class GetMin
java.lang.Object
OOscheme.visitor.GetMin
- All Implemented Interfaces:
- IListAlgo
public class GetMin
- extends Object
- implements IListAlgo
Assumes the AList host contains Integer, computes the minimum of the all
the Integer objects in the host.
Constructor Summary |
private |
GetMin()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Singleton
public static final GetMin Singleton
- Singleton Pattern.
GetMin
private GetMin()
emptyCase
public Object emptyCase(IEmptyList host,
Object... nu)
- Throws an IllegalArgumentException.
- Specified by:
emptyCase
in interface IListAlgo
- Parameters:
host
- an EmptyListnu
- not used
- Returns:
- does not return.
- Throws:
IllegalArgumentException
nonEmptyCase
public Object nonEmptyCase(INEList host,
Object... nu)
- Passes the host's data to the host's rest and asks for help to compute
the minimum element in the host.
- Specified by:
nonEmptyCase
in interface IListAlgo
- Parameters:
host
- an NEListnu
- not used
- Returns:
- Integer