org.tigris.gef.util
Class FunctorIdentity

java.lang.Object
  extended by org.tigris.gef.util.FunctorIdentity
All Implemented Interfaces:
java.io.Serializable, Functor

public class FunctorIdentity
extends java.lang.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
 java.lang.Object apply(java.lang.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 java.lang.Object apply(java.lang.Object x)
Specified by:
apply in interface Functor