| java.lang.Object au.id.jericho.lib.html.Segment au.id.jericho.lib.html.nodoc.SequentialListSegment
All known Subclasses: au.id.jericho.lib.html.Attributes,
SequentialListSegment | abstract public class SequentialListSegment extends Segment implements List(Code) | | A base class used internally to simulate multiple inheritance of
Segment and java.util.AbstractSequentialList .
It allows a
Segment based class to implement java.util.List without having to implement
all of the List methods explicitly, which would clutter the API documentation with mostly irrelevant methods.
By extending this class, most of the list implementation methods are simply listed in the inherited methods list.
See Also: Attributes |
Method Summary | |
public boolean | add(Object o) This list is unmodifiable, so this method always throws an UnsupportedOperationException . | public void | add(int index, Object element) This list is unmodifiable, so this method always throws an UnsupportedOperationException . | public boolean | addAll(Collection collection) This list is unmodifiable, so this method always throws an UnsupportedOperationException . | public boolean | addAll(int index, Collection collection) This list is unmodifiable, so this method always throws an UnsupportedOperationException . | public void | clear() This list is unmodifiable, so this method always throws an UnsupportedOperationException . | public boolean | contains(Object o) Indicates whether this list contains the specified object.
Parameters: o - object to be checked for containment in this list. | public boolean | containsAll(Collection collection) Indicates whether this list contains all of the items in the specified collection.
Parameters: collection - the collection to be checked for containment in this list. | public Object | get(int index) Returns the item at the specified position in this list.
This implementation first gets a list iterator pointing to the indexed item (with listIterator(index) ).
Then, it gets the element using ListIterator.next and returns it.
Parameters: index - the index of the item to return. | abstract public int | getCount() Returns the number of items in the list. | public int | indexOf(Object o) Returns the index in this list of the first occurence of the specified object, or -1 if the list does not contain this object.
Parameters: o - object to search for. | public boolean | isEmpty() Indicates whether this list is empty. | public Iterator | iterator() Returns an iterator over the items in the list in proper sequence. | public int | lastIndexOf(Object o) Returns the index in this list of the last occurence of the specified object, or -1 if the list does not contain this object.
Parameters: o - object to search for. | abstract public ListIterator | listIterator(int index) Returns a list iterator of the items in this list (in proper sequence), starting at the specified position in the list.
The specified index indicates the first item that would be returned by an initial call to the next() method.
An initial call to the previous() method would return the item with the specified index minus one.
Parameters: index - index of the first item to be returned from the list iterator (by a call to the next() method). | public ListIterator | listIterator() Returns a list iterator of the items in this list (in proper sequence), starting with the first item in the list. | public boolean | remove(Object o) This list is unmodifiable, so this method always throws an UnsupportedOperationException . | public Object | remove(int index) This list is unmodifiable, so this method always throws an UnsupportedOperationException . | public boolean | removeAll(Collection collection) This list is unmodifiable, so this method always throws an UnsupportedOperationException . | public boolean | retainAll(Collection collection) This list is unmodifiable, so this method always throws an UnsupportedOperationException . | public Object | set(int index, Object element) This list is unmodifiable, so this method always throws an UnsupportedOperationException . | public int | size() Returns the number of items in the list. | public List | subList(int fromIndex, int toIndex) Returns a view of the portion of this list between fromIndex , inclusive, and toIndex , exclusive.
(If fromIndex and toIndex are equal, the returned list is empty.)
The returned list is backed by this list, so changes in the returned list are reflected in this list, and vice-versa.
The returned list supports all of the optional list operations supported by this list.
Parameters: fromIndex - low endpoint (inclusive) of the subList. Parameters: toIndex - high endpoint (exclusive) of the subList. | public Object[] | toArray() Returns an array containing all of the items in this list. | public Object[] | toArray(Object a) Returns an array containing all of the items in this list in the correct order;
the runtime type of the returned array is that of the specified array.
If the list fits in the specified array, it is returned therein.
Otherwise, a new array is allocated with the runtime type of the specified array and the size of this list.
If the list fits in the specified array with room to spare (i.e., the array has more elements than the list),
the item in the array immediately following the end of the collection is set to null .
This is useful in determining the length of the list only
if the caller knows that the list does not contain any null items. |
SequentialListSegment | public SequentialListSegment(Source source, int begin, int end)(Code) | | |
contains | public boolean contains(Object o)(Code) | | Indicates whether this list contains the specified object.
Parameters: o - object to be checked for containment in this list. true if this list contains the specified object, otherwise false . |
containsAll | public boolean containsAll(Collection collection)(Code) | | Indicates whether this list contains all of the items in the specified collection.
Parameters: collection - the collection to be checked for containment in this list. true if this list contains all of the items in the specified collection, otherwise false . throws: NullPointerException - if the specified collection is null. See Also: SequentialListSegment.contains(Object) |
get | public Object get(int index)(Code) | | Returns the item at the specified position in this list.
This implementation first gets a list iterator pointing to the indexed item (with listIterator(index) ).
Then, it gets the element using ListIterator.next and returns it.
Parameters: index - the index of the item to return. the item at the specified position in this list. throws: IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index >= size() ). |
getCount | abstract public int getCount()(Code) | | Returns the number of items in the list.
the number of items in the list. |
indexOf | public int indexOf(Object o)(Code) | | Returns the index in this list of the first occurence of the specified object, or -1 if the list does not contain this object.
Parameters: o - object to search for. the index in this list of the first occurence of the specified object, or -1 if the list does not contain this object. |
isEmpty | public boolean isEmpty()(Code) | | Indicates whether this list is empty.
true if there are no items in the list, otherwise false . |
iterator | public Iterator iterator()(Code) | | Returns an iterator over the items in the list in proper sequence.
an iterator over the items in the list in proper sequence. |
lastIndexOf | public int lastIndexOf(Object o)(Code) | | Returns the index in this list of the last occurence of the specified object, or -1 if the list does not contain this object.
Parameters: o - object to search for. the index in this list of the last occurence of the specified object, or -1 if the list does not contain this object. |
listIterator | abstract public ListIterator listIterator(int index)(Code) | | Returns a list iterator of the items in this list (in proper sequence), starting at the specified position in the list.
The specified index indicates the first item that would be returned by an initial call to the next() method.
An initial call to the previous() method would return the item with the specified index minus one.
Parameters: index - index of the first item to be returned from the list iterator (by a call to the next() method). a list iterator of the items in this list (in proper sequence), starting at the specified position in the list. throws: IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size() ). |
listIterator | public ListIterator listIterator()(Code) | | Returns a list iterator of the items in this list (in proper sequence), starting with the first item in the list.
a list iterator of the items in this list (in proper sequence), starting with the first item in the list. See Also: SequentialListSegment.listIterator(int) |
size | public int size()(Code) | | Returns the number of items in the list.
This is equivalent to
SequentialListSegment.getCount() ,
and is necessary to for the implementation of the java.util.Collection interface.
the number of items in the list. |
subList | public List subList(int fromIndex, int toIndex)(Code) | | Returns a view of the portion of this list between fromIndex , inclusive, and toIndex , exclusive.
(If fromIndex and toIndex are equal, the returned list is empty.)
The returned list is backed by this list, so changes in the returned list are reflected in this list, and vice-versa.
The returned list supports all of the optional list operations supported by this list.
Parameters: fromIndex - low endpoint (inclusive) of the subList. Parameters: toIndex - high endpoint (exclusive) of the subList. a view of the specified range within this list. throws: IndexOutOfBoundsException - endpoint index value out of range (fromIndex < 0 || toIndex > size) throws: IllegalArgumentException - endpoint indices out of order (fromIndex > toIndex) See Also: java.util.List.subList(int fromIndexint toIndex) |
toArray | public Object[] toArray()(Code) | | Returns an array containing all of the items in this list.
an array containing all of the items in this list. |
toArray | public Object[] toArray(Object a)(Code) | | Returns an array containing all of the items in this list in the correct order;
the runtime type of the returned array is that of the specified array.
If the list fits in the specified array, it is returned therein.
Otherwise, a new array is allocated with the runtime type of the specified array and the size of this list.
If the list fits in the specified array with room to spare (i.e., the array has more elements than the list),
the item in the array immediately following the end of the collection is set to null .
This is useful in determining the length of the list only
if the caller knows that the list does not contain any null items.
Parameters: a - the array into which the items of the list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose. an array containing the items of the list. throws: NullPointerException - if the specified array is null . throws: ArrayStoreException - if the runtime type of the specified array is not a supertype of the runtime type of every item in this list. |
|
|