Additional top-level classes in compilation unit: CircularListEnumeration, CircularListRecord.
CircularList is a list class. Objects can be added at the beginning or end; they may be enumerated through forwards or backwards; they may be retrieved directly or by index from the front or rear. CircularLists can also be enumerated endlessly. If the list contains any elements at all, an "unterminated" Enumeration will always claim to have more elements... when it's done enumerating, it will start over again. The default Enumeration is of the usual, terminated variety, however.
This class is a completely UNSYNCHRONIZED implementation class. Synchronize on calls where necessary.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv CircularListRecord | |
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | |
| public void | |
| public Object | |
| public Enumeration | |
| public Enumeration | |
| public Enumeration | |
| public Object | |
| public Object | |
| public Object | |
| public Object | |
| public static void | |
| public void | |
| private void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public int | |
| private void |
| firstRecord | back to summary |
|---|---|
| pack-priv CircularListRecord firstRecord | |
| size | back to summary |
|---|---|
| pack-priv int size | |
| CircularList | back to summary |
|---|---|
| public CircularList() | |
| addElement | back to summary |
|---|---|
| private void addElement(Object object, boolean first) | |
| addElementToFront | back to summary |
|---|---|
| public void addElementToFront(Object object) | |
| appendElement | back to summary |
|---|---|
| public void appendElement(Object object) | |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Returns a shallow copy. The list is cloned, but not the elements within it.
| |
| elements | back to summary |
|---|---|
| public Enumeration | |
| elements | back to summary |
|---|---|
| public Enumeration | |
| elements | back to summary |
|---|---|
| public Enumeration | |
| getElementFromBack | back to summary |
|---|---|
| public Object getElementFromBack(int index) | |
| getElementFromFront | back to summary |
|---|---|
| public Object getElementFromFront(int index) | |
| getFirstElement | back to summary |
|---|---|
| public Object getFirstElement() | |
| getLastElement | back to summary |
|---|---|
| public Object getLastElement() | |
| main | back to summary |
|---|---|
| public static void main(String[] argv) | |
| removeAllElements | back to summary |
|---|---|
| public void removeAllElements() | |
| removeElement | back to summary |
|---|---|
| private void removeElement(boolean first) | |
| removeFirstElement | back to summary |
|---|---|
| public void removeFirstElement() | |
| removeFromBack | back to summary |
|---|---|
| public void removeFromBack(int count) | |
| removeFromFront | back to summary |
|---|---|
| public void removeFromFront(int count) | |
| removeLastElement | back to summary |
|---|---|
| public void removeLastElement() | |
| size | back to summary |
|---|---|
| public int size() | |
| zap | back to summary |
|---|---|
| private void zap(CircularListRecord record) | |