Package edu.umd.cs.findbugs.ba.vna
Class ValueNumberFrame.AvailableLoadBiMap
java.lang.Object
edu.umd.cs.findbugs.ba.vna.ValueNumberFrame.AvailableLoadBiMap
- Enclosing class:
ValueNumberFrame
A wrapper for the AvailableLoad to ValueNumber[] map also keeping track of a reverse map. There are a lot of
calls to
ValueNumberFrame.getLoad(ValueNumber)
so it is faster using a reverse map compared to doing a
linear search-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map
<AvailableLoad, ValueNumber[]> private final Map
<ValueNumber, AvailableLoad> -
Constructor Summary
ConstructorsConstructorDescriptionAvailableLoadBiMap
(Map<AvailableLoad, ValueNumber[]> map, Map<ValueNumber, AvailableLoad> reverseMap) -
Method Summary
Modifier and TypeMethodDescriptionemptyMap()
entrySet()
get
(AvailableLoad key) boolean
isEmpty()
boolean
keySet()
put
(AvailableLoad key, ValueNumber[] value) Put an array ofValueNumber
for anAvailableLoad
and update the reverse mapremove
(AvailableLoad key) Remove anAvailableLoad
and update the reverse mapint
size()
void
updateEntryValue
(Map.Entry<AvailableLoad, ValueNumber[]> e, ValueNumber value)
-
Field Details
-
map
-
reverseMap
-
-
Constructor Details
-
AvailableLoadBiMap
-
AvailableLoadBiMap
public AvailableLoadBiMap(Map<AvailableLoad, ValueNumber[]> map, Map<ValueNumber, AvailableLoad> reverseMap)
-
-
Method Details
-
emptyMap
- Returns:
- an empty (unmodifiable)
ValueNumberFrame.AvailableLoadBiMap
-
unmodifiableMap
public static ValueNumberFrame.AvailableLoadBiMap unmodifiableMap(ValueNumberFrame.AvailableLoadBiMap other) - Parameters:
other
- The map we want to copy- Returns:
- an unmodifiable copy backed by the
other
ValueNumberFrame.AvailableLoadBiMap
-
size
public int size()- Returns:
- The number of distinct
AvailableLoad
in this map
-
isEmpty
public boolean isEmpty() -
keySet
-
entrySet
-
get
-
put
Put an array ofValueNumber
for anAvailableLoad
and update the reverse map -
updateEntryValue
-
remove
Remove anAvailableLoad
and update the reverse map -
getLoad
-
isModifiable
public boolean isModifiable()
-