class NormedXYSeries implements XYSeries {

    @Override
    public Number getY(int index) {
        final Number yVal = rawData.getY(index);
        if(yVal != null && transformY != null) {
            return minMaxY.transform(yVal.doubleValue(), transformY);
        }
        return yVal;
    }

}

class NormedXYSeriesTest  {

    private static final double DELTA;

    @Test
    public void testConstructor_withOffsetAndNoOffsetCompression() {

        XYSeries rawData = new SimpleXYSeries(SimpleXYSeries.ArrayFormat.Y_VALS_ONLY, "s1", 0, 2, 4, 6, 8, 10);
        NormedXYSeries normedData = new NormedXYSeries(rawData,
                new NormedXYSeries.Norm(null, 0.5, false),
                new NormedXYSeries.Norm(null, 0.5, false));

        assertEquals(0.5d, normedData.getY(0).doubleValue(), DELTA);
        assertEquals(0.7d, normedData.getY(1).doubleValue(), DELTA);
        assertEquals(1.5d, normedData.getY(5).doubleValue(), DELTA);
    }

}