home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
inprise
/
JSAMPLES.Z
/
Functions6.java
< prev
next >
Wrap
Text File
|
1998-05-08
|
576b
|
19 lines
// Copyright(c) 1996,1997 ObjectSpace, Inc.
import com.objectspace.jgl.*;
import com.objectspace.jgl.algorithms.*;
import com.objectspace.jgl.predicates.*;
public class Functions6
{
public static void main( String[] args )
{
DList list = new DList();
list.add( "dog" );
list.add( "ape" );
list.add( "emu" );
UnaryPredicate predicate = new BindSecondPredicate( new GreaterString(), "bat" );
int n = Counting.countIf( list, predicate );
System.out.println( "The number of strings in " + list + " > bat = " + n );
}
}