|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface EList<V>
This interface describes an extensible list, one which can have values inserted, removed and changed. TODO - Should the remove methods throw an ListIndexOutOfBounds alert if the specified index is out of bounds, or just silently ignore it as the item was never in the list in the first place? -> Yes they should, this is a StrictMap which requires that you use an key that is present in the mapping.
| Method Summary | |
|---|---|
void |
addFirst(V value)
Adds the specified value to the begining of this list. |
void |
addLast(V value)
Adds the specified value to the end of this list. |
void |
append(IList<? extends V> list)
Appends the specified list to this list. |
void |
delete(java.lang.Integer pos,
V value)
Removes the value at the specified position(one based) in the list, but only if it matches the specified one. |
void |
delete(int pos,
V value)
Removes the value at the specified position(one based) in the list, but only if it matches the specified one. |
void |
delete(Maplet<? extends java.lang.Integer,? extends V> entry)
Removes the specified mapping from this list, shifting any subsequent elements to an index one lower than before. |
void |
delete0(java.lang.Integer pos,
V value)
Removes the value at the specified position(zero based) in the list, but only if it matches the specified one. |
void |
delete0(int pos,
V value)
Removes the value at the specified position(zero based) in the list, but only if it matches the specified one. |
void |
delete0(Maplet<? extends java.lang.Integer,? extends V> entry)
Removes the specified mapping from this list, shifting any subsequent elements to an index one lower than before. |
void |
deleteAll()
Removes all the mappings from this list. |
void |
deleteAll(IList<? extends V> list)
Removes all the values in the specified list from this one, for each deletion shifting any subsequent elements to an index one lower than before. |
void |
deleteFirst()
Removes the first element from the list. |
void |
deleteKey(int key)
Removes the value at the specified index(one based), shifting any subsequent elements to an index one lower than before. |
void |
deleteKey(java.lang.Integer key)
Removes the value at the specified index(one based), shifting any subsequent elements to an index one lower than before. |
void |
deleteKey0(int key)
Removes the value at the specified index(one based), shifting any subsequent elements to an index one lower than before. |
void |
deleteKey0(java.lang.Integer key)
Removes the value at the specified index(one based), shifting any subsequent elements to an index one lower than before. |
void |
deleteLast()
Removes the last element from the list. |
void |
deleteSlice(int first,
int last)
Removes the specified slice of elements in this list, starting at first(one based, inclusive) and continuing
last(one based, inclusive), shifting any subsequent
elements to a lowest available index. |
void |
deleteSlice0(int first,
int last)
Removes the specified slice of elements in this list, starting at first(zero based, inclusive) and continuing
last(zero based, inclusive), shifting any subsequent
elements to a lowest available index. |
void |
deleteValue(V value)
Removes all elements from this list which are equal to the specified value. |
void |
insert(java.lang.Integer pos,
V value)
Inserts the specified value at the given position(one based) in this list. |
void |
insert(int pos,
V value)
Inserts the specified value at the given position(one based) in this list. |
void |
insert(Maplet<? extends java.lang.Integer,? extends V> entry)
Inserts the specified maplet into this list. |
void |
insert0(java.lang.Integer pos,
V value)
Inserts the specified value at the given position(zero based) in this list. |
void |
insert0(int pos,
V value)
Inserts the specified value at the given position(zero based) in this list. |
void |
insert0(Maplet<? extends java.lang.Integer,? extends V> entry)
Inserts the specified maplet into this list. |
void |
prefix(IList<? extends V> list)
Prefixes this list with the specified one. |
| Methods inherited from interface org.millscript.commons.util.UList |
|---|
update, update, update, update0, update0, update0 |
| Methods inherited from interface org.millscript.commons.util.IList |
|---|
allButFirst, allButLast, allFirst, allLast, contains, contains, contains0, contains0, contains0, containsKey, containsKey, containsKey0, containsKey0, containsSlice, containsSlice0, first, get, get, get0, get0, getDefault, indexOf, indexOf0, iterator, last, setDefault, slice, slice0, toArray, toArray |
| Methods inherited from interface org.millscript.commons.util.IMap |
|---|
contains, containsAll, containsValue, equals, hashCode, isEmtpy, keyList, mapletList, setDefault, size, valueList |
| Methods inherited from interface org.millscript.commons.util.UMap |
|---|
updateAll |
| Methods inherited from interface org.millscript.commons.util.IMap |
|---|
contains, containsAll, containsValue, equals, hashCode, isEmtpy, keyList, mapletList, setDefault, size, valueList |
| Method Detail |
|---|
void addFirst(V value)
value - the value to add to the begining of the listvoid addLast(V value)
value - the value to add to the end of the listvoid append(IList<? extends V> list)
list - the list to append to this one
void delete(int pos,
V value)
pos - the index(one based) of the object to removevalue - the value which must match that stored at the specified
position(one based) in the list
void delete(java.lang.Integer pos,
V value)
pos - the index(one based) of the object to removevalue - the value which must match that stored at the specified
position(one based) in the listvoid delete(Maplet<? extends java.lang.Integer,? extends V> entry)
entry - the maplet(one-based indexing) to remove from this list
void delete0(int pos,
V value)
pos - the index(zero based) of the object to removevalue - the value which must match that stored at the specified
position(zero based) in the list
void delete0(java.lang.Integer pos,
V value)
pos - the index(zero based) of the object to removevalue - the value which must match that stored at the specified
position(zero based) in the listvoid delete0(Maplet<? extends java.lang.Integer,? extends V> entry)
entry - the maplet(zero-based indexing) to remove from this listvoid deleteAll()
void deleteAll(IList<? extends V> list)
list - the list whose values to remove from this listvoid deleteFirst()
void deleteKey(int key)
key - the index(one based) of the value to removevoid deleteKey(java.lang.Integer key)
key - the index(one based) of the value to removevoid deleteKey0(int key)
key - the index(one based) of the value to removevoid deleteKey0(java.lang.Integer key)
key - the index(one based) of the value to removevoid deleteLast()
void deleteSlice(int first,
int last)
first(one based, inclusive) and continuing
last(one based, inclusive), shifting any subsequent
elements to a lowest available index.
If the last index is less than the first, nothing will be removed.
first - the index(one based, inclusive) of the first element in the
slicelast - the index(one based, inclusive) of the last element in the
slice, must be equal to or greater than first for anything
to be removed
void deleteSlice0(int first,
int last)
first(zero based, inclusive) and continuing
last(zero based, inclusive), shifting any subsequent
elements to a lowest available index.
If the last index is less than the first, nothing will be removed.
first - the index(zero based, inclusive) of the first element in
the slicelast - the index(zero based, inclusive) of the last element in the
slice, must be equal to or greater than first for anything
to be removedvoid deleteValue(V value)
value - the value to remove from this list
void insert(int pos,
V value)
pos - the position(one based) at which to insert the valuevalue - the value to insert
void insert(java.lang.Integer pos,
V value)
pos - the position(one based) at which to insert the valuevalue - the value to insertvoid insert(Maplet<? extends java.lang.Integer,? extends V> entry)
entry - the maplet to insert into this listvalue - the value to insert
void insert0(int pos,
V value)
pos - the position(zero based) at which to insert the valuevalue - the value to insert
void insert0(java.lang.Integer pos,
V value)
pos - the position(zero based) at which to insert the valuevalue - the value to insertvoid insert0(Maplet<? extends java.lang.Integer,? extends V> entry)
entry - the maplet to insert into this listvalue - the value to insertvoid prefix(IList<? extends V> list)
list - the list to prefix to this one
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||