net.sf.jga.fn.adaptor

Class Identity<T>

public class Identity<T> extends AbstractUnaryFunctor<T,T> implements Serializable

Unary Functor that returns the runtime argument.

Copyright © 2002 David A. Hall

Author: David A. Hall

Nested Class Summary
interfaceIdentity.Visitor
Interface for classes that may interpret an Identity functor.
Method Summary
voidaccept(Visitor v)
Calls the Visitor's visit(Identity) method, if it implements the nested Visitor interface.
Tfn(T x)
Given one argument, returns it.
StringtoString()

Method Detail

accept

public void accept(Visitor v)
Calls the Visitor's visit(Identity) method, if it implements the nested Visitor interface.

fn

public T fn(T x)
Given one argument, returns it.

Returns: x

toString

public String toString()