Maven module :un.api : api-common :
Class : un.api.collection.Sequence
Extends/Implements : un.api.collection.Collection
Subclasses : -

Collection with ordered elements.
author  Johann Sorel
author  Yann D'Isanto


Variables : -
Functions : get, add, addAll, addAll, replace, remove, search, createReverseIterator




Returns the item at the specified index.
param  index the index.
return  the item corresponding to the specified index.
Object get (int index)


Inserts the specified item at the specified index.
param  index the index to insert the item at.
param  value the item to insert.
return  true if the item has properly been added.
throws  IndexOutOfBoundsException if index < 0 or index >= this
list size
boolean add (int index, Object value)


Inserts the specified items at the specified index.
param  index the index to insert the items at.
param  candidates elements to insert.
return  true if all elements successfuly inserted.
boolean addAll (int index, Object[] candidates)


Inserts the specified items at the specified index.
param  index the index to insert the items at.
param  candidates elements to insert.
return  true if all elements successfuly inserted.
boolean addAll (int index, Collection candidates)


Replaces the item at the specified index with the specified index.
param  index the index of the item to replace.
param  item the item to set at the specified index.
return  the replaced item.
throws  IndexOutOfBoundsException if index < 0 or index >= this
list size
Object replace (int index, Object item)


Removes the item at the specified index.
param  index the index to remove the item at.
return  the removed item.
boolean remove (int index)


Search given object in this sequence and return the first instance
index.
param  item object to search
return  index or -1 if not found.
int search (Object item)


return  an iterator to iterate this list in reverse order.
Iterator createReverseIterator ()