Class History<T>
java.lang.Object
org.eclipse.net4j.util.event.Notifier
org.eclipse.net4j.util.collection.History<T>
- All Implemented Interfaces:
Iterable<IHistoryElement<T>>
,IHistory<T>
,INotifier
,INotifier.INotifier2
- Direct Known Subclasses:
PreferenceHistory
- Author:
- Eike Stepper
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
INotifier.INotifier2
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
protected final void
changed()
boolean
clear()
protected IHistoryElement<T>
createElement
(T data) get
(int index) <D> D[]
getData
(D[] a) int
boolean
isEmpty()
iterator()
protected void
load()
remove
(int index) protected void
save()
void
setElements
(List<IHistoryElement<T>> newElements) int
size()
IHistoryElement<T>[]
toArray()
Methods inherited from class org.eclipse.net4j.util.event.Notifier
addListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
elements
-
-
Constructor Details
-
History
public History()
-
-
Method Details
-
getElements
-
setElements
-
isEmpty
public boolean isEmpty() -
size
public int size() -
indexOf
-
get
-
add
-
remove
-
clear
public boolean clear() -
getMostRecent
- Specified by:
getMostRecent
in interfaceIHistory<T>
-
getData
public <D> D[] getData(D[] a) -
toArray
-
iterator
-
createElement
-
load
protected void load() -
save
protected void save() -
changed
protected final void changed()
-