home *** CD-ROM | disk | FTP | other *** search
Java Source | 1997-07-30 | 490 b | 16 lines |
- // Copyright(c) 1996,1997 ObjectSpace, Inc.
- import COM.objectspace.jgl.*;
-
- 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 );
- }
- }