|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.jga.fn.Functor<R>
net.sf.jga.fn.UnaryFunctor<T,T>
net.sf.jga.fn.adaptor.Identity<T>
public class Identity<T>
Unary Functor that returns the runtime argument.
Copyright © 2002-2005 David A. Hall
| Nested Class Summary | |
|---|---|
static class |
Identity.Accessor<T>
A Generator that returns the last value passed to an associated Identity. |
static interface |
Identity.AccessorVisitor
Interface for classes that may interpret an Identity.Accessor. |
static interface |
Identity.Visitor
Interface for classes that may interpret an Identity functor. |
| Constructor Summary | |
|---|---|
Identity()
|
|
| Method Summary | |
|---|---|
void |
accept(Visitor v)
Calls the Visitor's visit(Identity) method, if it
implements the nested Visitor interface. |
Generator<T> |
accessor()
Returns a Generator |
T |
arg()
Returns the last argument that was given, or null if called prior to the first call to fn(). |
T |
fn(T x)
Given one argument, returns it. |
java.lang.String |
toString()
|
| Methods inherited from class net.sf.jga.fn.UnaryFunctor |
|---|
bind, bind0th, bindNth, compose, compose, compose, composeNth, composeNth, eval, generate, generateNth |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Identity()
| Method Detail |
|---|
public T arg()
public Generator<T> accessor()
public T fn(T x)
fn in class UnaryFunctor<T,T>public void accept(Visitor v)
visit(Identity) method, if it
implements the nested Visitor interface.
accept in interface Visitableaccept in class Functor<T>public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||