package net.sf.jasperreports.engine.fill;

public abstract class AbstractValueProvider {
  private static AbstractValueProvider currentValueProvider = new AbstractValueProvider() {
      public Object getValue(JRCalculable calculable) {
        return calculable.getValue();
      }
    };
  
  private static AbstractValueProvider estimatedValueProvider = new AbstractValueProvider() {
      public Object getValue(JRCalculable calculable) {
        return ((JRFillVariable)calculable).getEstimatedValue();
      }
    };
  
  public static AbstractValueProvider getCurrentValueProvider() {
    return currentValueProvider;
  }
  
  public static AbstractValueProvider getEstimatedValueProvider() {
    return estimatedValueProvider;
  }
  
  public abstract Object getValue(JRCalculable paramJRCalculable);
}
