public class SetContainer<E> extends Container<E> implements IContainer.Modifiable<E>, IContainer.Persistable<E>
IContainerSet
,
IContainerSortedSet
IContainer.Modifiable<E>, IContainer.Persistable<E>, IContainer.Persistence<E>
ILifecycle.DeferrableActivation
Constructor and Description |
---|
SetContainer(Class<E> componentType) |
SetContainer(Class<E> componentType,
Set<E> set) |
Modifier and Type | Method and Description |
---|---|
boolean |
addAllElements(Collection<E> elements) |
boolean |
addElement(E element) |
void |
clear() |
protected void |
containerModified()
Called outside synchronized(this).
|
protected void |
doActivate() |
protected void |
doDeactivate() |
protected void |
elementAdded(E element)
Called inside synchronized(this).
|
protected void |
elementRemoved(E element)
Called inside synchronized(this).
|
Class<E> |
getComponentType() |
E[] |
getElements() |
IContainer.Persistence<E> |
getPersistence() |
protected Set<E> |
getSet() |
boolean |
isEmpty() |
boolean |
isSavedWhenModified() |
void |
load() |
boolean |
removeAllElements(Collection<E> elements) |
boolean |
removeElement(E element) |
void |
save() |
void |
setPersistence(IContainer.Persistence<E> persistence) |
protected E[] |
sortElements(E[] array)
Called outside synchronized(this).
|
protected boolean |
validateElement(E element)
Called outside synchronized(this).
|
fireContainerEvent, fireContainerEvent, fireContainerEvent, fireElementAddedEvent, fireElementRemovedEvent, fireElementsAddedEvent, fireElementsRemovedEvent, fireEvent, newContainerEvent, newContainerEvent
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
addListener, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, getListeners, hasListeners, removeListener
public final IContainer.Persistence<E> getPersistence()
getPersistence
in interface IContainer.Persistable<E>
public final void setPersistence(IContainer.Persistence<E> persistence)
setPersistence
in interface IContainer.Persistable<E>
public boolean isSavedWhenModified()
public boolean isEmpty()
public E[] getElements()
getElements
in interface IContainer<E>
public boolean addElement(E element)
addElement
in interface IContainer.Modifiable<E>
public boolean addAllElements(Collection<E> elements)
addAllElements
in interface IContainer.Modifiable<E>
public boolean removeElement(E element)
removeElement
in interface IContainer.Modifiable<E>
public boolean removeAllElements(Collection<E> elements)
removeAllElements
in interface IContainer.Modifiable<E>
public void clear()
public void load() throws IORuntimeException
load
in interface IContainer.Persistable<E>
IORuntimeException
public void save() throws IORuntimeException
save
in interface IContainer.Persistable<E>
IORuntimeException
protected void doActivate() throws Exception
doActivate
in class Lifecycle
Exception
protected void doDeactivate() throws Exception
doDeactivate
in class Lifecycle
Exception
protected boolean validateElement(E element)
protected void containerModified()
protected void elementAdded(E element)
protected void elementRemoved(E element)
Copyright (c) 2011-2015 Eike Stepper (Berlin, Germany) and others.