Package gnu.inet.encoding
Class RangeSet
- java.lang.Object
-
- gnu.inet.encoding.RangeSet
-
public final class RangeSet extends java.lang.Object
Set of integer ranges supporting efficient contains-checks.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RangeSet.Builder
static class
RangeSet.Range
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RangeSet.Builder
builder()
boolean
contains(int i)
boolean
containsAnyCodePoint(java.lang.CharSequence text)
boolean
containsAnyCodePoint(java.lang.CharSequence text, RangeSet.Range inputRange)
static RangeSet.Range
createTextRange(java.lang.CharSequence text)
Returns the range of the input orall-inclusive range
if input is emptyjava.lang.String
toString()
-
-
-
Method Detail
-
builder
public static RangeSet.Builder builder()
-
contains
public boolean contains(int i)
-
containsAnyCodePoint
public boolean containsAnyCodePoint(java.lang.CharSequence text)
-
containsAnyCodePoint
public boolean containsAnyCodePoint(java.lang.CharSequence text, RangeSet.Range inputRange)
-
createTextRange
public static RangeSet.Range createTextRange(java.lang.CharSequence text)
Returns the range of the input orall-inclusive range
if input is empty- Parameters:
text
- input text- Returns:
- range of input, or
all-inclusive
if empty input
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-