public final class IntCharSet
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static boolean |
DEBUG |
private java.util.List<Interval> |
intervals |
private int |
pos |
Constructor and Description |
---|
IntCharSet() |
IntCharSet(int c) |
IntCharSet(Interval interval) |
IntCharSet(java.util.List<Interval> chars) |
Modifier and Type | Method and Description |
---|---|
void |
add(int c) |
IntCharSet |
add(IntCharSet set) |
void |
add(Interval interval) |
IntCharSet |
and(IntCharSet set) |
boolean |
contains(int singleChar) |
boolean |
containsElements() |
IntCharSet |
copy()
Return a (deep) copy of this char set
|
boolean |
equals(java.lang.Object o)
o instanceof Interval
|
IntCharSet |
getCaseless(UnicodeProperties unicodeProperties)
Create a caseless version of this charset.
|
java.util.List<Interval> |
getIntervals() |
Interval |
getNext() |
private int |
indexOf(int c)
returns the index of the interval that contains
the character c, -1 if there is no such interval
|
private int |
max(int a,
int b) |
private int |
min(int a,
int b) |
int |
numIntervals() |
void |
sub(IntCharSet set) |
java.lang.String |
toString()
Make a string representation of this char set.
|
private static final boolean DEBUG
private java.util.List<Interval> intervals
private int pos
public IntCharSet()
public IntCharSet(int c)
public IntCharSet(Interval interval)
public IntCharSet(java.util.List<Interval> chars)
private int indexOf(int c)
c
- the characterpublic IntCharSet add(IntCharSet set)
public void add(Interval interval)
public void add(int c)
public boolean contains(int singleChar)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
private int min(int a, int b)
private int max(int a, int b)
public IntCharSet and(IntCharSet set)
public void sub(IntCharSet set)
public boolean containsElements()
public int numIntervals()
public java.util.List<Interval> getIntervals()
public Interval getNext()
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 java.lang.String toString()
toString
in class java.lang.Object
public IntCharSet copy()