home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1998 October A
/
Pcwk10a98.iso
/
Inprise
/
TRIAL
/
JBUILDER
/
JSAMPLES.Z
/
Functions7.java
< prev
next >
Wrap
Text File
|
1998-05-08
|
714b
|
28 lines
// Copyright(c) 1996,1997 ObjectSpace, Inc.
import com.objectspace.jgl.*;
import com.objectspace.jgl.algorithms.*;
import com.objectspace.jgl.functions.*;
import com.objectspace.jgl.predicates.*;
public class Functions7
{
public static void main( String[] args )
{
Array array = new Array();
array.add( "ape" );
array.add( "giraffe" );
array.add( "lizard" );
BinaryPredicate comparator = new BinaryComposePredicate
(
new GreaterNumber(),
new LengthString(),
new LengthString()
);
System.out.println( "before = " + array );
Sorting.sort( array, comparator );
System.out.println( "after = " + array );
}
}