gnu.inet.encoding

Class RangeSet


public final class RangeSet
extends java.lang.Object

Set of integer ranges supporting efficient contains-checks.

Nested Class Summary

static class
RangeSet.Builder
static class
RangeSet.Range

Method Summary

@Override
String toString()
static RangeSet.Builder
builder()
boolean
contains(int i)
boolean
containsAnyCodePoint(CharSequence text)
boolean
containsAnyCodePoint(CharSequence text, RangeSet.Range inputRange)
static RangeSet.Range
createTextRange(CharSequence text)
Returns the range of the input or all-inclusive range if input is empty

Method Details

String toString

public @Override String toString()

builder

public static RangeSet.Builder builder()

contains

public boolean contains(int i)

containsAnyCodePoint

public boolean containsAnyCodePoint(CharSequence text)

containsAnyCodePoint

public boolean containsAnyCodePoint(CharSequence text,
                                    RangeSet.Range inputRange)

createTextRange

public static RangeSet.Range createTextRange(CharSequence text)
Returns the range of the input or all-inclusive range if input is empty
Parameters:
text - input text
Returns:
range of input, or all-inclusive if empty input