home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 15
/
BUGCD1998_06.ISO
/
aplic
/
jbuilder
/
jsamples.z
/
Functions5.java
< prev
next >
Wrap
Text File
|
1997-07-30
|
518b
|
17 lines
// Copyright(c) 1996,1997 ObjectSpace, Inc.
import COM.objectspace.jgl.*;
public class Functions5
{
public static void main( String[] args )
{
Deque deque = new Deque();
deque.add( new Integer( 4 ) );
deque.add( new Integer( -2 ) );
deque.add( new Integer( 3 ) );
UnaryFunction function = new NegateNumber();
System.out.println( "before = " + deque );
Transforming.transform( deque, deque.begin(), function );
System.out.println( "after = " + deque );
}
}