|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.util.PersistedList<T>
public class PersistedList<T>
Collection whose change is notified to the parent object for persistence.
Nested Class Summary | |
---|---|
static class |
PersistedList.ConverterImpl
Converter implementation for XStream. |
Field Summary | |
---|---|
protected CopyOnWriteList<T> |
data
|
protected Saveable |
owner
|
Constructor Summary | |
---|---|
protected |
PersistedList()
|
protected |
PersistedList(Collection<? extends T> initialList)
|
|
PersistedList(Saveable owner)
|
Method Summary | ||
---|---|---|
void |
add(T item)
|
|
void |
addAll(Collection<? extends T> items)
|
|
void |
addAllTo(Collection<? super T> dst)
|
|
void |
clear()
|
|
boolean |
contains(Object item)
|
|
|
get(Class<U> type)
|
|
T |
get(int index)
|
|
|
getAll(Class<U> type)
Gets all instances that matches the given type. |
|
boolean |
isEmpty()
|
|
Iterator<T> |
iterator()
|
|
protected void |
onModified()
Called when a list is mutated. |
|
void |
remove(Class<? extends T> type)
Removes an instance by its type. |
|
boolean |
remove(T o)
|
|
void |
removeAll(Class<? extends T> type)
|
|
void |
replace(T from,
T to)
A convenience method to replace a single item. |
|
void |
replaceBy(Collection<? extends T> col)
|
|
void |
setOwner(Saveable owner)
|
|
int |
size()
|
|
T[] |
toArray(T[] array)
Gets all the Describable s in an array. |
|
List<T> |
toList()
Returns the snapshot view of instances as list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final CopyOnWriteList<T> data
protected Saveable owner
Constructor Detail |
---|
protected PersistedList()
protected PersistedList(Collection<? extends T> initialList)
public PersistedList(Saveable owner)
Method Detail |
---|
public void setOwner(Saveable owner)
public void add(T item) throws IOException
IOException
public void addAll(Collection<? extends T> items) throws IOException
IOException
public void replaceBy(Collection<? extends T> col) throws IOException
IOException
public T get(int index)
public <U extends T> U get(Class<U> type)
public <U extends T> List<U> getAll(Class<U> type)
public int size()
public void remove(Class<? extends T> type) throws IOException
IOException
public void replace(T from, T to) throws IOException
IOException
public boolean remove(T o) throws IOException
IOException
public void removeAll(Class<? extends T> type) throws IOException
IOException
public void clear()
public Iterator<T> iterator()
iterator
in interface Iterable<T>
protected void onModified() throws IOException
IOException
public List<T> toList()
public T[] toArray(T[] array)
Describable
s in an array.
public void addAllTo(Collection<? super T> dst)
public boolean isEmpty()
public boolean contains(Object item)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |