List of usage examples for com.google.common.collect Ranges downTo
public static <C extends Comparable<?>> Range<C> downTo(C paramC, BoundType paramBoundType)
From source file:org.eclipse.smarthome.transform.scale.internal.ScaleTransformationService.java
private Range<Double> getRange(BoundType lowBoundType, BoundType highBoundType, Double lowValue, Double highValue) {// w w w .j av a2s .c o m if (lowValue == null && highValue == null) { return Ranges.all(); } else if (lowValue == null) { return Ranges.upTo(highValue, highBoundType); } else if (highValue == null) { return Ranges.downTo(lowValue, lowBoundType); } else { return Ranges.range(lowValue, lowBoundType, highValue, highBoundType); } }