package net.sf.jasperreports.engine.fill;

public class JRComparableIncrementerFactory extends JRAbstractExtendedIncrementerFactory {
  private static JRComparableIncrementerFactory mainInstance = new JRComparableIncrementerFactory();
  
  public static JRComparableIncrementerFactory getInstance() {
    return mainInstance;
  }
  
  public JRExtendedIncrementer getExtendedIncrementer(byte calculation) {
    JRExtendedIncrementer incrementer = null;
    switch (calculation) {
      case 4:
        incrementer = JRComparableLowestIncrementer.getInstance();
        return incrementer;
      case 5:
        incrementer = JRComparableHighestIncrementer.getInstance();
        return incrementer;
    } 
    incrementer = JRDefaultIncrementerFactory.getInstance().getExtendedIncrementer(calculation);
    return incrementer;
  }
}
