Package ghidra.generic.util.datastruct
Class TreeValueSortedMap.ValueSortedTreeMapKeySet
java.lang.Object
java.util.AbstractCollection<K>
java.util.AbstractSet<K>
ghidra.generic.util.datastruct.TreeValueSortedMap.ValueSortedTreeMapKeySet
- All Implemented Interfaces:
ValueSortedMap.LesserList<K>
,ValueSortedMap.ValueSortedMapKeyList<K>
,Iterable<K>
,Collection<K>
,Set<K>
- Enclosing class:
TreeValueSortedMap<K,
V>
protected class TreeValueSortedMap.ValueSortedTreeMapKeySet
extends AbstractSet<K>
implements ValueSortedMap.ValueSortedMapKeyList<K>
A public view of the map as a set of keys
In addition to
Set
, this view implements List
and Deque
, 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, only the removal mutation methods are supported, all others are not supported.-
Method Summary
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
Methods inherited from class java.util.AbstractCollection
add, 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.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.Set
add, addAll, containsAll, retainAll, spliterator, toArray, toArray
Methods inherited from interface ghidra.generic.util.datastruct.ValueSortedMap.LesserList
removeAll
-
Method Details
-
toList
Description copied from interface:ValueSortedMap.LesserList
Copy this to a new list- Specified by:
toList
in interfaceValueSortedMap.LesserList<K>
- Returns:
- the list
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<K>
- Specified by:
clear
in interfaceSet<K>
- Overrides:
clear
in classAbstractCollection<K>
-
contains
- Specified by:
contains
in interfaceCollection<K>
- Specified by:
contains
in interfaceSet<K>
- Specified by:
contains
in interfaceValueSortedMap.LesserList<K>
- Overrides:
contains
in classAbstractCollection<K>
-
get
Description copied from interface:ValueSortedMap.LesserList
Get the element at the given index- Specified by:
get
in interfaceValueSortedMap.LesserList<K>
- Parameters:
index
- the index- Returns:
- the element
-
indexOf
Description copied from interface:ValueSortedMap.LesserList
Get the index of a given elementReturns the index of the element, or -1 if not found
- Specified by:
indexOf
in interfaceValueSortedMap.LesserList<K>
- Parameters:
o
- the object- Returns:
- the index or -1
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<K>
- Specified by:
isEmpty
in interfaceSet<K>
- Specified by:
isEmpty
in interfaceValueSortedMap.LesserList<K>
- Overrides:
isEmpty
in classAbstractCollection<K>
-
listIterator
- Specified by:
listIterator
in interfaceValueSortedMap.LesserList<K>
-
iterator
-
poll
Description copied from interface:ValueSortedMap.LesserList
Get and remove the first element- Specified by:
poll
in interfaceValueSortedMap.LesserList<K>
- Returns:
- the first element, or null if empty
-
remove
- Specified by:
remove
in interfaceCollection<K>
- Specified by:
remove
in interfaceSet<K>
- Specified by:
remove
in interfaceValueSortedMap.LesserList<K>
- Overrides:
remove
in classAbstractCollection<K>
-
size
public int size()- Specified by:
size
in interfaceCollection<K>
- Specified by:
size
in interfaceSet<K>
- Specified by:
size
in interfaceValueSortedMap.LesserList<K>
- Specified by:
size
in classAbstractCollection<K>
-