|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.brics.grammar.operations.CharSet
public class CharSet
Representation of a set of chars using an ordered list of intervals.
Constructor Summary | |
---|---|
CharSet()
Constructs a new empty charset. |
|
CharSet(Automaton a,
boolean first_only,
boolean last_only,
boolean expanded)
Constructs a charset from the chars occuring in the given automaton. |
|
CharSet(String s,
boolean first_only,
boolean last_only,
boolean expanded)
Constructs a charset from the chars occuring in the given string. |
Method Summary | |
---|---|
boolean |
add(CharSet cs)
Adds chars from the given charset to this charset. |
boolean |
addEOF()
Adds EOF this charset. |
boolean |
contains(char c)
Checks whether this charset contains the given char. |
boolean |
containsEOF()
Checks whether this charset contains EOF. |
boolean |
disjoint(CharSet cs)
Checks whether this charset is disjoint from the given one. |
boolean |
equals(Object obj)
|
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CharSet()
public CharSet(Automaton a, boolean first_only, boolean last_only, boolean expanded)
a
- automatonfirst_only
- of set, only consider transitions from the start statelast_only
- of set, only consider transitions to an accept stateexpanded
- if set, assume alphabet has been expandedpublic CharSet(String s, boolean first_only, boolean last_only, boolean expanded)
s
- stringfirst_only
- of set, only consider first characterlast_only
- of set, only consider last characterexpanded
- if set, assume alphabet has been expandedMethod Detail |
---|
public boolean add(CharSet cs)
cs
- charset
public boolean addEOF()
public boolean contains(char c)
c
- char
public boolean containsEOF()
public boolean disjoint(CharSet cs)
cs
- charset
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |