Example usage for com.google.common.collect Ranges all

List of usage examples for com.google.common.collect Ranges all

Introduction

In this page you can find the example usage for com.google.common.collect Ranges all.

Prototype

public static <C extends Comparable<?>> Range<C> all() 

Source Link

Usage

From source file:org.eclipse.smarthome.transform.scale.internal.ScaleTransformationService.java

private Range<Double> getRange(BoundType lowBoundType, BoundType highBoundType, Double lowValue,
        Double highValue) {//from w w w .  j  a v  a  2  s  .  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);
    }

}