ca.odell.glazedlists.calculation
Class Calculations

java.lang.Object
  extended by ca.odell.glazedlists.calculation.Calculations

public final class Calculations
extends Object


Method Summary
static Calculation<Integer> count(EventList elements)
          A Calculation that reports the number of elements as an Integer.
static
<E> Calculation<Integer>
count(EventList<E> elements, Matcher<E> matcher)
          A Calculation that reports the number of elements that satisfy the given matcher as an Integer.
static Calculation<Double> divideDoubles(Calculation<? extends Number> numerator, Calculation<? extends Number> denominator)
          A Calculation that divides the numerator by the denominator as Doubles.
static Calculation<Float> divideFloats(Calculation<? extends Number> numerator, Calculation<? extends Number> denominator)
          A Calculation that divides the numerator by the denominator as Floats.
static
<E> Calculation<E>
elementAt(EventList<E> elements, int index, E defaultValue)
          A Calculation that value at the given index in the given elements.
static Calculation<Boolean> manyElements(EventList elements)
          A Calculation that reports true when the number of elements is > 1; false otherwise.
static Calculation<Double> meanDoubles(EventList<? extends Number> numbers)
          A Calculation that reports the mean average of all the numbers as a Double.
static Calculation<Float> meanFloats(EventList<? extends Number> numbers)
          A Calculation that reports the mean average of all the numbers as a Float.
static Calculation<Boolean> oneElement(EventList elements)
          A Calculation that reports true when the number of elements is 1; false otherwise.
static Calculation<Boolean> oneOrMoreElements(EventList elements)
          A Calculation that reports true when the number of elements is > 0; false otherwise.
static Calculation<Double> subtractDoubles(Calculation<? extends Number> a, Calculation<? extends Number> b)
          A Calculation that subtracts b from a as Doubles.
static Calculation<Float> subtractFloats(Calculation<? extends Number> a, Calculation<? extends Number> b)
          A Calculation that subtracts b from a as Floats.
static Calculation<Integer> subtractIntegers(Calculation<? extends Number> a, Calculation<? extends Number> b)
          A Calculation that subtracts b from a as Integers.
static Calculation<Long> subtractLongs(Calculation<? extends Number> a, Calculation<? extends Number> b)
          A Calculation that subtracts b from a as Longs.
static Calculation<Double> sumDoubles(EventList<? extends Number> numbers)
          A Calculation that sums the given numbers as a Double.
static Calculation<Float> sumFloats(EventList<? extends Number> numbers)
          A Calculation that sums the given numbers as a Float.
static Calculation<Integer> sumIntegers(EventList<? extends Number> numbers)
          A Calculation that sums the given numbers as an Integer.
static Calculation<Long> sumLongs(EventList<? extends Number> numbers)
          A Calculation that sums the given numbers as a Long.
static Calculation<Boolean> zeroElements(EventList elements)
          A Calculation that reports true when the number of elements is 0; false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

count

public static Calculation<Integer> count(EventList elements)
A Calculation that reports the number of elements as an Integer.


count

public static <E> Calculation<Integer> count(EventList<E> elements,
                                             Matcher<E> matcher)
A Calculation that reports the number of elements that satisfy the given matcher as an Integer.


zeroElements

public static Calculation<Boolean> zeroElements(EventList elements)
A Calculation that reports true when the number of elements is 0; false otherwise.


oneElement

public static Calculation<Boolean> oneElement(EventList elements)
A Calculation that reports true when the number of elements is 1; false otherwise.


oneOrMoreElements

public static Calculation<Boolean> oneOrMoreElements(EventList elements)
A Calculation that reports true when the number of elements is > 0; false otherwise.


manyElements

public static Calculation<Boolean> manyElements(EventList elements)
A Calculation that reports true when the number of elements is > 1; false otherwise.


sumFloats

public static Calculation<Float> sumFloats(EventList<? extends Number> numbers)
A Calculation that sums the given numbers as a Float.


sumDoubles

public static Calculation<Double> sumDoubles(EventList<? extends Number> numbers)
A Calculation that sums the given numbers as a Double.


sumIntegers

public static Calculation<Integer> sumIntegers(EventList<? extends Number> numbers)
A Calculation that sums the given numbers as an Integer.


sumLongs

public static Calculation<Long> sumLongs(EventList<? extends Number> numbers)
A Calculation that sums the given numbers as a Long.


divideFloats

public static Calculation<Float> divideFloats(Calculation<? extends Number> numerator,
                                              Calculation<? extends Number> denominator)
A Calculation that divides the numerator by the denominator as Floats.


divideDoubles

public static Calculation<Double> divideDoubles(Calculation<? extends Number> numerator,
                                                Calculation<? extends Number> denominator)
A Calculation that divides the numerator by the denominator as Doubles.


subtractFloats

public static Calculation<Float> subtractFloats(Calculation<? extends Number> a,
                                                Calculation<? extends Number> b)
A Calculation that subtracts b from a as Floats.


subtractDoubles

public static Calculation<Double> subtractDoubles(Calculation<? extends Number> a,
                                                  Calculation<? extends Number> b)
A Calculation that subtracts b from a as Doubles.


subtractIntegers

public static Calculation<Integer> subtractIntegers(Calculation<? extends Number> a,
                                                    Calculation<? extends Number> b)
A Calculation that subtracts b from a as Integers.


subtractLongs

public static Calculation<Long> subtractLongs(Calculation<? extends Number> a,
                                              Calculation<? extends Number> b)
A Calculation that subtracts b from a as Longs.


meanFloats

public static Calculation<Float> meanFloats(EventList<? extends Number> numbers)
A Calculation that reports the mean average of all the numbers as a Float.


meanDoubles

public static Calculation<Double> meanDoubles(EventList<? extends Number> numbers)
A Calculation that reports the mean average of all the numbers as a Double.


elementAt

public static <E> Calculation<E> elementAt(EventList<E> elements,
                                           int index,
                                           E defaultValue)
A Calculation that value at the given index in the given elements. If elements does not contain enough items, the given defaultValue is returned.



Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by hbrands at 2013-02-12 20:58