org.apache.commons.functor.example.kata.four
Class DataMunger
java.lang.Object
org.apache.commons.functor.example.kata.four.DataMunger
public class DataMunger
- extends Object
The real workhorse of this Kata excercise.
DataMunger wires together various functors and exposes them
as static utility methhods.
- Version:
- $Revision: 1171267 $ $Date: 2011-09-15 22:46:08 +0200 (Thu, 15 Sep 2011) $
- Author:
- Rodney Waldhoff
|
Method Summary |
static Object |
process(InputStream file,
int selected,
int col1,
int col2)
See process(Reader,int,int,int) |
static Object |
process(Reader file,
int selected,
int col1,
int col2)
Processes each line of the given Reader, returning the selected column for the
line where the absolute difference between the integer value of col1 and col2
is least. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataMunger
public DataMunger()
process
public static final Object process(InputStream file,
int selected,
int col1,
int col2)
- See
process(Reader,int,int,int)
process
public static final Object process(Reader file,
int selected,
int col1,
int col2)
- Processes each line of the given Reader, returning the selected column for the
line where the absolute difference between the integer value of col1 and col2
is least. Note that lines that don't begin with an Integer are ignored.
Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.