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

Comparing jsr166/src/extra166y/Ops.java (file contents):
Revision 1.5 by jsr166, Tue Jan 31 01:51:13 2012 UTC vs.
Revision 1.6 by jsr166, Wed Jan 16 00:51:11 2013 UTC

# Line 12 | Line 12 | import java.util.*;
12   * within parallel methods on aggregates. This class provides type
13   * names for all operation signatures accepting zero, one or two
14   * arguments, and returning zero or one results, for parameterized
15 < * types, as well as specializations to <tt>int</tt>, <tt>long</tt>,
16 < * and <tt>double</tt>. In keeping with normal Java evaluation rules
17 < * that promote, for example <tt>short</tt> to <tt>int</tt>, operation
15 > * types, as well as specializations to {@code int}, {@code long},
16 > * and {@code double}. In keeping with normal Java evaluation rules
17 > * that promote, for example {@code short} to {@code int}, operation
18   * names for these smaller types are absent.
19   *
20   * <p><b>Preliminary release note: Some of the declarations in this
# Line 26 | Line 26 | import java.util.*;
26   * <ul>
27   *
28   * <li> The name of the single method declared in each interface is
29 < * simply <tt>op</tt> (short for "operate").
29 > * simply {@code op} (short for "operate").
30   *
31 < * <li> An <tt>Op</tt> (short for "operation") maps a single argument to
31 > * <li> An {@code Op} (short for "operation") maps a single argument to
32   * a result. Example: negating a value.
33   *
34   * <li> The names for scalar ops accepting and returning the same type
35   * are prefaced by their type name.
36   *
37 < * <li> A <tt>BinaryOp</tt> maps two arguments to a result. Example:
37 > * <li> A {@code BinaryOp} maps two arguments to a result. Example:
38   * dividing two numbers
39   *
40 < * <li>A <tt>Reducer</tt> is an <em>associative</em> binary op
40 > * <li>A {@code Reducer} is an <em>associative</em> binary op
41   * accepting and returning values of the same type; where op(a, op(b,
42   * c)) should have the same result as op(op(a, b), c).  Example:
43   * adding two numbers.
# Line 48 | Line 48 | import java.util.*;
48   * <li> Mixed-type operators are named just by their argument type
49   * names.
50   *
51 < * <li> A <tt>Generator</tt> takes no arguments and returns a result.
51 > * <li> A {@code Generator} takes no arguments and returns a result.
52   * Examples: random number generators, builders
53   *
54 < * <li> A <tt>Procedure</tt> accepts an argument but doesn't return a
55 < * result. Example: printing a value.  An <tt>Action</tt> is a
54 > * <li> A {@code Procedure} accepts an argument but doesn't return a
55 > * result. Example: printing a value.  An {@code Action} is a
56   * Procedure that takes no arguments.
57   *
58 < * <li>A <tt>Predicate</tt> accepts a value and returns a boolean indicator
58 > * <li>A {@code Predicate} accepts a value and returns a boolean indicator
59   * that the argument obeys some property. Example: testing if a number is even.
60   *
61 < * <li>A <tt>BinaryPredicate</tt> accepts two values and returns a
61 > * <li>A {@code BinaryPredicate} accepts two values and returns a
62   * boolean indicator that the arguments obeys some relation. Example:
63   * testing if two numbers are relatively prime.
64   *
# Line 88 | Line 88 | import java.util.*;
88   * <td >
89   * <th >a
90   * <th >b
91 < * <th ><tt>int</tt>
92 < * <th ><tt>long</tt>
93 < * <th ><tt>double</tt>
91 > * <th >{@code int}
92 > * <th >{@code long}
93 > * <th >{@code double}
94   * <th >Object
95   * <td >
96   * <tr>
# Line 104 | Line 104 | import java.util.*;
104   * <td >
105   * <tr>
106   * <td >
107 < * <td ><tt>int</tt>
107 > * <td >{@code int}
108   * <td ><em>&lt;none&gt;</em>
109   * <td ><a href="Ops.IntOp.html">Ops.IntOp</a>
110   * <td ><a href="Ops.IntToLong.html">Ops.IntToLong</a>
# Line 114 | Line 114 | import java.util.*;
114   * <tr>
115   * <td >
116   * <td >
117 < * <td ><tt>int</tt>
117 > * <td >{@code int}
118   * <td ><a href="Ops.BinaryIntOp.html">Ops.BinaryIntOp</a>
119   * <td ><a href="Ops.IntAndIntToLong.html">Ops.IntAndIntToLong</a>
120   * <td ><a href="Ops.IntAndIntToDouble.html">Ops.IntAndIntToDouble</a>
# Line 123 | Line 123 | import java.util.*;
123   * <tr>
124   * <td >
125   * <td >
126 < * <td ><tt>long</tt>
126 > * <td >{@code long}
127   * <td ><a href="Ops.IntAndLongToInt.html">Ops.IntAndLongToInt</a>
128   * <td ><a href="Ops.IntAndLongToLong.html">Ops.IntAndLongToLong</a>
129   * <td ><a href="Ops.IntAndLongToDouble.html">Ops.IntAndLongToDouble</a>
# Line 132 | Line 132 | import java.util.*;
132   * <tr>
133   * <td >
134   * <td >
135 < * <td ><tt>double</tt>
135 > * <td >{@code double}
136   * <td ><a href="Ops.IntAndDoubleToInt.html">Ops.IntAndDoubleToInt</a>
137   * <td ><a href="Ops.IntAndDoubleToLong.html">Ops.IntAndDoubleToLong</a>
138   * <td ><a href="Ops.IntAndDoubleToDouble.html">Ops.IntAndDoubleToDouble</a>
# Line 158 | Line 158 | import java.util.*;
158   * <td >
159   * <tr>
160   * <td >
161 < * <td ><tt>long</tt>
161 > * <td >{@code long}
162   * <td ><em>&lt;none&gt;</em>
163   * <td ><a href="Ops.LongToInt.html">Ops.LongToInt</a>
164   * <td ><a href="Ops.LongOp.html">Ops.LongOp</a>
# Line 168 | Line 168 | import java.util.*;
168   * <tr>
169   * <td >
170   * <td >
171 < * <td ><tt>int</tt>
171 > * <td >{@code int}
172   * <td ><a href="Ops.LongAndIntToInt.html">Ops.LongAndIntToInt</a>
173   * <td ><a href="Ops.LongAndIntToLong.html">Ops.LongAndIntToLong</a>
174   * <td ><a href="Ops.LongAndIntToDouble.html">Ops.LongAndIntToDouble</a>
# Line 177 | Line 177 | import java.util.*;
177   * <tr>
178   * <td >
179   * <td >
180 < * <td ><tt>long</tt>
180 > * <td >{@code long}
181   * <td ><a href="Ops.LongAndLongToInt.html">Ops.LongAndLongToInt</a>
182   * <td ><a href="Ops.BinaryLongOp.html">Ops.BinaryLongOp</a>
183   * <td ><a href="Ops.LongAndLongToDouble.html">Ops.LongAndLongToDouble</a>
# Line 186 | Line 186 | import java.util.*;
186   * <tr>
187   * <td >
188   * <td >
189 < * <td ><tt>double</tt>
189 > * <td >{@code double}
190   * <td ><a href="Ops.LongAndDoubleToInt.html">Ops.LongAndDoubleToInt</a>
191   * <td ><a href="Ops.LongAndDoubleToLong.html">Ops.LongAndDoubleToLong</a>
192   * <td ><a href="Ops.LongAndDoubleToDouble.html">Ops.LongAndDoubleToDouble</a>
# Line 212 | Line 212 | import java.util.*;
212   * <td >
213   * <tr>
214   * <td >
215 < * <td ><tt>double</tt>
215 > * <td >{@code double}
216   * <td ><em>&lt;none&gt;</em>
217   * <td ><a href="Ops.DoubleToInt.html">Ops.DoubleToInt</a>
218   * <td ><a href="Ops.DoubleToLong.html">Ops.DoubleToLong</a>
# Line 222 | Line 222 | import java.util.*;
222   * <tr>
223   * <td >
224   * <td >
225 < * <td ><tt>int</tt>
225 > * <td >{@code int}
226   * <td ><a href="Ops.DoubleAndIntToInt.html">Ops.DoubleAndIntToInt</a>
227   * <td ><a href="Ops.DoubleAndIntToLong.html">Ops.DoubleAndIntToLong</a>
228   * <td ><a href="Ops.DoubleAndIntToDouble.html">Ops.DoubleAndIntToDouble</a>
# Line 231 | Line 231 | import java.util.*;
231   * <tr>
232   * <td >
233   * <td >
234 < * <td ><tt>long</tt>
234 > * <td >{@code long}
235   * <td ><a href="Ops.DoubleAndLongToInt.html">Ops.DoubleAndLongToInt</a>
236   * <td ><a href="Ops.DoubleAndLongToLong.html">Ops.DoubleAndLongToLong</a>
237   * <td ><a href="Ops.DoubleAndLongToDouble.html">Ops.DoubleAndLongToDouble</a>
# Line 240 | Line 240 | import java.util.*;
240   * <tr>
241   * <td >
242   * <td >
243 < * <td ><tt>double</tt>
243 > * <td >{@code double}
244   * <td ><a href="Ops.DoubleAndDoubleToInt.html">Ops.DoubleAndDoubleToInt</a>
245   * <td ><a href="Ops.DoubleAndDoubleToLong.html">Ops.DoubleAndDoubleToLong</a>
246   * <td ><a href="Ops.BinaryDoubleOp.html">Ops.BinaryDoubleOp</a>
# Line 275 | Line 275 | import java.util.*;
275   * <tr>
276   * <td >
277   * <td >
278 < * <td ><tt>int</tt>
278 > * <td >{@code int}
279   * <td ><a href="Ops.ObjectAndIntToInt.html">Ops.ObjectAndIntToInt</a>
280   * <td ><a href="Ops.ObjectAndIntToLong.html">Ops.ObjectAndIntToLong</a>
281   * <td ><a href="Ops.ObjectAndIntToDouble.html">Ops.ObjectAndIntToDouble</a>
# Line 284 | Line 284 | import java.util.*;
284   * <tr>
285   * <td >
286   * <td >
287 < * <td ><tt>long</tt>
287 > * <td >{@code long}
288   * <td ><a href="Ops.ObjectAndLongToInt.html">Ops.ObjectAndLongToInt</a>
289   * <td ><a href="Ops.ObjectAndLongToLong.html">Ops.ObjectAndLongToLong</a>
290   * <td ><a href="Ops.ObjectAndLongToDouble.html">Ops.ObjectAndLongToDouble</a>
# Line 293 | Line 293 | import java.util.*;
293   * <tr>
294   * <td >
295   * <td >
296 < * <td ><tt>double</tt>
296 > * <td >{@code double}
297   * <td ><a href="Ops.ObjectAndDoubleToInt.html">Ops.ObjectAndDoubleToInt</a>
298   * <td ><a href="Ops.ObjectAndDoubleToLong.html">Ops.ObjectAndDoubleToLong</a>
299   * <td ><a href="Ops.ObjectAndDoubleToDouble.html">Ops.ObjectAndDoubleToDouble</a>
# Line 325 | Line 325 | import java.util.*;
325   * constructions. Additionally, they should not block waiting for
326   * synchronization.
327   *
328 < * <p>This class is normally best used via <tt>import static</tt>.
328 > * <p>This class is normally best used via {@code import static}.
329   */
330   public class Ops {
331      private Ops() {} // disable construction

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines