ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166y/RecursiveTask.java
(Generate patch)

Comparing jsr166/src/jsr166y/RecursiveTask.java (file contents):
Revision 1.8 by jsr166, Mon Jul 27 15:10:33 2009 UTC vs.
Revision 1.13 by jsr166, Fri Jul 26 16:36:21 2013 UTC

# Line 1 | Line 1
1   /*
2   * Written by Doug Lea with assistance from members of JCP JSR-166
3   * Expert Group and released to the public domain, as explained at
4 < * http://creativecommons.org/licenses/publicdomain
4 > * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6  
7   package jsr166y;
8  
9   /**
10 < * Recursive result-bearing ForkJoinTasks.
11 < * <p> For a classic example, here is a task computing Fibonacci numbers:
10 > * A recursive result-bearing {@link ForkJoinTask}.
11 > *
12 > * <p>For a classic example, here is a task computing Fibonacci numbers:
13   *
14   *  <pre> {@code
15   * class Fibonacci extends RecursiveTask<Integer> {
16   *   final int n;
17   *   Fibonacci(int n) { this.n = n; }
18 < *   Integer compute() {
18 > *   protected Integer compute() {
19   *     if (n <= 1)
20 < *        return n;
20 > *       return n;
21   *     Fibonacci f1 = new Fibonacci(n - 1);
22   *     f1.fork();
23   *     Fibonacci f2 = new Fibonacci(n - 2);
# Line 36 | Line 37 | package jsr166y;
37   * @author Doug Lea
38   */
39   public abstract class RecursiveTask<V> extends ForkJoinTask<V> {
40 +    private static final long serialVersionUID = 5232453952276485270L;
41  
42      /**
43       * The result of the computation.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines