home *** CD-ROM | disk | FTP | other *** search
/ ActiveX Programming Unleashed CD / AXU.iso / jgl_1_1 / jgl_1_1.exe / examples / Functions7.java < prev    next >
Encoding:
Java Source  |  1996-08-28  |  525 b   |  17 lines

  1. // Copyright(c) 1996 ObjectSpace, Inc.
  2. import jgl.*;
  3.  
  4. public class Functions7
  5.   {
  6.   public static void main( String[] args )
  7.     {
  8.     Array array = new Array();
  9.     array.add( "ape" );
  10.     array.add( "giraffe" );
  11.     array.add( "lizard" );  
  12.     BinaryPredicate comparator = new BinaryComposePredicate( new GreaterInteger(), new LengthString(), new LengthString() );
  13.     System.out.println( "before = " + array );
  14.     Sorting.sort( array, comparator );
  15.     System.out.println( "after = " + array );
  16.     }
  17.   }