public class History<T> extends Notifier implements IHistory<T>
Modifier and Type | Field and Description |
---|---|
protected List<IHistoryElement<T>> |
elements |
Constructor and Description |
---|
History() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T data) |
protected void |
changed() |
boolean |
clear() |
protected IHistoryElement<T> |
createElement(T data) |
IHistoryElement<T> |
get(int index) |
<D> D[] |
getData(D[] a) |
List<IHistoryElement<T>> |
getElements() |
T |
getMostRecent() |
int |
indexOf(T data) |
boolean |
isEmpty() |
Iterator<IHistoryElement<T>> |
iterator() |
protected void |
load() |
IHistoryElement<T> |
remove(int index) |
protected void |
save() |
void |
setElements(List<IHistoryElement<T>> newElements) |
int |
size() |
IHistoryElement<T>[] |
toArray() |
addListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListener, getListeners, hasListeners, removeListener
forEach, spliterator
protected List<IHistoryElement<T>> elements
public List<IHistoryElement<T>> getElements()
public void setElements(List<IHistoryElement<T>> newElements)
public IHistoryElement<T> get(int index)
public IHistoryElement<T> remove(int index)
public T getMostRecent()
getMostRecent
in interface IHistory<T>
public IHistoryElement<T>[] toArray()
public Iterator<IHistoryElement<T>> iterator()
iterator
in interface Iterable<IHistoryElement<T>>
protected IHistoryElement<T> createElement(T data)
protected void load()
protected void save()
protected final void changed()
Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html