FileDocCategorySizeDatePackage
HashSet7.javaAPI DocExample1110Sat Sep 12 03:01:00 BST 1998None

HashSet7

public class HashSet7 extends Object
Using another BinaryPredicate for matching
see
com.objectspace.jgl.HashSet
version
3.0.0
author
ObjectSpace, Inc.

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

    HashSet set = new HashSet( new IdenticalTo() );
    set.add( new Integer( 6 ) );
    set.add( new Integer( 1 ) );
    set.add( new Integer( 4 ) );

    // this WILL work because it is a seperate object than the other Integer(1)
    set.add( new Integer( 1 ) );
    System.out.println( set );
    System.out.println();

    System.out.println( "Add an object Integer(100)" );
    Integer tryit = new Integer( 100 );
    System.out.println( "add returns: " + set.add( tryit ) );
    System.out.println( "set = " + set );
    System.out.println( "Try to add the EXACT same object Integer(100)" );
    System.out.println( "add returns: " + set.add( tryit ) );
    System.out.println( "set = " + set );