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 boolean
contains(int x)
Checks whether the given value is in the interval (both interval bounds are inclusive).boolean
equals(Object o)
int
getA()
Getter fora
to allow using it in JSP.int
getB()
Getter forb
to allow using it in JSP.int
hashCode()
String
toString()
-
-
-
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 fora
to allow using it in JSP.- Returns:
- the left bound of the interval.
-
getB
public int getB()
Getter forb
to allow using it in JSP.- Returns:
- the right bound of the interval.
-
-