public class EDIFPortInstList extends ArrayList<EDIFPortInst>
EDIFNet and
EDIFCellInst classes (which now store a bare sorted array, see EDIFPortInstArray, and
expose it via getPortInsts()).
Maintains a sorted list to allow for a O(log n) retrieval lookup by name. Overwrites
existing entries with most recent value.| Modifier and Type | Field and Description |
|---|---|
static EDIFPortInstList |
EMPTY |
| Constructor and Description |
|---|
EDIFPortInstList() |
EDIFPortInstList(Collection<? extends EDIFPortInst> c)
Creates a list holding the given port instances, in iteration order (which should already
be sorted).
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(EDIFPortInst e)
Inserts the port inst into the list such that the list remains sorted.
|
void |
deferSortAdd(EDIFPortInst e)
Adds an element without sorting it and appending it to the end of the list.
|
EDIFPortInst |
get(EDIFCellInst i,
String name) |
EDIFPortInst |
remove(EDIFCellInst inst,
String portInstName) |
EDIFPortInst |
remove(EDIFPortInst e) |
void |
reSortList()
Invokes this list to be re sorted (it maintains a sorted list upon add).
|
add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizepublic static final EDIFPortInstList EMPTY
public EDIFPortInstList()
public EDIFPortInstList(Collection<? extends EDIFPortInst> c)
c - Port instances to copy.public boolean add(EDIFPortInst e)
add in interface Collection<EDIFPortInst>add in interface List<EDIFPortInst>add in class ArrayList<EDIFPortInst>e - The port inst to add to the sorted listpublic EDIFPortInst get(EDIFCellInst i, String name)
public EDIFPortInst remove(EDIFPortInst e)
public EDIFPortInst remove(EDIFCellInst inst, String portInstName)
public void deferSortAdd(EDIFPortInst e)
EDIFPortInstList.reSortList()
after a batch of additions.e - The element to addpublic void reSortList()