home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
inprise
/
JSAMPLES.Z
/
Iterators8.java
< prev
next >
Wrap
Text File
|
1998-05-08
|
702b
|
24 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.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 );
}
}