|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.grogra.xl.util.AggregateStateImpl<T>
public final class AggregateStateImpl<T>
Utility class which implements all AggregateState
interfaces and provides some general fields for storing state.
Instances of this class are pooled so that heap traffic is reduced.
Field Summary | |
---|---|
T |
aval
This field contains the result if the type is a reference type. |
java.lang.Object |
aval1
This field may be used freely by aggregate methods. |
java.lang.Object |
aval2
This field may be used freely by aggregate methods. |
java.lang.Object |
aval3
This field may be used freely by aggregate methods. |
java.lang.Object |
aval4
This field may be used freely by aggregate methods. |
double |
dval
This field contains the result if the type is double . |
double |
dval1
This field may be used freely by aggregate methods. |
double |
dval2
This field may be used freely by aggregate methods. |
double |
dval3
This field may be used freely by aggregate methods. |
double |
dval4
This field may be used freely by aggregate methods. |
float |
fval
This field contains the result if the type is float . |
float |
fval1
This field may be used freely by aggregate methods. |
float |
fval2
This field may be used freely by aggregate methods. |
float |
fval3
This field may be used freely by aggregate methods. |
float |
fval4
This field may be used freely by aggregate methods. |
int |
ival
This field contains the result if the type is boolean , byte , short ,
char , or int . |
int |
ival1
This field may be used freely by aggregate methods. |
int |
ival2
This field may be used freely by aggregate methods. |
int |
ival3
This field may be used freely by aggregate methods. |
int |
ival4
This field may be used freely by aggregate methods. |
long |
lval
This field contains the result if the type is long . |
long |
lval1
This field may be used freely by aggregate methods. |
long |
lval2
This field may be used freely by aggregate methods. |
long |
lval3
This field may be used freely by aggregate methods. |
long |
lval4
This field may be used freely by aggregate methods. |
Method Summary | |
---|---|
static AggregateStateImpl<?> |
allocate()
|
boolean |
getBooleanResult()
Returns the result of the aggregation. |
byte |
getByteResult()
Returns the result of the aggregation. |
char |
getCharResult()
Returns the result of the aggregation. |
double |
getDoubleResult()
Returns the result of the aggregation. |
float |
getFloatResult()
Returns the result of the aggregation. |
int |
getIntResult()
Returns the result of the aggregation. |
long |
getLongResult()
Returns the result of the aggregation. |
T |
getObjectResult()
Returns the result of the aggregation. |
short |
getShortResult()
Returns the result of the aggregation. |
boolean |
isFinished()
Returns true to indicate the invoker of the aggregate
method that the computation of the aggregate value has been completed
by the aggregate method, even if there are values left for aggregation. |
void |
setFinished()
Sets the finished -flag to true . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public T aval
public java.lang.Object aval1
public java.lang.Object aval2
public java.lang.Object aval3
public java.lang.Object aval4
public double dval
double
.
public double dval1
public double dval2
public double dval3
public double dval4
public float fval
float
.
public float fval1
public float fval2
public float fval3
public float fval4
public int ival
boolean
, byte
, short
,
char
, or int
.
public int ival1
public int ival2
public int ival3
public int ival4
public long lval
long
.
public long lval1
public long lval2
public long lval3
public long lval4
Method Detail |
---|
public static AggregateStateImpl<?> allocate()
public boolean getBooleanResult()
BooleanAggregateState
finished
argument set to true
.
getBooleanResult
in interface BooleanAggregateState
public byte getByteResult()
ByteAggregateState
finished
argument set to true
.
getByteResult
in interface ByteAggregateState
public char getCharResult()
CharAggregateState
finished
argument set to true
.
getCharResult
in interface CharAggregateState
public double getDoubleResult()
DoubleAggregateState
finished
argument set to true
.
getDoubleResult
in interface DoubleAggregateState
public float getFloatResult()
FloatAggregateState
finished
argument set to true
.
getFloatResult
in interface FloatAggregateState
public int getIntResult()
IntAggregateState
finished
argument set to true
.
getIntResult
in interface IntAggregateState
public long getLongResult()
LongAggregateState
finished
argument set to true
.
getLongResult
in interface LongAggregateState
public T getObjectResult()
ObjectAggregateState
finished
argument set to true
.
getObjectResult
in interface ObjectAggregateState<T>
public short getShortResult()
ShortAggregateState
finished
argument set to true
.
getShortResult
in interface ShortAggregateState
public boolean isFinished()
AggregateState
true
to indicate the invoker of the aggregate
method that the computation of the aggregate value has been completed
by the aggregate method, even if there are values left for aggregation.
E.g., this is the case for a short circuit implementation of the boolean
or where the result is known when the first true
-value
is encountered. The invoker must not invoke the aggregate method
again.
isFinished
in interface AggregateState
true
iff the final aggregated value is already knownpublic void setFinished()
finished
-flag to true
.
Subsequent invocations of isFinished()
will
return true
.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |