Package sootup.analysis.intraprocedural
Class UniverseSortedPriorityQueue<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractQueue<E>
sootup.analysis.intraprocedural.UniverseSortedPriorityQueue<E>
- Type Parameters:
- E- the type of elements held in the universe
- All Implemented Interfaces:
- Iterable<E>,- Collection<E>,- Queue<E>
TLDR: this class implements sorting a priorityquueue based on the order of items in a List (i.e.
 the Universe") it seems equivalent to using a PriorityQueue with a custom Comparator sorting the
 items ordered using the same Universe. as a rough guess this class is faster as the sorting-call
 seems to be called just once vs multiple times TODO: check that.
 
A fixed size priority queue based on bitsets. The elements of the priority queue are ordered
 according to a given universe. This priority queue does not permit null elements.
 Inserting of elements that are not part of the universe is also permitted (doing so will result
 in a NoSuchElementException).
- Author:
- Steven Lambeth
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanfinal booleanbooleanisEmpty()static <E> UniverseSortedPriorityQueue<E>Creates a new empty priority queuestatic <E> UniverseSortedPriorityQueue<E>Creates a new full priority queuefinal booleanfinal Epeek()final Epoll()final booleanMethods inherited from class java.util.AbstractQueueaddAll, clear, element, removeMethods inherited from class java.util.AbstractCollectioncontainsAll, iterator, removeAll, retainAll, size, toArray, toArray, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.CollectioncontainsAll, equals, hashCode, iterator, parallelStream, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray
- 
Field Details- 
universe
- 
ordinalMap
 
- 
- 
Method Details- 
peek
- 
poll
- 
add- Specified by:
- addin interface- Collection<E>
- Specified by:
- addin interface- Queue<E>
- Overrides:
- addin class- AbstractQueue<E>
- Throws:
- NoSuchElementException- if e not part of the universe
- NullPointerException- if e is- null
 
- 
offer- Throws:
- NoSuchElementException- if e not part of the universe
- NullPointerException- if e is- null
 
- 
remove- Specified by:
- removein interface- Collection<E>
- Overrides:
- removein class- AbstractCollection<E>
 
- 
contains- Specified by:
- containsin interface- Collection<E>
- Overrides:
- containsin class- AbstractCollection<E>
 
- 
isEmptypublic boolean isEmpty()- Specified by:
- isEmptyin interface- Collection<E>
- Overrides:
- isEmptyin class- AbstractCollection<E>
 
- 
ofCreates a new full priority queue- Type Parameters:
- E-
- Parameters:
- universe-
- Returns:
 
- 
noneOfCreates a new empty priority queue- Type Parameters:
- E-
- Parameters:
- universe-
- Returns:
 
 
-