@Test public void computeValue() throws Exception { assertEquals(MIN_VALUE, algorithm.computeValue(MIN_POSITION)); assertEquals(MAX_VALUE, algorithm.computeValue(MAX_POSITION)); assertTrue(algorithm.computeValue(MIN_POSITION + 1) > MIN_VALUE); assertTrue(algorithm.computeValue(MAX_POSITION - 1) < MAX_VALUE); }
@Override public long computeValue(int position) { int step = position - minPosition; return round((double)minValue * pow(scale, step)); }
ExponentialFeeItemsAlgorithm implements FeeItemsAlgorithm { @Override public long computeValue(int position) { int step = position - minPosition; return round((double)minValue * pow(scale, step)); } }
ExponentialFeeItemsAlgorithm implements FeeItemsAlgorithm { @Override public long computeValue(int position) { int step = position - minPosition; return round((double)minValue * pow(scale, step)); } ExponentialFeeItemsAlgorithm(long minValue, int minPosition, long maxValue, int maxPosition); }
ExponentialFeeItemsAlgorithm implements FeeItemsAlgorithm { @Override public long computeValue(int position) { int step = position - minPosition; return round((double)minValue * pow(scale, step)); } ExponentialFeeItemsAlgorithm(long minValue, int minPosition, long maxValue, int maxPosition); @Override long computeValue(int position); @Override int getMinPosition(); @Override int getMaxPosition(); }
ExponentialFeeItemsAlgorithm implements FeeItemsAlgorithm { @Override public long computeValue(int position) { int step = position - minPosition; return round((double)minValue * pow(scale, step)); } ExponentialFeeItemsAlgorithm(long minValue, int minPosition, long maxValue, int maxPosition); @Override long computeValue(int position); @Override int getMinPosition(); @Override int getMaxPosition();  }