de.cau.cs.kieler.sj
Interface CombinationFunction


public interface CombinationFunction

Interface with a single method to combine two values. This class is used to use functions as parameters. This is the standard java closure hack.

Rating red

Field Summary
static CombinationFunction ADD
          Adds two Numbers oldVal + newVal.
static CombinationFunction MAX
          The maximum of all combined values.
static CombinationFunction MIN
          The minimum of all combined values.
static CombinationFunction MULTIPLY
          Multiply two Numbers oldVal * newVal.
 
Method Summary
 Number call(Number oldVal, Number newVal)
          A method with two parameters which should be combined in any way.
 

Field Detail

ADD

static final CombinationFunction ADD
Adds two Numbers oldVal + newVal.


MULTIPLY

static final CombinationFunction MULTIPLY
Multiply two Numbers oldVal * newVal.


MAX

static final CombinationFunction MAX
The maximum of all combined values.


MIN

static final CombinationFunction MIN
The minimum of all combined values.

Method Detail

call

Number call(Number oldVal,
            Number newVal)
A method with two parameters which should be combined in any way.

Parameters:
oldVal - The old value.
newVal - the new value.
Returns:
The result of combine the new and the old value.