|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectMappedList
public class MappedList
A List of unique values which can be indexed as a list and the index can be efficiently determined( O(1) time).
Constructor Summary | |
---|---|
MappedList()
Creates an empty MappedList. |
|
MappedList(Collection c)
Creates a mapped list containing the elements of collection in the order provided by the collections iterator. |
|
MappedList(int initialCapacity)
Creates an empty MappedList with specified capacity. |
|
MappedList(int[] values)
Creates a MappedList containing Integers corresponding to the ints in values. |
|
MappedList(MappedList toCopy)
|
Method Summary | |
---|---|
void |
add(int index,
Object element)
Not supported. |
boolean |
add(Object o)
Appends the specified element to the end of this list. |
boolean |
addAll(Collection c)
Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator. |
boolean |
addAll(int index,
Collection c)
Not supported. |
void |
clear()
Removes all of the elements from this list. |
void |
clear(int i)
sets the value at location i to null |
Object |
clone()
|
boolean |
contains(Object o)
Returns true if this list contains the specified element. |
boolean |
containsAll(Collection c)
Returns true if this list contains all of the elements of the specified collection. |
boolean |
equals(Object o)
Compares the specified object with this list for equality. |
Object |
get(int index)
Returns the element at the specified position in this list. |
int |
grep(Filter filter,
Collection results)
|
int |
grep(Matcher matcher,
boolean invert,
Collection results)
|
int |
grep(Pattern pattern,
boolean invert,
Collection results)
|
int |
hashCode()
Returns the hash code value for this list. |
int |
indexOf(Object o)
Returns the index in this list of the first occurence of the specified element or -1 if this list does not contain this element. |
boolean |
isEmpty()
Returns true if this list contains no elements. |
Iterator |
iterator()
Returns an iterator over the elements in this list in proper sequence. |
int |
lastIndexOf(Object o)
Returns the index in this list of the last occurrence of the specifed element, or -1 if this list does not contain this element. |
ListIterator |
listIterator()
Returns a list iterator of the elements in this list (in proper sequence). |
ListIterator |
listIterator(int index)
Returns a list iterator of the elements in this list (in proper sequence) starting at the specified position in this list. |
Object |
remove(int index)
|
boolean |
remove(Object o)
Not supported. |
boolean |
removeAll(Collection c)
Not supported. |
boolean |
retainAll(Collection c)
Not supported. |
Object |
set(int index,
Object element)
Replaces the element at the specified position in this list with the specified element. |
int |
size()
Returns the number of elements in this list. |
List |
subList(int fromIndex,
int toIndex)
Not supported. |
void |
swap(int i,
int j)
Swaps the elements at i and j |
Object[] |
toArray()
Returns an array containing all of the elements in this list proper sequence. |
Object[] |
toArray(Object[] a)
Returns an array containing all of the elements in this list in proper sequence; the runtime type of the returned array is that of the specified array. |
String |
toString()
|
Methods inherited from class Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MappedList()
public MappedList(MappedList toCopy)
public MappedList(int initialCapacity)
public MappedList(int[] values)
public MappedList(Collection c)
Method Detail |
---|
public int grep(Filter filter, Collection results)
results
- accumulate matches
public int grep(Pattern pattern, boolean invert, Collection results)
invert
- invert the sense of the grep, i.e. add non-matchesresults
- accumulate matches
public int grep(Matcher matcher, boolean invert, Collection results)
invert
- invert the sense of the grep, i.e. add non-matchesresults
- accumulate matches
public Object clone()
clone
in class Object
public void add(int index, Object element)
add
in interface List
public boolean add(Object o)
add
in interface Collection
add
in interface List
public boolean addAll(Collection c)
addAll
in interface Collection
addAll
in interface List
public boolean addAll(int index, Collection c)
addAll
in interface List
public void clear()
clear
in interface Collection
clear
in interface List
public boolean contains(Object o)
contains
in interface Collection
contains
in interface List
public boolean containsAll(Collection c)
containsAll
in interface Collection
containsAll
in interface List
public boolean equals(Object o)
equals
in interface Collection
equals
in interface List
equals
in class Object
public Object get(int index)
get
in interface List
public int hashCode()
hashCode
in interface Collection
hashCode
in interface List
hashCode
in class Object
public int indexOf(Object o)
indexOf
in interface List
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface List
public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
iterator
in interface List
public int lastIndexOf(Object o)
lastIndexOf
in interface List
public ListIterator listIterator()
listIterator
in interface List
public ListIterator listIterator(int index)
listIterator
in interface List
public Object remove(int index)
remove
in interface List
public boolean remove(Object o)
remove
in interface Collection
remove
in interface List
public boolean removeAll(Collection c)
removeAll
in interface Collection
removeAll
in interface List
public boolean retainAll(Collection c)
retainAll
in interface Collection
retainAll
in interface List
public Object set(int index, Object element)
set
in interface List
public int size()
size
in interface Collection
size
in interface List
public List subList(int fromIndex, int toIndex)
subList
in interface List
public Object[] toArray()
toArray
in interface Collection
toArray
in interface List
public Object[] toArray(Object[] a)
toArray
in interface Collection
toArray
in interface List
public void swap(int i, int j)
public void clear(int i)
public String toString()
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |