MetaDone
metadone.util.ImmutableList< E > Class Reference
Inheritance diagram for metadone.util.ImmutableList< E >:
Collaboration diagram for metadone.util.ImmutableList< E >:

List of all members.

Classes

class  Empty< E >
class  HT< E >
class  ListImmutableIterator< E >
class  Sub< E >

Public Member Functions

final boolean add (E e)
final void add (int index, E element)
final boolean addAll (Collection<?extends E > c)
final boolean addAll (int index, Collection<?extends E > c)
final void clear ()
final boolean remove (Object o)
final E remove (int index)
final boolean removeAll (Collection<?> c)
final boolean retainAll (Collection<?> c)
final E set (int index, E element)
boolean contains (Object o)
boolean containsAll (Collection<?> c)
int indexOf (Object o)
Iterator< E > iterator ()
int lastIndexOf (Object o)
ListIterator< E > listIterator (int index)
ImmutableList< E > subList (int fromIndex, int toIndex)
Object[] toArray ()
int hashCode ()
final boolean equals (Object obj)
boolean equals (ImmutableList<?> list)
String toString ()
abstract E getHead ()
abstract ImmutableList< E > getTail ()
ImmutableList< E > addHead (E elem)
ImmutableList< E > addI (int index, E...elem)
ImmutableList< E > removeI (int from, int to)
ImmutableList< E > replaceI (int from, int to, E...elem)

Static Public Member Functions

static< E > ImmutableList< E > of ()
static< E > ImmutableList< E > of (E...es)
static< E > ImmutableList< E > forCollection (Collection<?extends E > es)

Protected Member Functions

 ImmutableList ()

Package Functions

public< T > T[] toArray (T[] a)

Detailed Description

An immutable list.

Author:
kmagusia
Parameters:
<E>The type of elements
See also:
of()
of(Object...)
#forCollection(Collection)
#forCollection(List)

Constructor & Destructor Documentation

metadone.util.ImmutableList< E >.ImmutableList ( ) [protected]

Member Function Documentation

final boolean metadone.util.ImmutableList< E >.add ( e)
final void metadone.util.ImmutableList< E >.add ( int  index,
element 
)
final boolean metadone.util.ImmutableList< E >.addAll ( int  index,
Collection<?extends E >  c 
)
final boolean metadone.util.ImmutableList< E >.addAll ( Collection<?extends E >  c)
ImmutableList<E> metadone.util.ImmutableList< E >.addHead ( elem)

Creates a new list by adding a head element.

Parameters:
elemThe first element
Returns:
A list [elem|this]

Referenced by metadone.util.ImmutableList< E >.forCollection(), and metadone.util.ImmutableList< E >.replaceI().

ImmutableList<E> metadone.util.ImmutableList< E >.addI ( int  index,
E...  elem 
)

Creates a list by adding elements into the given index.

Parameters:
indexThe index
elemThe elements
Returns:
A list old(<index) ++ elem ++ old(>=index)

Referenced by metadone.util.ImmutableList< E >.of().

final void metadone.util.ImmutableList< E >.clear ( )
boolean metadone.util.ImmutableList< E >.contains ( Object  o)
boolean metadone.util.ImmutableList< E >.containsAll ( Collection<?>  c)
final boolean metadone.util.ImmutableList< E >.equals ( Object  obj)
boolean metadone.util.ImmutableList< E >.equals ( ImmutableList<?>  list)
static <E> ImmutableList<E> metadone.util.ImmutableList< E >.forCollection ( Collection<?extends E >  es) [static]

Returns a list containing elements.

Parameters:
<E>The type of elements
esThe collection of elements
Returns:
The immutable list of elements

References metadone.util.ImmutableList< E >.addHead(), and metadone.util.ImmutableList< E >.toArray().

abstract E metadone.util.ImmutableList< E >.getHead ( ) [pure virtual]
abstract ImmutableList<E> metadone.util.ImmutableList< E >.getTail ( ) [pure virtual]
int metadone.util.ImmutableList< E >.hashCode ( )
int metadone.util.ImmutableList< E >.indexOf ( Object  o)
Iterator<E> metadone.util.ImmutableList< E >.iterator ( )
int metadone.util.ImmutableList< E >.lastIndexOf ( Object  o)
ListIterator<E> metadone.util.ImmutableList< E >.listIterator ( int  index)
static <E> ImmutableList<E> metadone.util.ImmutableList< E >.of ( ) [static]

Returns an empty list.

Parameters:
<E>The type of the elements
Returns:
The immutable empty list
static <E> ImmutableList<E> metadone.util.ImmutableList< E >.of ( E...  es) [static]

Returns a list containing elements.

Parameters:
<E>The type of elements
esThe elements
Returns:
The immutable list of elements

References metadone.util.ImmutableList< E >.addI().

final boolean metadone.util.ImmutableList< E >.remove ( Object  o)
final E metadone.util.ImmutableList< E >.remove ( int  index)
final boolean metadone.util.ImmutableList< E >.removeAll ( Collection<?>  c)
ImmutableList<E> metadone.util.ImmutableList< E >.removeI ( int  from,
int  to 
)

Creates a list by adding elements into the given index.

Parameters:
fromThe from index
toThe to index
Returns:
A list old(<from) ++ old(>=to)
ImmutableList<E> metadone.util.ImmutableList< E >.replaceI ( int  from,
int  to,
E...  elem 
)

Creates a list by adding elements into the given index.

Parameters:
fromThe from index
toThe to index
elemThe elements
Returns:
A list old(<from) ++ elem ++ old(>=to)

References metadone.util.ImmutableList< E >.addHead(), metadone.util.ImmutableList< E >.getHead(), and metadone.util.ImmutableList< E >.getTail().

final boolean metadone.util.ImmutableList< E >.retainAll ( Collection<?>  c)
final E metadone.util.ImmutableList< E >.set ( int  index,
element 
)
ImmutableList<E> metadone.util.ImmutableList< E >.subList ( int  fromIndex,
int  toIndex 
)
public<T> T [] metadone.util.ImmutableList< E >.toArray ( T[]  a) [package]
Object [] metadone.util.ImmutableList< E >.toArray ( )
String metadone.util.ImmutableList< E >.toString ( )

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations