FileDocCategorySizeDatePackage
Sets3.javaAPI DocExample715Sat Sep 12 03:01:00 BST 1998None

Sets3

public class Sets3 extends Object

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

    // Order elements based on their hash value.
    OrderedSet set1 = new OrderedSet();
    set1.add( new Integer( 1 ) );
    set1.add( new Integer( 3 ) );
    set1.add( new Integer( 2 ) );
    System.out.println( "set1 = " + set1 );

    // Order elements in descending numeric order.
    OrderedSet set2 = new OrderedSet( new GreaterNumber() );
    set2.add( new Integer( 1 ) );
    set2.add( new Integer( 3 ) );
    set2.add( new Integer( 2 ) );
    System.out.println( "set2 = " + set2 );