FileDocCategorySizeDatePackage
OrderedSet2.javaAPI DocExample542Sat Sep 12 03:01:00 BST 1998None

OrderedSet2.java

// Copyright(c) 1996,1997 ObjectSpace, Inc.
import com.objectspace.jgl.*;
import com.objectspace.jgl.predicates.*;

/**
 * Use of comparator to order elements.
 *
 * @see com.objectspace.jgl,OrderedSet
 * @version 3.0.0
 * @author ObjectSpace, Inc.
 */

public class OrderedSet2
  {
  public static void main( String[] args )
    {
    OrderedSet set = new OrderedSet( new LessString() );
    set.add( "cat" );
    set.add( "ape" );
    set.add( "dog" );
    set.add( "bat" );
    System.out.println( set );
    }
  }