Package org.eclipse.net4j.util.container
Class SetContainer<E>
- java.lang.Object
- 
- org.eclipse.net4j.util.event.Notifier
- 
- org.eclipse.net4j.util.lifecycle.Lifecycle
- 
- org.eclipse.net4j.util.lifecycle.ShareableLifecycle
- 
- org.eclipse.net4j.util.container.Container<E>
- 
- org.eclipse.net4j.util.container.SetContainer<E>
 
 
 
 
 
- 
- All Implemented Interfaces:
- IContainer<E>,- IContainer.Modifiable<E>,- IContainer.Persistable<E>,- INotifier,- INotifier.INotifier2,- IDeactivateable,- ILifecycle,- ILifecycle.DeferrableActivation
 
 public class SetContainer<E> extends Container<E> implements IContainer.Modifiable<E>, IContainer.Persistable<E> - Since:
- 3.2
- Author:
- Eike Stepper
- See Also:
- IContainerSet,- IContainerSortedSet
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainerIContainer.Modifiable<E>, IContainer.Persistable<E>, IContainer.Persistence<E>
 - 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycleILifecycle.DeferrableActivation
 - 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifierINotifier.INotifier2
 
- 
 - 
Constructor SummaryConstructors Constructor Description SetContainer(java.lang.Class<E> componentType)SetContainer(java.lang.Class<E> componentType, java.util.Set<E> set)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddAllElements(java.util.Collection<E> elements)booleanaddElement(E element)voidclear()protected voidcontainerModified()Called outside synchronized(this).protected voiddoActivate()protected voiddoDeactivate()protected voidelementAdded(E element)Called inside synchronized(this).protected voidelementRemoved(E element)Called inside synchronized(this).java.lang.Class<E>getComponentType()E[]getElements()IContainer.Persistence<E>getPersistence()protected java.util.Set<E>getSet()booleanisEmpty()booleanisSavedWhenModified()voidload()booleanremoveAllElements(java.util.Collection<E> elements)booleanremoveElement(E element)voidsave()voidsetPersistence(IContainer.Persistence<E> persistence)protected E[]sortElements(E[] array)Called outside synchronized(this).protected booleanvalidateElement(E element)Called outside synchronized(this).- 
Methods inherited from class org.eclipse.net4j.util.container.ContainerfireContainerEvent, fireContainerEvent, fireContainerEvent, fireElementAddedEvent, fireElementRemovedEvent, fireElementsAddedEvent, fireElementsRemovedEvent, fireEvent, newContainerEvent, newContainerEvent
 - 
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycleactivate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
 - 
Methods inherited from class org.eclipse.net4j.util.event.NotifieraddListener, addUniqueListener, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.eclipse.net4j.util.event.INotifieraddListener, getListeners, hasListeners, removeListener
 
- 
 
- 
- 
- 
Method Detail- 
getComponentTypepublic final java.lang.Class<E> getComponentType() 
 - 
getPersistencepublic final IContainer.Persistence<E> getPersistence() - Specified by:
- getPersistencein interface- IContainer.Persistable<E>
- Since:
- 3.5
 
 - 
setPersistencepublic final void setPersistence(IContainer.Persistence<E> persistence) - Specified by:
- setPersistencein interface- IContainer.Persistable<E>
- Since:
- 3.5
 
 - 
isSavedWhenModifiedpublic boolean isSavedWhenModified() - Since:
- 3.5
 
 - 
isEmptypublic boolean isEmpty() 
 - 
getElementspublic E[] getElements() - Specified by:
- getElementsin interface- IContainer<E>
 
 - 
addElementpublic boolean addElement(E element) - Specified by:
- addElementin interface- IContainer.Modifiable<E>
 
 - 
addAllElementspublic boolean addAllElements(java.util.Collection<E> elements) - Specified by:
- addAllElementsin interface- IContainer.Modifiable<E>
- Since:
- 3.5
 
 - 
removeElementpublic boolean removeElement(E element) - Specified by:
- removeElementin interface- IContainer.Modifiable<E>
 
 - 
removeAllElementspublic boolean removeAllElements(java.util.Collection<E> elements) - Specified by:
- removeAllElementsin interface- IContainer.Modifiable<E>
- Since:
- 3.5
 
 - 
clearpublic void clear() 
 - 
loadpublic void load() throws IORuntimeException- Specified by:
- loadin interface- IContainer.Persistable<E>
- Throws:
- IORuntimeException
- Since:
- 3.5
 
 - 
savepublic void save() throws IORuntimeException- Specified by:
- savein interface- IContainer.Persistable<E>
- Throws:
- IORuntimeException
- Since:
- 3.5
 
 - 
doActivateprotected void doActivate() throws java.lang.Exception- Overrides:
- doActivatein class- Lifecycle
- Throws:
- java.lang.Exception
 
 - 
doDeactivateprotected void doDeactivate() throws java.lang.Exception- Overrides:
- doDeactivatein class- Lifecycle
- Throws:
- java.lang.Exception
 
 - 
getSetprotected java.util.Set<E> getSet() 
 - 
validateElementprotected boolean validateElement(E element) Called outside synchronized(this).
 - 
containerModifiedprotected void containerModified() Called outside synchronized(this).- Since:
- 3.5
 
 - 
elementAddedprotected void elementAdded(E element) Called inside synchronized(this).- Since:
- 3.5
 
 - 
elementRemovedprotected void elementRemoved(E element) Called inside synchronized(this).- Since:
- 3.5
 
 
- 
 
-