Package ghidra.util.datastruct
Class LRUSet<T>
java.lang.Object
ghidra.util.datastruct.LRUMap<T,T>
ghidra.util.datastruct.LRUSet<T>
- Type Parameters:
T
- the type of items in the set
An ordered set-like data structure.
Use this when you need a collection of unique items (hence set) that are also ordered by insertion time.
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class ghidra.util.datastruct.LRUMap
clear, containsKey, containsValue, eldestEntryRemoved, entrySet, get, isEmpty, keySet, put, putAll, remove, removeEldestEntry, size, values
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
LRUSet
public LRUSet(int size) Constructs this set with the given size. As elements are added, the oldest elements (by access time) will fall off the bottom of the set.If you do not wish to have a set bounded by size, then you can override
LRUMap.removeEldestEntry(java.util.Map.Entry)
to do nothing.- Parameters:
size
- The size to which this set will be restricted.
-
-
Method Details