|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcheckers.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 AnnotationMirrors 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. |
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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 GenKillBitspublic 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 copygGenKillBits(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 group
public boolean get(K key,
int index)
key - index - IllegalArgumentException - if the key is not one of the keys for
this group
public 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 grouppublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||