

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object jsr166z.forkjoin.Ops
public class Ops
Interfaces and utilities describing perelement operations used within parallel methods on aggregates. This class provides type names for common operation signatures accepting zero, one or two arguments, and returning zero or one results, for parameterized types, as well as specializations to int, long, and double. (Lesser used types like short are absent.)
In addition to stated signatures, implementations of these interfaces must work safely in parallel. In general, this means methods should operate only on their arguments, and should not rely on ThreadLocals, unsafely published globals, or other unsafe constructions. Additionally, they should not block waiting for synchronization.
This class also contains a few commonly used implementations of some of these interfaces
This class is normally best used via import static.
Nested Class Summary  

static class 
Ops.CompoundMapper<T,U,V>
A composite mapper that applies a second mapper to the results of applying the first one 
static class 
Ops.DoubleMaxReducer
A reducer returning the maximum of two double elements, using the given comparator 
static class 
Ops.DoubleMinReducer
A reducer returning the minimum of two double elements, using the given comparator 
static class 
Ops.IntMaxReducer
A reducer returning the maximum of two int elements, using the given comparator 
static class 
Ops.IntMinReducer
A reducer returning the minimum of two int elements, using the given comparator 
static class 
Ops.LongMaxReducer
A reducer returning the maximum of two long elements, using the given comparator 
static class 
Ops.LongMinReducer
A reducer returning the minimum of two long elements, using the given comparator 
static class 
Ops.MaxReducer<T>
A reducer returning the maximum of two elements, using the given comparator, and treating null as less than any nonnull element. 
static class 
Ops.MinReducer<T>
A reducer returning the minimum of two elements, using the given comparator, and treating null as greater than any nonnull element. 
static class 
Ops.NaturalMaxReducer<T extends java.lang.Comparable<? super T>>
A reducer returning the maximum of two Comparable elements, treating null as less than any nonnull element. 
static class 
Ops.NaturalMinReducer<T extends java.lang.Comparable<? super T>>
A reducer returning the minimum of two Comparable elements, treating null as less than any nonnull element. 
Field Summary  

static {double,double=>double} 
doubleAdder
A reducer that adds two double elements 
static {int,int=>int} 
intAdder
A reducer that adds two int elements 
static {long,long=>long} 
longAdder
A reducer that adds two double elements 
static {double,double=>int} 
naturalDoubleComparator
A comparator for doubles relying on natural ordering 
static {double,double=>double} 
naturalDoubleMaxReducer
A reducer returning the maximum of two double elements, using natural comparator 
static {double,double=>double} 
naturalDoubleMinReducer
A reducer returning the minimum of two double elements, using natural comparator 
static {int,int=>int} 
naturalIntComparator
A comparator for ints relying on natural ordering 
static {int,int=>int} 
naturalIntMaxReducer
A reducer returning the maximum of two int elements, using natural comparator 
static {int,int=>int} 
naturalIntMinReducer
A reducer returning the minimum of two int elements, using natural comparator 
static {long,long=>int} 
naturalLongComparator
A comparator for longs relying on natural ordering 
static {long,long=>long} 
naturalLongMaxReducer
A reducer returning the maximum of two long elements, using natural comparator 
static {long,long=>long} 
naturalLongMinReducer
A reducer returning the minimum of two long elements, using natural comparator 
Constructor Summary  

Ops()

Method Summary 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Field Detail 

public static final {double,double=>double} doubleAdder
public static final {long,long=>long} longAdder
public static final {int,int=>int} intAdder
public static final {double,double=>int} naturalDoubleComparator
public static final {double,double=>double} naturalDoubleMaxReducer
public static final {double,double=>double} naturalDoubleMinReducer
public static final {long,long=>int} naturalLongComparator
public static final {long,long=>long} naturalLongMaxReducer
public static final {long,long=>long} naturalLongMinReducer
public static final {int,int=>int} naturalIntComparator
public static final {int,int=>int} naturalIntMaxReducer
public static final {int,int=>int} naturalIntMinReducer
Constructor Detail 

public Ops()


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 