|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
M
- the kind of data this filter offerspublic static interface PlaceholderList.Filter<M>
A sublist of a PlaceholderList
, the elements in this
list are filtered by a strategy that is defined by the
PlaceholderList
. Modifying this list has an effect
in the enclosing PlaceholderList
.
Method Summary | |
---|---|
void |
add(int index,
M object)
Inserts object at location index
of this list. |
void |
add(M object)
Adds object to this list, the object
is added at the end of the list. |
void |
addPlaceholder(int index,
Path placeholder)
Adds a placeholder at location index , ensures that this
placeholder is only present at index . |
M |
get(int index)
Gets the index'th element of this list. |
PlaceholderMetaMap |
getMetaMap(int index)
Gets a mutable map which is associated with the index 'th entry,
the content of this map is stored persistently. |
int |
indexOf(M object)
Searches the first occurrence of object . |
int |
indexOfPlaceholder(Path placeholder)
Searches the first occurence of placeholder . |
void |
insertPlaceholder(int index,
Path placeholder)
Generates a new entry containing only placeholder . |
void |
move(int source,
int destination)
Moves the item at location source to location destination . |
void |
move(PlaceholderList.Filter<M> sourceList,
int sourceIndex,
int destination)
Moves an item from sourceList to this list. |
M |
remove(int index)
Removes the object at location index from this list. |
int |
remove(M object)
Removes the first occurrence of object . |
M |
set(int index,
M object)
Replaces the object at location index by object . |
int |
size()
The number of elements that are in this list |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
int size()
M get(int index)
index
- the location of some element
null
PlaceholderMetaMap getMetaMap(int index)
index
'th entry,
the content of this map is stored persistently.
index
- the location of some element
void add(M object)
object
to this list, the object
is added at the end of the list.
object
- the new object, not null
void add(int index, M object)
object
at location index
of this list.
index
- the locationobject
- the new element, not null
void addPlaceholder(int index, Path placeholder)
index
, ensures that this
placeholder is only present at index
.
index
- some locationplaceholder
- the placeholder to insertvoid insertPlaceholder(int index, Path placeholder)
placeholder
. Filters not able to
show entries with only placeholders will still insert the entry, but the client cannot
access it.
index
- the location of the new entryplaceholder
- the content of the new entryM set(int index, M object)
index
by object
.
index
- the locationobject
- the new element, not null
M remove(int index)
index
from this list.
index
- the location of some object
null
int remove(M object)
object
. This method searches
with help of the Object.equals(Object)
method.
object
- the object to remove, not null
int indexOf(M object)
object
.
object
- the object to search, not null
int indexOfPlaceholder(Path placeholder)
placeholder
.
placeholder
- the placeholder to search
placeholder
or -1
void move(int source, int destination)
source
to location destination
.
source
- the current location of some itemdestination
- the new locationvoid move(PlaceholderList.Filter<M> sourceList, int sourceIndex, int destination)
sourceList
to this list.
sourceList
is this
, then calling this method is equivalent of calling move(int, int)
.sourceList
is an inner object from the same PlaceholderList
, then calling move(int, int)
of PlaceholderList.list()
with adapted arguments is equivalent of calling this method. sourceList
, and a copy will be inserted into this list.sourceList
is of the same type as this
. This is true
for
all PlaceholderList.Filter
s that were created by a PlaceholderList
, but if clients implement the interface then this method will
throw an IllegalArgumentException
sourceList
- the list to read fromsourceIndex
- the current location of some itemdestination
- the new location
IllegalArgumentException
- if sourceList
is of a type that is
not recognized by this class, or if any of sourceIndex
of destination
is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |