Package ghidra.generic.util.datastruct
Class TreeValueSortedMap.ValueSortedTreeMapEntrySet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<java.util.Map.Entry<K,V>>
-
- ghidra.generic.util.datastruct.TreeValueSortedMap.ValueSortedTreeMapEntrySet
-
- All Implemented Interfaces:
ValueSortedMap.ValueSortedMapEntryList<K,V>
,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:
- TreeValueSortedMap<K,V>
protected class TreeValueSortedMap.ValueSortedTreeMapEntrySet extends java.util.AbstractSet<java.util.Map.Entry<K,V>> implements ValueSortedMap.ValueSortedMapEntryList<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()
java.util.Map.Entry<K,V>
element()
java.util.Map.Entry<K,V>
get(int index)
java.util.Map.Entry<K,V>
getFirst()
java.util.Map.Entry<K,V>
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 lastjava.util.Map.Entry<K,V>
peek()
java.util.Map.Entry<K,V>
peekFirst()
java.util.Map.Entry<K,V>
peekLast()
java.util.Map.Entry<K,V>
poll()
java.util.Map.Entry<K,V>
pollFirst()
java.util.Map.Entry<K,V>
pollLast()
java.util.Map.Entry<K,V>
pop()
void
push(java.util.Map.Entry<K,V> e)
java.util.Map.Entry<K,V>
remove()
java.util.Map.Entry<K,V>
remove(int index)
boolean
remove(java.lang.Object o)
java.util.Map.Entry<K,V>
removeFirst()
boolean
removeFirstOccurrence(java.lang.Object o)
java.util.Map.Entry<K,V>
removeLast()
boolean
removeLastOccurrence(java.lang.Object o)
java.util.Map.Entry<K,V>
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.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
-
Methods inherited from interface java.util.List
addAll, containsAll, equals, hashCode, removeAll, replaceAll, retainAll, sort, toArray, toArray
-
Methods inherited from interface java.util.Set
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
-
Methods inherited from interface ghidra.generic.util.datastruct.ValueSortedMap.ValueSortedMapEntryList
spliterator
-
-
-
-
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>>
-
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
-
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>>
-
removeFirstOccurrence
public boolean removeFirstOccurrence(java.lang.Object o)
-
removeLastOccurrence
public boolean removeLastOccurrence(java.lang.Object o)
-
set
public java.util.Map.Entry<K,V> 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>>
-
-