Package org.apache.pulsar.client.api
Class Range
java.lang.Object
org.apache.pulsar.client.api.Range
- All Implemented Interfaces:
Serializable,Comparable<Range>
Int range.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleancontains(int value) Check if the value is in the range.booleanCheck if the range is fully contained in the other range.booleanintgetEnd()intgetStart()inthashCode()static Rangeof(int start, int end) intsize()Get the size of the range.toString()
-
Constructor Details
-
Range
public Range(int start, int end)
-
-
Method Details
-
of
-
getStart
public int getStart() -
getEnd
public int getEnd() -
intersect
-
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<Range>
-
contains
public boolean contains(int value) Check if the value is in the range.- Parameters:
value-- Returns:
- true if the value is in the range.
-
contains
Check if the range is fully contained in the other range.- Parameters:
otherRange-- Returns:
- true if the range is fully contained in the other range.
-
size
public int size()Get the size of the range.- Returns:
- the size of the range.
-