| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private Object |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Object | get(int
index of the element to return i)Implements abstract java. Implements java. |
| public Iterator | iterator()
Overrides java. Implements java. |
| public ListIterator | listIterator()
Overrides java. Implements java. |
| public ListIterator | listIterator(int
index of the first element to be returned from the
list iterator (by a call to i)next)Overrides java. Implements java. |
| public static SingletonList | |
| public int | size()
Implements abstract java. Implements java. |
| o | back to summary |
|---|---|
| private Object o | |
| SingletonList | back to summary |
|---|---|
| private SingletonList(Object o) | |
| get | back to summary |
|---|---|
| public Object get(int i) Implements abstract java. Implements java. Doc from java. Returns the element at the specified position in this list.
| |
| iterator | back to summary |
|---|---|
| public Iterator Overrides java. Implements java. Doc from java. Returns an iterator over the elements in this list in proper sequence.
| |
| listIterator | back to summary |
|---|---|
| public ListIterator Overrides java. Implements java. Doc from java. Returns a list iterator over the elements in this list (in proper sequence).
| |
| listIterator | back to summary |
|---|---|
| public ListIterator Overrides java. Implements java. Doc from java. Returns a list iterator over the elements in this list (in proper
sequence), starting at the specified position in the list.
The specified index indicates the first element that would be
returned by an initial call to
| |
| newSingletonList | back to summary |
|---|---|
| public static SingletonList newSingletonList(Object o) | |
| size | back to summary |
|---|---|
| public int size() Implements abstract java. Implements java. Doc from java. Returns the number of elements in this list. If this list contains
more than
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | add(Object
the element to insert o)Implements java. |
| public boolean | hasNext()
Implements java. true if this list iterator has more elements when
traversing the list in the forward direction.
|
| public boolean | hasPrevious()
Implements java. true if this list iterator has more elements when
traversing the list in the reverse direction.
|
| public Object | next()
Implements java. |
| public int | nextIndex()
Implements java. next.
|
| public Object | previous()
Implements java. |
| public int | previousIndex()
Implements java. previous.
|
| public void | remove()
Implements java. next or previous (optional operation).
|
| public void | set(Object
the element with which to replace the last element returned by
o)next or previousImplements java. next or
previous with the specified element (optional operation).
|
| i | back to summary |
|---|---|
| pack-priv int i | |
| SIterator | back to summary |
|---|---|
| pack-priv SIterator() | |
| SIterator | back to summary |
|---|---|
| pack-priv SIterator(int i) | |
| add | back to summary |
|---|---|
| public void add(Object o) Implements java. Doc from java. Inserts the specified element into the list (optional operation).
The element is inserted immediately before the element that
would be returned by
| |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| hasPrevious | back to summary |
|---|---|
| public boolean hasPrevious() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public Object next() Implements java. Doc from java. Returns the next element in the list and advances the cursor position.
This method may be called repeatedly to iterate through the list,
or intermixed with calls to
| |
| nextIndex | back to summary |
|---|---|
| public int nextIndex() Implements java. Doc from java. Returns the index of the element that would be returned by a
subsequent call to
| |
| previous | back to summary |
|---|---|
| public Object previous() Implements java. Doc from java. Returns the previous element in the list and moves the cursor
position backwards. This method may be called repeatedly to
iterate through the list backwards, or intermixed with calls to
| |
| previousIndex | back to summary |
|---|---|
| public int previousIndex() Implements java. Doc from java. Returns the index of the element that would be returned by a
subsequent call to
| |
| remove | back to summary |
|---|---|
| public void remove() Implements java. Doc from java. Removes from the list the last element that was returned by | |
| set | back to summary |
|---|---|
| public void set(Object o) Implements java. Doc from java. Replaces the last element returned by
| |