public final class IntCharSet extends Object
[fixme: optimizations possible]
Constructor and Description |
---|
IntCharSet()
Constructor for IntCharSet.
|
IntCharSet(int c)
Constructor for IntCharSet.
|
IntCharSet(Interval interval)
Constructor for IntCharSet.
|
IntCharSet(List<Interval> chars)
Constructor for IntCharSet.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int c)
add.
|
IntCharSet |
add(IntCharSet set)
add.
|
void |
add(Interval interval)
add.
|
IntCharSet |
and(IntCharSet set)
Intersects two sets.
|
boolean |
contains(int singleChar)
contains.
|
boolean |
containsElements()
Returns whether the set contains elements.
|
IntCharSet |
copy()
Return a (deep) copy of this char set
|
boolean |
equals(Object o) |
IntCharSet |
getCaseless(UnicodeProperties unicodeProperties)
Create a caseless version of this charset.
|
List<Interval> |
getIntervals()
Returns the intervals.
|
Interval |
getNext()
Returns the next interval.
|
int |
numIntervals()
Returns the number of Intervals.
|
void |
sub(IntCharSet set)
Returns the relative complement of this set relative to the provided set.
|
String |
toString()
Make a string representation of this char set.
|
public IntCharSet()
public IntCharSet(int c)
c
- a int.public IntCharSet(Interval interval)
interval
- a Interval
object.public IntCharSet add(IntCharSet set)
set
- a IntCharSet
object.IntCharSet
object.public void add(int c)
c
- a int.public boolean contains(int singleChar)
singleChar
- a int.public IntCharSet and(IntCharSet set)
set
- a IntCharSet
object.IntCharSet
common to the two sets.public void sub(IntCharSet set)
set
- a IntCharSet
to substract from this set.public boolean containsElements()
public int numIntervals()
public IntCharSet getCaseless(UnicodeProperties unicodeProperties)
The caseless version contains all characters of this char set, and additionally all lower/upper/title case variants of the characters in this set.
unicodeProperties
- The Unicode Properties to use when generating caseless equivalence
classes.public String toString()
public IntCharSet copy()
Copyright © 1998–2020. All rights reserved.