MetaDone
|
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) |
An immutable list.
<E> | The type of elements |
metadone.util.ImmutableList< E >.ImmutableList | ( | ) | [protected] |
final boolean metadone.util.ImmutableList< E >.add | ( | E | e | ) |
final void metadone.util.ImmutableList< E >.add | ( | int | index, |
E | 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 | ( | E | elem | ) |
Creates a new list by adding a head element.
elem | The first element |
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.
index | The index |
elem | The elements |
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 | ) |
References metadone.util.Objects.cast().
boolean metadone.util.ImmutableList< E >.equals | ( | ImmutableList<?> | list | ) |
References metadone.util.Objects.equal().
static <E> ImmutableList<E> metadone.util.ImmutableList< E >.forCollection | ( | Collection<?extends E > | es | ) | [static] |
Returns a list containing elements.
<E> | The type of elements |
es | The collection of elements |
References metadone.util.ImmutableList< E >.addHead(), and metadone.util.ImmutableList< E >.toArray().
abstract E metadone.util.ImmutableList< E >.getHead | ( | ) | [pure virtual] |
Gets the head.
NoSuchElementException | when this is empty |
Implemented in metadone.util.ImmutableList< E >.Sub< E >, metadone.util.ImmutableList< E >.Empty< E >, and metadone.util.ImmutableList< E >.HT< E >.
Referenced by metadone.util.ImmutableList< E >.iterator(), metadone.util.ImmutableList< E >.HT< E >.listIterator(), and metadone.util.ImmutableList< E >.replaceI().
abstract ImmutableList<E> metadone.util.ImmutableList< E >.getTail | ( | ) | [pure virtual] |
Gets the tail.
NoSuchElementException | when this is empty |
Implemented in metadone.util.ImmutableList< E >.Sub< E >, metadone.util.ImmutableList< E >.Empty< E >, and metadone.util.ImmutableList< E >.HT< E >.
Referenced by metadone.util.ImmutableList< E >.iterator(), metadone.util.ImmutableList< E >.HT< E >.listIterator(), metadone.util.ImmutableList< E >.replaceI(), and metadone.util.ImmutableList< E >.subList().
int metadone.util.ImmutableList< E >.hashCode | ( | ) |
References metadone.util.Objects.hashCodeIter().
int metadone.util.ImmutableList< E >.indexOf | ( | Object | o | ) |
References metadone.util.Objects.equal().
Iterator<E> metadone.util.ImmutableList< E >.iterator | ( | ) |
Reimplemented in metadone.util.ImmutableList< E >.Sub< E >.
References metadone.util.ImmutableList< E >.getHead(), and metadone.util.ImmutableList< E >.getTail().
int metadone.util.ImmutableList< E >.lastIndexOf | ( | Object | o | ) |
References metadone.util.Objects.equal().
ListIterator<E> metadone.util.ImmutableList< E >.listIterator | ( | int | index | ) |
static <E> ImmutableList<E> metadone.util.ImmutableList< E >.of | ( | ) | [static] |
Returns an empty list.
<E> | The type of the elements |
static <E> ImmutableList<E> metadone.util.ImmutableList< E >.of | ( | E... | es | ) | [static] |
Returns a list containing elements.
<E> | The type of elements |
es | The 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.
from | The from index |
to | The to index |
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.
from | The from index |
to | The to index |
elem | The elements |
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, |
E | element | ||
) |
ImmutableList<E> metadone.util.ImmutableList< E >.subList | ( | int | fromIndex, |
int | toIndex | ||
) |
Reimplemented in metadone.util.ImmutableList< E >.Empty< E >.
References metadone.util.ImmutableList< E >.getTail().
public<T> T [] metadone.util.ImmutableList< E >.toArray | ( | T[] | a | ) | [package] |
Object [] metadone.util.ImmutableList< E >.toArray | ( | ) |
Referenced by metadone.util.ImmutableList< E >.forCollection().
String metadone.util.ImmutableList< E >.toString | ( | ) |