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 implementsListandDeque, 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 voidadd(int index, java.util.Map.Entry<K,V> element)Inserts (by copy) the entry into the owning map, ignoring indexbooleanadd(java.util.Map.Entry<K,V> e)Inserts (by copy) the entry into the owning mapbooleanaddAll(int index, java.util.Collection<? extends java.util.Map.Entry<K,V>> c)Inserts (by copy) all entries in the collection, ignoring indexvoidaddFirst(java.util.Map.Entry<K,V> e)Inserts (by copy) the entry at its sorted position, not necessarily firstvoidaddLast(java.util.Map.Entry<K,V> e)Inserts (by copy) the entry at its sorted position, not necessarily lastvoidclear()booleancontains(java.lang.Object o)java.util.Iterator<java.util.Map.Entry<K,V>>descendingIterator()DynamicValueSortedTreeMap.Nodeelement()DynamicValueSortedTreeMap.Nodeget(int index)DynamicValueSortedTreeMap.NodegetFirst()DynamicValueSortedTreeMap.NodegetLast()intindexOf(java.lang.Object o)booleanisEmpty()java.util.Iterator<java.util.Map.Entry<K,V>>iterator()intlastIndexOf(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)booleanoffer(java.util.Map.Entry<K,V> e)booleanofferFirst(java.util.Map.Entry<K,V> e)Inserts (by copy) the entry at its sorted position, not necessarily firstbooleanofferLast(java.util.Map.Entry<K,V> e)Inserts (by copy) the entry at its sorted position, not necessarily lastDynamicValueSortedTreeMap.Nodepeek()DynamicValueSortedTreeMap.NodepeekFirst()DynamicValueSortedTreeMap.NodepeekLast()DynamicValueSortedTreeMap.Nodepoll()DynamicValueSortedTreeMap.NodepollFirst()DynamicValueSortedTreeMap.NodepollLast()DynamicValueSortedTreeMap.Nodepop()voidpush(java.util.Map.Entry<K,V> e)DynamicValueSortedTreeMap.Noderemove()DynamicValueSortedTreeMap.Noderemove(int index)booleanremove(java.lang.Object o)DynamicValueSortedTreeMap.NoderemoveFirst()booleanremoveFirstOccurrence(java.lang.Object o)DynamicValueSortedTreeMap.NoderemoveLast()booleanremoveLastOccurrence(java.lang.Object o)DynamicValueSortedTreeMap.Nodeset(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.intsize()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:
addin interfacejava.util.Collection<java.util.Map.Entry<K,V>>- Specified by:
addin interfacejava.util.Deque<java.util.Map.Entry<K,V>>- Specified by:
addin interfacejava.util.List<java.util.Map.Entry<K,V>>- Specified by:
addin interfacejava.util.Queue<java.util.Map.Entry<K,V>>- Specified by:
addin interfacejava.util.Set<java.util.Map.Entry<K,V>>- Overrides:
addin 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:
clearin interfacejava.util.Collection<java.util.Map.Entry<K,V>>- Specified by:
clearin interfacejava.util.List<java.util.Map.Entry<K,V>>- Specified by:
clearin interfacejava.util.Set<java.util.Map.Entry<K,V>>- Overrides:
clearin classjava.util.AbstractCollection<java.util.Map.Entry<K,V>>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
containsin interfacejava.util.Collection<java.util.Map.Entry<K,V>>- Specified by:
containsin interfacejava.util.Deque<java.util.Map.Entry<K,V>>- Specified by:
containsin interfacejava.util.List<java.util.Map.Entry<K,V>>- Specified by:
containsin interfacejava.util.Set<java.util.Map.Entry<K,V>>- Overrides:
containsin 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:
isEmptyin interfacejava.util.Collection<java.util.Map.Entry<K,V>>- Specified by:
isEmptyin interfacejava.util.List<java.util.Map.Entry<K,V>>- Specified by:
isEmptyin interfacejava.util.Set<java.util.Map.Entry<K,V>>- Overrides:
isEmptyin classjava.util.AbstractCollection<java.util.Map.Entry<K,V>>
-
iterator
public java.util.Iterator<java.util.Map.Entry<K,V>> iterator()
- Specified by:
iteratorin interfacejava.util.Collection<java.util.Map.Entry<K,V>>- Specified by:
iteratorin interfacejava.util.Deque<java.util.Map.Entry<K,V>>- Specified by:
iteratorin interfacejava.lang.Iterable<java.util.Map.Entry<K,V>>- Specified by:
iteratorin interfacejava.util.List<java.util.Map.Entry<K,V>>- Specified by:
iteratorin interfacejava.util.Set<java.util.Map.Entry<K,V>>- Specified by:
iteratorin 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:
removein interfacejava.util.Collection<java.util.Map.Entry<K,V>>- Specified by:
removein interfacejava.util.Deque<java.util.Map.Entry<K,V>>- Specified by:
removein interfacejava.util.List<java.util.Map.Entry<K,V>>- Specified by:
removein interfacejava.util.Set<java.util.Map.Entry<K,V>>- Overrides:
removein 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:
sizein interfacejava.util.Collection<java.util.Map.Entry<K,V>>- Specified by:
sizein interfacejava.util.Deque<java.util.Map.Entry<K,V>>- Specified by:
sizein interfacejava.util.List<java.util.Map.Entry<K,V>>- Specified by:
sizein interfacejava.util.Set<java.util.Map.Entry<K,V>>- Specified by:
sizein classjava.util.AbstractCollection<java.util.Map.Entry<K,V>>
-
spliterator
public java.util.Spliterator<java.util.Map.Entry<K,V>> spliterator()
- Specified by:
spliteratorin interfacejava.util.Collection<java.util.Map.Entry<K,V>>- Specified by:
spliteratorin interfacejava.lang.Iterable<java.util.Map.Entry<K,V>>- Specified by:
spliteratorin interfacejava.util.List<java.util.Map.Entry<K,V>>- Specified by:
spliteratorin interfacejava.util.Set<java.util.Map.Entry<K,V>>
-
-