FileDocCategorySizeDatePackage
Counting1.javaAPI DocExample659Sat Sep 12 03:01:00 BST 1998None

Counting1

public class Counting1 extends Object
Sum the values of a range.
see
com.objectspace.jgl.algorithms.Counting
version
3.0.0
author
ObjectSpace, Inc.

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

    int intArray[] = { 1, 2, 3, 4, 5 };
    IntIterator begin = IntIterator.begin( intArray );
    IntIterator end = IntIterator.end( intArray );

    Number sum = Counting.accumulate( begin, end, new Integer( 0 ) );

    System.out.println( "Sum = " + sum );