Class MapFact<K,V>
java.lang.Object
pascal.taie.analysis.dataflow.fact.MapFact<K,V>
- Type Parameters:
K
- type of keysV
- type of values
- Direct Known Subclasses:
CPFact
Represents map-like data-flow facts.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears all content in this fact.copy()
Creates and returns a copy of this fact.boolean
Copies the content from given fact to this fact.entries()
boolean
void
forEach
(BiConsumer<K, V> action) Performs the given action for each entry(key-value mapping) in this fact until all entries have been processed or the action throws an exception.int
hashCode()
keySet()
Removes the key-value mapping for given key.toString()
boolean
Updates the key-value mapping in this fact.
-
Field Details
-
map
The map holding the mappings of this MapFact.
-
-
Constructor Details
-
MapFact
Constructs a new MapFact with the same mappings as specified Map.- Parameters:
map
- the map whose mappings are to be placed in this map.
-
-
Method Details
-
get
- Returns:
- the value to which the specified key is mapped, or null if this map contains no mapping for the key.
-
update
Updates the key-value mapping in this fact.- Returns:
- if the update changes this fact.
-
remove
Removes the key-value mapping for given key.- Returns:
- the previous value associated with key, or null if there was no mapping for key.
-
copyFrom
Copies the content from given fact to this fact.- Returns:
- true if this fact changed as a result of the call, otherwise false.
-
copy
Creates and returns a copy of this fact. -
clear
public void clear()Clears all content in this fact. -
keySet
- Returns:
- a
Set
view of the keys contained in this fact.
-
entries
- Returns:
- all entries (key-value mappings) in this fact.
-
forEach
Performs the given action for each entry(key-value mapping) in this fact until all entries have been processed or the action throws an exception.- Parameters:
action
- the action to be performed for each entry.
-
equals
-
hashCode
public int hashCode() -
toString
-