| bak.pcj.list.CharList
All known Subclasses: bak.pcj.list.AbstractCharList, bak.pcj.list.UnmodifiableCharList,
CharList | public interface CharList extends CharCollection(Code) | | This interface represents lists of char values.
See Also: java.util.List author: Søren Bak version: 1.2 24-08-2003 20:34 since: 1.0 |
Method Summary | |
void | add(int index, char v) Adds an element to this list at a specified index. | boolean | addAll(int index, CharCollection c) Adds all the elements of a specified collection to
this list starting at a specified index. | char | get(int index) Returns the element at a specified position in this list.
Parameters: index - the position of the element to return. | int | indexOf(char c) Returns the index of the first occurance of a specified
element in this list.
Parameters: c - the element to find. | int | indexOf(int index, char c) Returns the index of the first occurance of a specified
element in this list after or at a specified index.
Parameters: c - the element to find. Parameters: index - the index at which to start the search. | int | lastIndexOf(char c) Returns the index of the last occurance of a specified
element in this list.
Parameters: c - the element to find. | int | lastIndexOf(int index, char c) Returns the index of the last occurance of a specified
element in this list before a specified index.
Parameters: c - the element to find. Parameters: index - the index at which to start the search. | CharListIterator | listIterator() Returns a list iterator over this list. | CharListIterator | listIterator(int index) Returns a list iterator over this list, starting from a
specified index.
Parameters: index - the index at which to begin the iteration. | char | removeElementAt(int index) Removes the element at a specified index in this list. | char | set(int index, char v) Sets a specified element to a new value.
Parameters: index - the index of the element whose value to set. Parameters: v - the new value of the specified element. |
addAll | boolean addAll(int index, CharCollection c)(Code) | | Adds all the elements of a specified collection to
this list starting at a specified index. The elements are
inserted in the specified collection's iteration order.
All elements from the specified index and forward are pushed
to their successors' indices (c.size() indices).
Parameters: index - the index at which to insert the elements ofthe specified collection. Ifindex == size() the elements are appendedto this list. Parameters: c - the collection whose elements to add to thislist. true if this list was modifiedas a result of adding the elements of c;returns false otherwise. throws: UnsupportedOperationException - if the operation is not supported by thislist. throws: NullPointerException - if c is null. throws: IndexOutOfBoundsException - if index does not denote a valid insertionposition (valid: 0 - size()). See Also: CharList.add(char) See Also: CharList.add(int,char) See Also: CharList.addAll(CharCollection) |
get | char get(int index)(Code) | | Returns the element at a specified position in this list.
Parameters: index - the position of the element to return. the element at the specified position. throws: IndexOutOfBoundsException - if index does not denote a valid indexin this list. |
indexOf | int indexOf(char c)(Code) | | Returns the index of the first occurance of a specified
element in this list.
Parameters: c - the element to find. the index of the first occurance of the specifiedelement in this list; returns -1, if theelement is not contained in this list. |
indexOf | int indexOf(int index, char c)(Code) | | Returns the index of the first occurance of a specified
element in this list after or at a specified index.
Parameters: c - the element to find. Parameters: index - the index at which to start the search. the index of the first occurance of the specifiedelement in this list; returns -1, if theelement is not contained in this list. throws: IndexOutOfBoundsException - if index does not denote a validiteration position (valid: 0 - size()). since: 1.2 |
lastIndexOf | int lastIndexOf(char c)(Code) | | Returns the index of the last occurance of a specified
element in this list.
Parameters: c - the element to find. the index of the last occurance of the specifiedelement in this list; returns -1, if theelement is not contained in this list. |
lastIndexOf | int lastIndexOf(int index, char c)(Code) | | Returns the index of the last occurance of a specified
element in this list before a specified index.
Parameters: c - the element to find. Parameters: index - the index at which to start the search. Note thatthe element at index is not includedin the search. the index of the last occurance of the specifiedelement in this list; returns -1, if theelement is not contained in this list. throws: IndexOutOfBoundsException - if index does not denote a validiteration position (valid: 0 - size()). since: 1.2 |
listIterator | CharListIterator listIterator()(Code) | | Returns a list iterator over this list.
a list iterator over this list. |
listIterator | CharListIterator listIterator(int index)(Code) | | Returns a list iterator over this list, starting from a
specified index.
Parameters: index - the index at which to begin the iteration. a list iterator over this list. throws: IndexOutOfBoundsException - if index does not denote a validiteration position (valid: 0 - size()). |
removeElementAt | char removeElementAt(int index)(Code) | | Removes the element at a specified index in this list. All
elements following the removed element are pushed to their
predecessor's indices.
Parameters: index - the index of the element to remove. the value of the element removed. throws: UnsupportedOperationException - if the operation is not supported by thislist. throws: IndexOutOfBoundsException - if index does not denote a validelement position (valid: 0 - size()-1). |
set | char set(int index, char v)(Code) | | Sets a specified element to a new value.
Parameters: index - the index of the element whose value to set. Parameters: v - the new value of the specified element. the previous value of the element. throws: UnsupportedOperationException - if the operation is not supported by thislist. throws: IndexOutOfBoundsException - if index does not denote a validelement position (valid: 0 - size()-1). |
|
|