Class FunctorIdentity

  extended by org.tigris.gef.util.FunctorIdentity
All Implemented Interfaces:, 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
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


public FunctorIdentity()
Method Detail


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