public class EDIFPortInstList extends ArrayList<EDIFPortInst>
EDIFNet
and EDIFCellInst
classes.
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() |
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, trimToSize
public static final EDIFPortInstList EMPTY
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()