@Test(expected = IllegalArgumentException.class) public void throwsIfValueIsBelowMin() { ColourGradient.getGradientColour(-1.0, 0.0, 1.0, "white", "red"); }
public static String getGradientColour(double value, double min, double max, String lowValueColourString, String highValueColourString) { Preconditions.checkArgument( value >= 0.0 && value >= min && value <= max || value < 0 && value <= min && value >= max); Color lowValueColour = getColour(lowValueColourString); Color highValueColour = getColour(highValueColourString); return colourToHexString(getGradientColour(value, min, max, lowValueColour, highValueColour)); }
ColourGradient { public static String getGradientColour(double value, double min, double max, String lowValueColourString, String highValueColourString) { Preconditions.checkArgument( value >= 0.0 && value >= min && value <= max || value < 0 && value <= min && value >= max); Color lowValueColour = getColour(lowValueColourString); Color highValueColour = getColour(highValueColourString); return colourToHexString(getGradientColour(value, min, max, lowValueColour, highValueColour)); } }
ColourGradient { public static String getGradientColour(double value, double min, double max, String lowValueColourString, String highValueColourString) { Preconditions.checkArgument( value >= 0.0 && value >= min && value <= max || value < 0 && value <= min && value >= max); Color lowValueColour = getColour(lowValueColourString); Color highValueColour = getColour(highValueColourString); return colourToHexString(getGradientColour(value, min, max, lowValueColour, highValueColour)); } protected  ColourGradient(); }
ColourGradient { public static String getGradientColour(double value, double min, double max, String lowValueColourString, String highValueColourString) { Preconditions.checkArgument( value >= 0.0 && value >= min && value <= max || value < 0 && value <= min && value >= max); Color lowValueColour = getColour(lowValueColourString); Color highValueColour = getColour(highValueColourString); return colourToHexString(getGradientColour(value, min, max, lowValueColour, highValueColour)); } protected  ColourGradient(); static String getGradientColour(double value,
                                           double min,
                                           double max,
                                           String lowValueColourString,
                                           String highValueColourString); }
ColourGradient { public static String getGradientColour(double value, double min, double max, String lowValueColourString, String highValueColourString) { Preconditions.checkArgument( value >= 0.0 && value >= min && value <= max || value < 0 && value <= min && value >= max); Color lowValueColour = getColour(lowValueColourString); Color highValueColour = getColour(highValueColourString); return colourToHexString(getGradientColour(value, min, max, lowValueColour, highValueColour)); } protected  ColourGradient(); static String getGradientColour(double value,
                                           double min,
                                           double max,
                                           String lowValueColourString,
                                           String highValueColourString);  }