FileDocCategorySizeDatePackage
Functions6.javaAPI DocExample576Sat Sep 12 03:01:00 BST 1998None

Functions6.java

// 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 );
    }
  }