K - the type of the keypublic class GenKillBits<K extends @NonNull Object> extends @NonNull Object
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 |
|---|---|
static void |
andlub(GenKillBits<@Nullable AnnotationMirror> outarg1,
GenKillBits<@Nullable AnnotationMirror> arg2,
QualifierHierarchy annoRelations)
Merges each gen-kill set in outarg1 with the one corresponding to the
same key in
arg2 via boolean "and" on each bit. |
void |
clear(K key,
int index)
Clears the bit (kill) for the key at the specified index.
|
void |
clearInAll(int index)
For all keys, clear the bit at the given index.
|
boolean |
contains(K key) |
static <K extends @NonNull Object> |
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.
|
static void |
orlub(GenKillBits<@Nullable AnnotationMirror> outarg1,
GenKillBits<@Nullable AnnotationMirror> arg2,
QualifierHierarchy annoRelations)
Merges each gen-kill set outarg1 with the one corresponding to the
same key in
arg2 via boolean "or" on each bit. |
void |
set(K key,
int index)
Sets the bit (gen) for the key at the specified index.
|
@ReadOnly String |
toString() |
boolean |
valid() |
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)public static <K extends @NonNull Object> 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 bitpublic boolean get(K key, int index)
key - index - public boolean contains(K key)
public void clear(K key, int index)
key - the key for which the bit should be setindex - the index at which to set the bitpublic void clearInAll(int index)
public static void andlub(GenKillBits<@Nullable AnnotationMirror> outarg1, GenKillBits<@Nullable AnnotationMirror> arg2, QualifierHierarchy annoRelations)
arg2 via boolean "and" on each bit. Modifies outarg1's
gen-kill set. If arg2 is missing a key in outarg1 then an empty set is
added to arg2 for the key.
TODO: luboutarg1 - the group to modifyarg2 - the group to "and" withpublic static void orlub(GenKillBits<@Nullable AnnotationMirror> outarg1, GenKillBits<@Nullable AnnotationMirror> arg2, QualifierHierarchy annoRelations)
arg2 via boolean "or" on each bit. Modifies outarg1
gen-kill set. If arg2 is missing a key in outarg1 then an empty set is
added to arg2 for the key.
TODO: lub.outarg1 - the group to modifyarg2 - the group to "or" withpublic boolean valid()