org.apache.commons.functor.example.kata.four
Class Abs

java.lang.Object
  extended by org.apache.commons.functor.example.kata.four.Abs
All Implemented Interfaces:
Functor, UnaryFunction<Number,Integer>, UnaryFunctor<Number>

public final class Abs
extends Object
implements UnaryFunction<Number,Integer>

Evaluates to the absolute Integer value of the Number-valued input parameter.

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

Constructor Summary
Abs()
           
 
Method Summary
 Integer evaluate(Number num)
           
static Abs 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

Abs

public Abs()
Method Detail

evaluate

public Integer evaluate(Number num)
Specified by:
evaluate in interface UnaryFunction<Number,Integer>

instance

public static final Abs instance()


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