uci.util
Class FunctorIdentity

java.lang.Object
  |
  +--uci.util.FunctorIdentity

public class FunctorIdentity
extends Object
implements Functor

A useful implementation of interface Functor that simply returns the same object that was passed to it. Use this class when you want to use a method that takes a Functor, but you do not actually want to apply any function.

See Also:
Serialized Form

Constructor Summary
FunctorIdentity()
           
 
Method Summary
 Object apply(Object x)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctorIdentity

public FunctorIdentity()
Method Detail

apply

public Object apply(Object x)
Specified by:
apply in interface Functor