org.apache.commons.functor.example.kata.four
Class ToInteger
java.lang.Object
org.apache.commons.functor.example.kata.four.ToInteger
- All Implemented Interfaces:
- Functor, UnaryFunction<String,Integer>, UnaryFunctor<String>
public final class ToInteger
- extends Object
- implements UnaryFunction<String,Integer>
Converts a String value to an Integer, throwing
an exception if no such conversion can be made.
Trailing, non-digit characters
are ignored.
- Version:
- $Revision: 665786 $ $Date: 2008-06-09 19:17:39 +0200 (Mon, 09 Jun 2008) $
- Author:
- Rodney Waldhoff
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ToInteger
public ToInteger()
evaluate
public Integer evaluate(String str)
- Specified by:
evaluate in interface UnaryFunction<String,Integer>
instance
public static final ToInteger instance()
Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.