Package ghidra.generic.util.datastruct
Class DynamicValueSortedTreeMap.ValueSortedTreeMapEntrySet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<java.util.Map.Entry<K,V>>
-
- ghidra.generic.util.datastruct.DynamicValueSortedTreeMap.ValueSortedTreeMapEntrySet
-
- All Implemented Interfaces:
java.lang.Iterable<java.util.Map.Entry<K,V>>
,java.util.Collection<java.util.Map.Entry<K,V>>
,java.util.Deque<java.util.Map.Entry<K,V>>
,java.util.List<java.util.Map.Entry<K,V>>
,java.util.Queue<java.util.Map.Entry<K,V>>
,java.util.Set<java.util.Map.Entry<K,V>>
- Enclosing class:
- DynamicValueSortedTreeMap<K,V>
public class DynamicValueSortedTreeMap.ValueSortedTreeMapEntrySet extends java.util.AbstractSet<java.util.Map.Entry<K,V>> implements java.util.List<java.util.Map.Entry<K,V>>, java.util.Deque<java.util.Map.Entry<K,V>>
A public view of the map as a set of entries In addition toSet
, this view implementsList
andDeque
, since an ordered set ought to behave like a list, and since this implementation is meant to be used as a dynamic-cost priority queue. Generally, all of the mutation methods are supported.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, java.util.Map.Entry<K,V> element)
Inserts (by copy) the entry into the owning map, ignoring indexboolean
add(java.util.Map.Entry<K,V> e)
Inserts (by copy) the entry into the owning mapboolean
addAll(int index, java.util.Collection<? extends java.util.Map.Entry<K,V>> c)
Inserts (by copy) all entries in the collection, ignoring indexvoid
addFirst(java.util.Map.Entry<K,V> e)
Inserts (by copy) the entry at its sorted position, not necessarily firstvoid
addLast(java.util.Map.Entry<K,V> e)
Inserts (by copy) the entry at its sorted position, not necessarily lastvoid
clear()
boolean
contains(java.lang.Object o)
java.util.Iterator<java.util.Map.Entry<K,V>>
descendingIterator()
DynamicValueSortedTreeMap.Node
element()
DynamicValueSortedTreeMap.Node
get(int index)
DynamicValueSortedTreeMap.Node
getFirst()
DynamicValueSortedTreeMap.Node
getLast()
int
indexOf(java.lang.Object o)
boolean
isEmpty()
java.util.Iterator<java.util.Map.Entry<K,V>>
iterator()
int
lastIndexOf(java.lang.Object o)
java.util.ListIterator<java.util.Map.Entry<K,V>>
listIterator()
java.util.ListIterator<java.util.Map.Entry<K,V>>
listIterator(int index)
boolean
offer(java.util.Map.Entry<K,V> e)
boolean
offerFirst(java.util.Map.Entry<K,V> e)
Inserts (by copy) the entry at its sorted position, not necessarily firstboolean
offerLast(java.util.Map.Entry<K,V> e)
Inserts (by copy) the entry at its sorted position, not necessarily lastDynamicValueSortedTreeMap.Node
peek()
DynamicValueSortedTreeMap.Node
peekFirst()
DynamicValueSortedTreeMap.Node
peekLast()
DynamicValueSortedTreeMap.Node
poll()
DynamicValueSortedTreeMap.Node
pollFirst()
DynamicValueSortedTreeMap.Node
pollLast()
DynamicValueSortedTreeMap.Node
pop()
void
push(java.util.Map.Entry<K,V> e)
DynamicValueSortedTreeMap.Node
remove()
DynamicValueSortedTreeMap.Node
remove(int index)
boolean
remove(java.lang.Object o)
DynamicValueSortedTreeMap.Node
removeFirst()
boolean
removeFirstOccurrence(java.lang.Object o)
DynamicValueSortedTreeMap.Node
removeLast()
boolean
removeLastOccurrence(java.lang.Object o)
DynamicValueSortedTreeMap.Node
set(int index, java.util.Map.Entry<K,V> element)
Modify the entry (key and value) at index Because the map is sorted by value, the index of the given entry may not remain the same after it is modified.int
size()
java.util.Spliterator<java.util.Map.Entry<K,V>>
spliterator()
java.util.List<java.util.Map.Entry<K,V>>
subList(int fromIndex, int toIndex)
This operation is not supported-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
add
public boolean add(java.util.Map.Entry<K,V> e)
Inserts (by copy) the entry into the owning map- Specified by:
add
in interfacejava.util.Collection<java.util.Map.Entry<K,V>>
- Specified by:
add
in interfacejava.util.Deque<java.util.Map.Entry<K,V>>
- Specified by:
add
in interfacejava.util.List<java.util.Map.Entry<K,V>>
- Specified by:
add
in interfacejava.util.Queue<java.util.Map.Entry<K,V>>
- Specified by:
add
in interfacejava.util.Set<java.util.Map.Entry<K,V>>
- Overrides:
add
in classjava.util.AbstractCollection<java.util.Map.Entry<K,V>>
-
add
public void add(int index, java.util.Map.Entry<K,V> element)
Inserts (by copy) the entry into the owning map, ignoring index
-
addAll
public boolean addAll(int index, java.util.Collection<? extends java.util.Map.Entry<K,V>> c)
Inserts (by copy) all entries in the collection, ignoring index
-
addFirst
public void addFirst(java.util.Map.Entry<K,V> e)
Inserts (by copy) the entry at its sorted position, not necessarily first
-
addLast
public void addLast(java.util.Map.Entry<K,V> e)
Inserts (by copy) the entry at its sorted position, not necessarily last
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Collection<java.util.Map.Entry<K,V>>
- Specified by:
clear
in interfacejava.util.List<java.util.Map.Entry<K,V>>
- Specified by:
clear
in interfacejava.util.Set<java.util.Map.Entry<K,V>>
- Overrides:
clear
in classjava.util.AbstractCollection<java.util.Map.Entry<K,V>>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
contains
in interfacejava.util.Collection<java.util.Map.Entry<K,V>>
- Specified by:
contains
in interfacejava.util.Deque<java.util.Map.Entry<K,V>>
- Specified by:
contains
in interfacejava.util.List<java.util.Map.Entry<K,V>>
- Specified by:
contains
in interfacejava.util.Set<java.util.Map.Entry<K,V>>
- Overrides:
contains
in classjava.util.AbstractCollection<java.util.Map.Entry<K,V>>
-
element
public DynamicValueSortedTreeMap.Node element()
-
get
public DynamicValueSortedTreeMap.Node get(int index)
-
getFirst
public DynamicValueSortedTreeMap.Node getFirst()
-
getLast
public DynamicValueSortedTreeMap.Node getLast()
-
indexOf
public int indexOf(java.lang.Object o)
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Collection<java.util.Map.Entry<K,V>>
- Specified by:
isEmpty
in interfacejava.util.List<java.util.Map.Entry<K,V>>
- Specified by:
isEmpty
in interfacejava.util.Set<java.util.Map.Entry<K,V>>
- Overrides:
isEmpty
in classjava.util.AbstractCollection<java.util.Map.Entry<K,V>>
-
iterator
public java.util.Iterator<java.util.Map.Entry<K,V>> iterator()
- Specified by:
iterator
in interfacejava.util.Collection<java.util.Map.Entry<K,V>>
- Specified by:
iterator
in interfacejava.util.Deque<java.util.Map.Entry<K,V>>
- Specified by:
iterator
in interfacejava.lang.Iterable<java.util.Map.Entry<K,V>>
- Specified by:
iterator
in interfacejava.util.List<java.util.Map.Entry<K,V>>
- Specified by:
iterator
in interfacejava.util.Set<java.util.Map.Entry<K,V>>
- Specified by:
iterator
in classjava.util.AbstractCollection<java.util.Map.Entry<K,V>>
-
lastIndexOf
public int lastIndexOf(java.lang.Object o)
-
offerFirst
public boolean offerFirst(java.util.Map.Entry<K,V> e)
Inserts (by copy) the entry at its sorted position, not necessarily first
-
offerLast
public boolean offerLast(java.util.Map.Entry<K,V> e)
Inserts (by copy) the entry at its sorted position, not necessarily last
-
peek
public DynamicValueSortedTreeMap.Node peek()
-
peekFirst
public DynamicValueSortedTreeMap.Node peekFirst()
-
peekLast
public DynamicValueSortedTreeMap.Node peekLast()
-
poll
public DynamicValueSortedTreeMap.Node poll()
-
pollFirst
public DynamicValueSortedTreeMap.Node pollFirst()
-
pollLast
public DynamicValueSortedTreeMap.Node pollLast()
-
pop
public DynamicValueSortedTreeMap.Node pop()
-
remove
public DynamicValueSortedTreeMap.Node remove()
-
remove
public DynamicValueSortedTreeMap.Node remove(int index)
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove
in interfacejava.util.Collection<java.util.Map.Entry<K,V>>
- Specified by:
remove
in interfacejava.util.Deque<java.util.Map.Entry<K,V>>
- Specified by:
remove
in interfacejava.util.List<java.util.Map.Entry<K,V>>
- Specified by:
remove
in interfacejava.util.Set<java.util.Map.Entry<K,V>>
- Overrides:
remove
in classjava.util.AbstractCollection<java.util.Map.Entry<K,V>>
-
removeFirst
public DynamicValueSortedTreeMap.Node removeFirst()
-
removeFirstOccurrence
public boolean removeFirstOccurrence(java.lang.Object o)
-
removeLast
public DynamicValueSortedTreeMap.Node removeLast()
-
removeLastOccurrence
public boolean removeLastOccurrence(java.lang.Object o)
-
set
public DynamicValueSortedTreeMap.Node set(int index, java.util.Map.Entry<K,V> element)
Modify the entry (key and value) at index Because the map is sorted by value, the index of the given entry may not remain the same after it is modified. In fact, this is equivalent to removing the entry at the given index, and then inserting the given entry at its sorted position.
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<java.util.Map.Entry<K,V>>
- Specified by:
size
in interfacejava.util.Deque<java.util.Map.Entry<K,V>>
- Specified by:
size
in interfacejava.util.List<java.util.Map.Entry<K,V>>
- Specified by:
size
in interfacejava.util.Set<java.util.Map.Entry<K,V>>
- Specified by:
size
in classjava.util.AbstractCollection<java.util.Map.Entry<K,V>>
-
spliterator
public java.util.Spliterator<java.util.Map.Entry<K,V>> spliterator()
- Specified by:
spliterator
in interfacejava.util.Collection<java.util.Map.Entry<K,V>>
- Specified by:
spliterator
in interfacejava.lang.Iterable<java.util.Map.Entry<K,V>>
- Specified by:
spliterator
in interfacejava.util.List<java.util.Map.Entry<K,V>>
- Specified by:
spliterator
in interfacejava.util.Set<java.util.Map.Entry<K,V>>
-
-