info.javelot.functionalj.util
Class Operators

java.lang.Object
  extended by info.javelot.functionalj.util.Operators

public final class Operators
extends Object

Contains function definitions for common operators.

Author:
Copyright © 2006 Frederic Daoud

Field Summary
static Function2<Integer,Integer,Integer> add
          Function that corresponds to the + operator.
static Function2<Boolean,Boolean,Boolean> and
          Function that corresponds to the && operator.
static Function2<String,String,String> concat
          Function that corresponds to the + operator as it pertains to concatenating two Strings.
static Function2<Integer,Integer,Integer> divide
          Function that corresponds to the / operator.
static Function2<Integer,Integer,Integer> max
          Function that corresponds to the Math.max(int, int) method.
static Function2<Integer,Integer,Integer> min
          Function that corresponds to the Math.min(int, int) method.
static Function2<Integer,Integer,Integer> multiply
          Function that corresponds to the * operator.
static Function1<Boolean,Boolean> not
          Function that corresponds to the boolean 'not' operator.
static Function2<Boolean,Boolean,Boolean> or
          Function that corresponds to the || operator.
static Function2<Integer,Integer,Integer> subtract
          Function that corresponds to the - operator.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

add

public static final Function2<Integer,Integer,Integer> add
Function that corresponds to the + operator.


multiply

public static final Function2<Integer,Integer,Integer> multiply
Function that corresponds to the * operator.


subtract

public static final Function2<Integer,Integer,Integer> subtract
Function that corresponds to the - operator.


divide

public static final Function2<Integer,Integer,Integer> divide
Function that corresponds to the / operator.


min

public static final Function2<Integer,Integer,Integer> min
Function that corresponds to the Math.min(int, int) method.


max

public static final Function2<Integer,Integer,Integer> max
Function that corresponds to the Math.max(int, int) method.


and

public static final Function2<Boolean,Boolean,Boolean> and
Function that corresponds to the && operator.


or

public static final Function2<Boolean,Boolean,Boolean> or
Function that corresponds to the || operator.


not

public static final Function1<Boolean,Boolean> not
Function that corresponds to the boolean 'not' operator. This is represented by * the symbol '!'.


concat

public static final Function2<String,String,String> concat
Function that corresponds to the + operator as it pertains to concatenating two Strings.