org.apache.commons.functor.example.kata.one
Class ToMoney

java.lang.Object
  extended by org.apache.commons.functor.example.kata.one.ToMoney
All Implemented Interfaces:
Functor, UnaryFunction<Number,Money>, UnaryFunctor<Number>

public class ToMoney
extends Object
implements UnaryFunction<Number,Money>

Version:
$Revision: 665786 $ $Date: 2008-06-09 19:17:39 +0200 (Mon, 09 Jun 2008) $
Author:
Rodney Waldhoff

Constructor Summary
ToMoney()
           
 
Method Summary
 Money evaluate(Number cents)
           
static
<X> UnaryFunction<X,Money>
from(UnaryFunction<? super X,? extends Number> fn)
           
static ToMoney instance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.functor.Functor
equals, hashCode, toString
 

Constructor Detail

ToMoney

public ToMoney()
Method Detail

evaluate

public Money evaluate(Number cents)
Specified by:
evaluate in interface UnaryFunction<Number,Money>

instance

public static ToMoney instance()

from

public static <X> UnaryFunction<X,Money> from(UnaryFunction<? super X,? extends Number> fn)


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.