FileDocCategorySizeDatePackage
Adapters1.javaAPI DocExample889Sat Sep 12 03:01:00 BST 1998None

Adapters1

public class Adapters1 extends Object
Adapting built in Java arrays of Integers with algorithm usage.
see
com.objectspace.jgl.util.ArrayAdapter
version
3.0.0
author
ObjectSpace, Inc.

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

    int ints[] = { 3, -1, 2, -3, 4 };
    IntArray intArray = new IntArray( ints );
    System.out.println( "Unsorted native int array = " + intArray );

    Sorting.sort( intArray );
    System.out.println( "Sorted = " + intArray );

    Shuffling.randomShuffle( intArray );
    System.out.println( "Randomized = " + intArray );

    for ( int i = 0; i < ints.length; i++ )
      System.out.print( ints[ i ] + " " );
    System.out.println();