FileDocCategorySizeDatePackage
Iterators8.javaAPI DocExample702Sat Sep 12 03:01:00 BST 1998None

Iterators8.java

// Copyright(c) 1996,1997 ObjectSpace, Inc.
import com.objectspace.jgl.*;
import com.objectspace.jgl.algorithms.*;
import com.objectspace.jgl.functions.*;
import com.objectspace.jgl.util.*;

public class Iterators8
  {
  public static void main( String[] args )
    {
    Array array = new Array();
    array.add( "ape" );
    array.add( "giraffe" );
    array.add( "elephant" );
    System.out.println( "array = " + array );

    Deque deque = new Deque();
    InsertIterator iterator = new InsertIterator( deque );
    UnaryFunction function = new LengthString();
    Transforming.transform( array, iterator, function );
    System.out.println( "deque = " + deque );
    }
  }