|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jga.fn.Functor<R> net.sf.jga.fn.UnaryFunctor<T,java.lang.String> net.sf.jga.fn.string.FormatValue<T>
public class FormatValue<T>
Unary Functor that generates a formatted string for a given value.
Copyright © 2003-2005 David A. Hall
Nested Class Summary | |
---|---|
static interface |
FormatValue.Visitor
Interface for classes that may interpret a FormatValue predicate. |
Constructor Summary | |
---|---|
FormatValue(java.text.Format format)
|
Method Summary | |
---|---|
void |
accept(Visitor v)
Calls the Visitor's visit(FormatValue) method, if it
implements the nested Visitor interface. |
java.lang.String |
fn(T arg)
Formats the argument using the java.text.Format given at construction. |
java.text.Format |
getFormat()
Returns the format object used to present values in formatted form. |
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 FormatValue(java.text.Format format)
Method Detail |
---|
public java.text.Format getFormat()
public java.lang.String fn(T arg)
fn
in class UnaryFunctor<T,java.lang.String>
arg
- the value to formatted
public void accept(Visitor v)
visit(FormatValue)
method, if it
implements the nested Visitor interface.
accept
in interface Visitable
accept
in class Functor<java.lang.String>
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 |