first commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package net.sf.jasperreports.engine.fill;
|
||||
|
||||
class JRComparableHighestIncrementer extends JRAbstractExtendedIncrementer {
|
||||
private static JRComparableHighestIncrementer mainInstance = new JRComparableHighestIncrementer();
|
||||
|
||||
public static JRComparableHighestIncrementer getInstance() {
|
||||
return mainInstance;
|
||||
}
|
||||
|
||||
public Object increment(JRCalculable variable, Object expressionValue, AbstractValueProvider valueProvider) {
|
||||
Comparable value = (Comparable)variable.getIncrementedValue();
|
||||
Comparable newValue = (Comparable)expressionValue;
|
||||
if (value != null && !variable.isInitialized() && (newValue == null || value.compareTo(newValue) > 0))
|
||||
newValue = value;
|
||||
return newValue;
|
||||
}
|
||||
|
||||
public Object initialValue() {
|
||||
return null;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user