home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 15
/
BUGCD1998_06.ISO
/
aplic
/
jbuilder
/
jsamples.z
/
Iterators8.java
< prev
next >
Wrap
Text File
|
1997-07-30
|
583b
|
21 lines
// Copyright(c) 1996,1997 ObjectSpace, Inc.
import COM.objectspace.jgl.*;
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 );
}
}