|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jasperreports.crosstabs.fill.calculation.BucketDefinition
public class BucketDefinition
Bucket definition.
| Nested Class Summary | |
|---|---|
class |
BucketDefinition.Bucket
Bucket value class. |
| Field Summary | |
|---|---|
protected Comparator<Object> |
bucketValueComparator
|
protected JRExpression |
orderByExpression
|
protected Comparator<Object> |
orderValueComparator
|
protected BucketDefinition.Bucket |
VALUE_NULL
The null bucket. |
protected BucketDefinition.Bucket |
VALUE_TOTAL
The total value for this bucket. |
protected static byte |
VALUE_TYPE_NULL
Value type used for null bucket values. |
protected static byte |
VALUE_TYPE_TOTAL
Value type used for total buckets. |
protected static byte |
VALUE_TYPE_VALUE
Value type used for non-null values. |
| Constructor Summary | |
|---|---|
BucketDefinition(Class<?> valueClass,
JRExpression orderByExpression,
Comparator<Object> comparator,
SortOrderEnum order,
CrosstabTotalPositionEnum totalPosition)
Creates a bucket. |
|
| Method Summary | |
|---|---|
int |
compareOrderValues(Object v1,
Object v2)
|
boolean |
computeTotal()
Whether this bucket needs total calculation. |
BucketDefinition.Bucket |
create(Object value)
Creates a BucketValue object for a given value. |
protected static Comparator<Object> |
createOrderComparator(Comparator<Object> comparator,
SortOrderEnum order)
|
JRExpression |
getOrderByExpression()
|
CrosstabTotalPositionEnum |
getTotalPosition()
Returns the total bucket position. |
boolean |
hasOrderValues()
|
void |
setComputeTotal()
Instructs that the bucket will need total bucket calculation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final byte VALUE_TYPE_VALUE
protected static final byte VALUE_TYPE_NULL
protected static final byte VALUE_TYPE_TOTAL
protected final BucketDefinition.Bucket VALUE_TOTAL
protected final BucketDefinition.Bucket VALUE_NULL
protected final Comparator<Object> bucketValueComparator
protected final JRExpression orderByExpression
protected final Comparator<Object> orderValueComparator
| Constructor Detail |
|---|
public BucketDefinition(Class<?> valueClass,
JRExpression orderByExpression,
Comparator<Object> comparator,
SortOrderEnum order,
CrosstabTotalPositionEnum totalPosition)
throws JRException
valueClass - the class of the bucket valuesorderByExpression - expression that provides order by valuescomparator - the comparator to use for bucket sortingorder - the order type, SortOrderEnum.ASCENDING or SortOrderEnum.DESCENDING descendingtotalPosition - the position of the total bucket
JRException| Method Detail |
|---|
protected static Comparator<Object> createOrderComparator(Comparator<Object> comparator,
SortOrderEnum order)
public boolean computeTotal()
public void setComputeTotal()
computeTotal()public CrosstabTotalPositionEnum getTotalPosition()
public JRExpression getOrderByExpression()
public boolean hasOrderValues()
public int compareOrderValues(Object v1,
Object v2)
public BucketDefinition.Bucket create(Object value)
BucketValue object for a given value.
value - the value
BucketValue object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||