Class IntervalUtils
java.lang.Object
org.eclipse.collections.impl.list.IntervalUtils
This is a utility class for common behaviors between Interval and IntInterval. It is
a public class only because Interval and IntInterval are in different packages.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intbinarySearch(long value, long from, long to, long step) static intcalculateAdjustedStep(int from, int to, int stepBy) static voidcheckArguments(long from, long to, long stepBy) private static voidcheckSize(long from, long to, long stepBy) private static voidcheckStepBy(long from, long to, long stepBy) static booleancontains(long value, long from, long to, long step) static intindexOf(long value, long from, long to, long step) static intintSize(long from, long to, long step) static booleanisWithinBoundaries(long value, long from, long to, long step) static longvalueAtIndex(int index, long from, long to, long step)
-
Constructor Details
-
IntervalUtils
private IntervalUtils()
-
-
Method Details
-
checkArguments
public static void checkArguments(long from, long to, long stepBy) -
checkSize
private static void checkSize(long from, long to, long stepBy) -
checkStepBy
private static void checkStepBy(long from, long to, long stepBy) -
intSize
public static int intSize(long from, long to, long step) -
contains
public static boolean contains(long value, long from, long to, long step) -
isWithinBoundaries
public static boolean isWithinBoundaries(long value, long from, long to, long step) -
indexOf
public static int indexOf(long value, long from, long to, long step) -
valueAtIndex
public static long valueAtIndex(int index, long from, long to, long step) -
binarySearch
public static int binarySearch(long value, long from, long to, long step) -
calculateAdjustedStep
public static int calculateAdjustedStep(int from, int to, int stepBy)
-