Class RangeSet
- All Implemented Interfaces:
Comparable<RangeSet>, Iterable<Range>, Collection<Range>, Set<Range>
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends Range> c) static RangeSet.Builderbuilder()intintbooleancontainsCodepoint(int codepoint) booleanprivate static intfirstCodepoint(long range) inthashCode()intersection(RangeSet rangeSet) booleaniterator()private static intlastCodepoint(long range) static RangeSetprivate static longrange(int firstCodepoint, int lastCodepoint) intsize()toCharset(boolean isDeleted) toJava()toString()Methods inherited from class AbstractSet
removeAllMethods inherited from class AbstractCollection
clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArrayMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface Set
clear, contains, containsAll, isEmpty, remove, retainAll, spliterator, toArray, toArray
-
Field Details
-
EOI
-
ranges
private final long[] ranges -
EMPTY
-
-
Constructor Details
-
RangeSet
private RangeSet(long[] ranges)
-
-
Method Details
-
complement
-
union
-
intersection
-
minus
-
containsCodepoint
public boolean containsCodepoint(int codepoint) -
firstCodepoint
private static int firstCodepoint(long range) -
lastCodepoint
private static int lastCodepoint(long range) -
range
private static long range(int firstCodepoint, int lastCodepoint) -
charCount
public int charCount() -
isSingleton
public boolean isSingleton() -
toString
- Overrides:
toStringin classAbstractCollection<Range>
-
rangesAsStream
-
toJava
-
iterator
-
size
public int size()- Specified by:
sizein interfaceCollection<Range>- Specified by:
sizein interfaceSet<Range>- Specified by:
sizein classAbstractCollection<Range>
-
add
- Specified by:
addin interfaceCollection<Range>- Specified by:
addin interfaceSet<Range>- Overrides:
addin classAbstractCollection<Range>
-
addAll
- Specified by:
addAllin interfaceCollection<Range>- Specified by:
addAllin interfaceSet<Range>- Overrides:
addAllin classAbstractCollection<Range>
-
compareTo
- Specified by:
compareToin interfaceComparable<RangeSet>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<Range>- Specified by:
hashCodein interfaceSet<Range>- Overrides:
hashCodein classAbstractSet<Range>
-
equals
- Specified by:
equalsin interfaceCollection<Range>- Specified by:
equalsin interfaceSet<Range>- Overrides:
equalsin classAbstractSet<Range>
-
builder
-
of
-
toCharset
-
shortName
-