package edu.ucsb.cs.jicos.examples.fastfibonacci; import edu.ucsb.cs.jicos.services.*; import edu.ucsb.cs.jicos.services.tasks.*; final public class F extends Task { private final static int THRESHOLD = 30; private int n; public F( int n ) { this.n = n; } public Object execute ( Environment environment ) { if ( n < 30 ) { compute( new Atom( n ) ); } else { compute( new F( n - 1 ) ); compute( new F( n - 2 ) ); } return new AddInteger(); } }