public class SubTypeSet
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private IMultiMap<Type,Type> |
subTypes
Maps a type to all its proper subtypes that are in the set.
|
private boolean |
supportsCheckpoints
If true, then
mark() and undoLastStep() are supported. |
java.util.Set<Type> |
types
The members of the set.
|
| Constructor and Description |
|---|
SubTypeSet(boolean supportsCheckpoints) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Type c)
Adds a type to this set.
|
private void |
addQueryType(Type type) |
java.util.Set<Type> |
getMatches(Type type)
Returns all the classes in the set that can-be-used-as the given
c. |
void |
mark()
Checkpoint the state of the data structure, for use by
undoLastStep(). |
int |
size()
Returns the number of elements of this set.
|
void |
undoLastStep()
Undo changes since the last call to
mark(). |
public java.util.Set<Type> types
private IMultiMap<Type,Type> subTypes
private boolean supportsCheckpoints
mark() and undoLastStep() are supported.public void mark()
undoLastStep().public void undoLastStep()
mark().public void add(Type c)
c - the type to be addedprivate void addQueryType(Type type)
public java.util.Set<Type> getMatches(Type type)
c.type - the query typepublic int size()