Example usage for org.apache.commons.functor Function interface-usage

List of usage examples for org.apache.commons.functor Function interface-usage

Introduction

In this page you can find the example usage for org.apache.commons.functor Function interface-usage.

Usage

From source file fuzzy.internal.functions.Sum.java

/**
 * Returns the sum of all elements of a collection. In case the collection is empty it
 * returns 0.0 (double).
 *
 * @param <T> numeric type
 * @since 0.2

From source file fuzzy.internal.functions.Max.java

/**
 * Returns the maximum value in a collection. In case the collection is empty it
 * returns 0.0 (double).
 *
 * @param <T> numeric type
 * @since 0.2

From source file fuzzy.internal.functions.Min.java

/**
 * Returns the minimum value in a collection. In case the collection is empty it
 * returns 0.0 (double).
 *
 * @param <T> numeric type
 * @since 0.2

From source file fuzzy.util.CrispFuzzyProduct.java

/**
 * Returns a collection with the product of each crisp value with its
 * equivalent fuzzy result.
 *
 * @param <T> numeric type
 * @since 0.2

From source file org.apache.commons.functor.example.kata.four.Abs.java

/**
 * Evaluates to the absolute Integer value of the Number-valued
 * input parameter.
 *
 * @version $Revision: 1508677 $ $Date: 2013-07-30 19:48:02 -0300 (Tue, 30 Jul 2013) $
 */

From source file org.apache.commons.functor.example.lines.WordCount.java

/**
 * @version $Revision: 1508677 $ $Date: 2013-07-30 19:48:02 -0300 (Tue, 30 Jul 2013) $
 */
public class WordCount implements Function<String, Integer> {
    public Integer evaluate(String obj) {
        return new StringTokenizer(obj).countTokens();

From source file org.apache.commons.functor.example.kata.four.ToInteger.java

/**
 * Converts a String value to an Integer, throwing
 * an exception if no such conversion can be made.
 *
 * Trailing, non-{@link Character#isDigit digit} characters
 * are ignored.

From source file org.apache.commons.functor.example.kata.four.NthColumn.java

/**
 * Evaluates the input String to extrace the nth whitespace
 * delmited column.
 *
 * @version $Revision: 1508677 $ $Date: 2013-07-30 19:48:02 -0300 (Tue, 30 Jul 2013) $
 */

From source file org.apache.commons.functor.example.kata.one.ToMoney.java

/**
 * @version $Revision: 1508677 $ $Date: 2013-07-30 19:48:02 -0300 (Tue, 30 Jul 2013) $
 */
public class ToMoney implements Function<Number, Money> {

    public Money evaluate(Number cents) {