|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object checkers.flow.GenKillBits<K>
K
- the type of the keypublic class GenKillBits<K> extends Object
Maintains multiple gen-kill sets, "keyed" by a value. For instance, the
flow-sensitive inference implemented in Flow
uses a
GenKillBits
keyed by AnnotationMirror
s to simultaneously
track the gen-kill sets of multiple type qualifiers.
This class is essentially an abstraction for maintaining and combining multiple simultaneous bit vectors.
Constructor and Description |
---|
GenKillBits(Collection<K> keys)
Creates a new GenKillBits with the specified set of keys. |
GenKillBits(GenKillBits<K> other)
Creates a new GenKillBits that is a deep copy of the
GenKillBits passed as an argument. |
Modifier and Type | Method and Description | |
---|---|---|
void |
and(GenKillBits<K> other)
Merges each gen-kill set in this group with the one corresponding to the same key in other via boolean "and" on each bit. |
|
void |
clear(K key,
int index)
Clears the bit (kill) for the key at the specified index. |
|
static
|
copy(GenKillBits<K> other)
Creates a new GenKillBits that is a deep copy of the
GenKillBits passed as an argument. |
|
boolean |
get(K key,
int index)
Retrieves the bit for the key at the specified index. |
|
void |
or(GenKillBits<K> other)
Merges each gen-kill set in this group with the one corresponding to the same key in other via boolean "or" on each bit. |
|
void |
set(K key,
int index)
Sets the bit (gen) for the key at the specified index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GenKillBits(Collection<K> keys)
GenKillBits
with the specified set of keys.
(Once specified, the keys may not be changed.)
keys
- the keys for the GenKillBits
public GenKillBits(GenKillBits<K> other)
GenKillBits
that is a deep copy of the
GenKillBits
passed as an argument.
other
- the GenKillBits
to copycopy(GenKillBits)
Method Detail |
---|
public static <K> GenKillBits<K> copy(GenKillBits<K> other)
GenKillBits
that is a deep copy of the
GenKillBits
passed as an argument.
K
- the key type of the groupother
- the GenKillBits
to copyg
GenKillBits(GenKillBits)
public void set(K key, int index)
key
- the key for which the bit should be setindex
- the index at which to set the bitIllegalArgumentException
- if the key is not one of the keys for
this grouppublic boolean get(K key, int index)
key
- index
- IllegalArgumentException
- if the key is not one of the keys for
this grouppublic void clear(K key, int index)
key
- the key for which the bit should be setindex
- the index at which to set the bitIllegalArgumentException
- if the key is not one of the keys for
this grouppublic void and(GenKillBits<K> other)
other
via boolean "and" on each bit. Modifies this
gen-kill set.
other
- the group to "and" withIllegalArgumentException
- if the other group is missing a key from
this grouppublic void or(GenKillBits<K> other)
other
via boolean "or" on each bit. Modifies this
gen-kill set.
other
- the group to "or" withIllegalArgumentException
- if the other group is missing a key from
this group
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |