Package ghidra.generic.util.datastruct
Class TreeValueSortedMap.ValueSortedTreeMapValues
java.lang.Object
java.util.AbstractCollection<V>
ghidra.generic.util.datastruct.TreeValueSortedMap.ValueSortedTreeMapValues
- All Implemented Interfaces:
SortedList<V>
,ValueSortedMap.LesserList<V>
,Iterable<V>
,Collection<V>
- Enclosing class:
TreeValueSortedMap<K,
V>
protected class TreeValueSortedMap.ValueSortedTreeMapValues
extends AbstractCollection<V>
implements SortedList<V>
A public view of the map as a list of values
This view implements
SortedList
and Deque
, since an ordered collection 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
Modifier and TypeMethodDescriptionint
ceilingIndex
(V element) Returns the least index in this list whose element is greater than or equal to the specified elementvoid
clear()
boolean
int
floorIndex
(V element) Returns the greatest index in this list whose element is less than or equal to the specified elementget
(int index) Get the element at the given indexint
higherIndex
(V element) Returns the least index in this list whose element is strictly greater the specified elementint
Get the index of a given elementboolean
isEmpty()
iterator()
listIterator
(int index) int
lowerIndex
(V element) Returns the greatest index in this list whose element is strictly less than the specified elementpoll()
Get and remove the first elementboolean
int
size()
toList()
Copy this to a new listMethods inherited from class java.util.AbstractCollection
add, addAll, containsAll, removeAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, 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<V>
- Returns:
- the list
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<V>
- Overrides:
clear
in classAbstractCollection<V>
-
contains
- Specified by:
contains
in interfaceCollection<V>
- Specified by:
contains
in interfaceValueSortedMap.LesserList<V>
- Overrides:
contains
in classAbstractCollection<V>
-
get
Description copied from interface:ValueSortedMap.LesserList
Get the element at the given index- Specified by:
get
in interfaceValueSortedMap.LesserList<V>
- 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<V>
- Parameters:
o
- the object- Returns:
- the index or -1
-
lowerIndex
Description copied from interface:SortedList
Returns the greatest index in this list whose element is strictly less than the specified element- Specified by:
lowerIndex
in interfaceSortedList<V>
- Parameters:
element
- the element to search for- Returns:
- the index of the found element, or -1
-
floorIndex
Description copied from interface:SortedList
Returns the greatest index in this list whose element is less than or equal to the specified elementIf multiples of the specified element exist, this returns the least index of that element.
- Specified by:
floorIndex
in interfaceSortedList<V>
- Parameters:
element
- the element to search for- Returns:
- the index of the found element, or -1
-
ceilingIndex
Description copied from interface:SortedList
Returns the least index in this list whose element is greater than or equal to the specified elementIf multiples of the specified element exist, this returns the greatest index of that element.
- Specified by:
ceilingIndex
in interfaceSortedList<V>
- Parameters:
element
- the element to search for- Returns:
- the index of the found element, or -1
-
higherIndex
Description copied from interface:SortedList
Returns the least index in this list whose element is strictly greater the specified element- Specified by:
higherIndex
in interfaceSortedList<V>
- Parameters:
element
- the element to search for- Returns:
- the index of the found element, or -1
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<V>
- Specified by:
isEmpty
in interfaceValueSortedMap.LesserList<V>
- Overrides:
isEmpty
in classAbstractCollection<V>
-
listIterator
- Specified by:
listIterator
in interfaceValueSortedMap.LesserList<V>
-
iterator
- Specified by:
iterator
in interfaceCollection<V>
- Specified by:
iterator
in interfaceIterable<V>
- Specified by:
iterator
in classAbstractCollection<V>
-
poll
Description copied from interface:ValueSortedMap.LesserList
Get and remove the first element- Specified by:
poll
in interfaceValueSortedMap.LesserList<V>
- Returns:
- the first element, or null if empty
-
remove
- Specified by:
remove
in interfaceCollection<V>
- Specified by:
remove
in interfaceValueSortedMap.LesserList<V>
- Overrides:
remove
in classAbstractCollection<V>
-
size
public int size()- Specified by:
size
in interfaceCollection<V>
- Specified by:
size
in interfaceValueSortedMap.LesserList<V>
- Specified by:
size
in classAbstractCollection<V>
-