All Packages Class Hierarchy This Package Previous Next Index
Interface com.roguewave.tools.v2-0.Sequence
- public interface Sequence
- extends Collection
This interface is implemented by collections which are said
to be sequenceable. That is, the order of elements
within the collection can be determined externally by the
client of the collection and elements can be accessed by
index.
-
append(Object)
- Adds an item to the end of the collection
-
at(int)
- Returns an element from a particular location within the collection
-
atPut(int, Object)
- Replaces an element at a particular location within the collection
-
containsReference(Object)
- Returns true if the collection contains an element identical
to the given item.
-
first()
- Returns the first element of the collection
-
index(Object)
-
Returns the location of the first element equivalent to a given item
or -1 if not found.
-
indexReference(Object)
-
Returns the location of the first element identical to
the given item or -1 if not found.
-
insertAt(int, Object)
- Inserts an item at a particular location within the collection
-
last()
- Returns the last element of the collection
-
occurrencesOfReference(Object)
- Returns the number of elements in the collection identical
to the given item.
-
prepend(Object)
- Adds an item to the front of the collection
-
removeAllReference(Object)
- Removes from the collection all elements that are
identical to the given item.
-
removeAt(int)
- Removes an element from a particular location within the collection
-
removeFirst()
- Removes the first element of the collection
-
removeLast()
- Removes the last element of the collection
-
removeReference(Object)
- Removes from the collection the first element
that is identical to the given item.
-
transform(UnaryFunction)
- Replaces each member of the collection with the result of
applying the unary function to that memeber.
append
public abstract Object append(Object item)
- Adds an item to the end of the collection
at
public abstract Object at(int i) throws IndexOutOfBoundsException
- Returns an element from a particular location within the collection
atPut
public abstract Object atPut(int i,
Object obj) throws IndexOutOfBoundsException
- Replaces an element at a particular location within the collection
first
public abstract Object first() throws NoSuchElementException
- Returns the first element of the collection
containsReference
public abstract boolean containsReference(Object item)
- Returns true if the collection contains an element identical
to the given item.
index
public abstract int index(Object item)
- Returns the location of the first element equivalent to a given item
or -1 if not found.
indexReference
public abstract int indexReference(Object item)
- Returns the location of the first element identical to
the given item or -1 if not found.
insertAt
public abstract Object insertAt(int i,
Object item) throws IndexOutOfBoundsException
- Inserts an item at a particular location within the collection
last
public abstract Object last() throws NoSuchElementException
- Returns the last element of the collection
occurrencesOfReference
public abstract int occurrencesOfReference(Object item)
- Returns the number of elements in the collection identical
to the given item.
prepend
public abstract Object prepend(Object item)
- Adds an item to the front of the collection
removeAt
public abstract Object removeAt(int i) throws IndexOutOfBoundsException
- Removes an element from a particular location within the collection
removeFirst
public abstract Object removeFirst() throws NoSuchElementException
- Removes the first element of the collection
removeLast
public abstract Object removeLast() throws NoSuchElementException
- Removes the last element of the collection
removeReference
public abstract Object removeReference(Object item)
- Removes from the collection the first element
that is identical to the given item.
removeAllReference
public abstract int removeAllReference(Object item)
- Removes from the collection all elements that are
identical to the given item.
transform
public abstract void transform(UnaryFunction fun)
- Replaces each member of the collection with the result of
applying the unary function to that memeber.
All Packages Class Hierarchy This Package Previous Next Index