Package jetbrains.buildServer.util
Class IntInterval
- java.lang.Object
-
- jetbrains.buildServer.util.IntInterval
-
public final class IntInterval extends Object
Integer interval. Hold a couple of integer values A and B, where A <= B.Both bounds are inclusive.
Value object.
- Author:
- Leonid Bushuev
-
-
Constructor Summary
Constructors Constructor Description IntInterval(int ab)Constructs a zero-length interval, where both bounds are same.IntInterval(int a, int b)Constructs an interval.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(int x)Checks whether the given value is in the interval (both interval bounds are inclusive).booleanequals(Object o)intgetA()Getter forato allow using it in JSP.intgetB()Getter forbto allow using it in JSP.inthashCode()StringtoString()
-
-
-
Method Detail
-
contains
public boolean contains(int x)
Checks whether the given value is in the interval (both interval bounds are inclusive).- Parameters:
x- value to check.- Returns:
- true if the given value is in the interval.
-
getA
public int getA()
Getter forato allow using it in JSP.- Returns:
- the left bound of the interval.
-
getB
public int getB()
Getter forbto allow using it in JSP.- Returns:
- the right bound of the interval.
-
-