org.eclipse.net4j.util.collection

## Class History<T>

- java.lang.Object
- - org.eclipse.net4j.util.event.Notifier
  - - org.eclipse.net4j.util.collection.History<T>

- All Implemented Interfaces:
    java.lang.Iterable<IHistoryElement<T>>, IHistory<T>, INotifier
  Direct Known Subclasses:
    PreferenceHistory

      public class History<T>
      extends Notifier
      implements IHistory<T>

  Author:
    Eike Stepper

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.List<IHistoryElement<T>>` | `elements`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `History()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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)`
    `java.util.List<IHistoryElement<T>>` | `getElements()`
    `T` | `getMostRecent()`
    `int` | `indexOf(T data)`
    `boolean` | `isEmpty()`
    `java.util.Iterator<IHistoryElement<T>>` | `iterator()`
    `protected void` | `load()`
    `IHistoryElement<T>` | `remove(int index)`
    `protected void` | `save()`
    `void` | `setElements(java.util.List<IHistoryElement<T>> newElements)`
    `int` | `size()`
    `IHistoryElement<T>[]` | `toArray()`

    - ### Methods inherited from class org.eclipse.net4j.util.event.Notifier

      `addListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, 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 Detail

    - #### elements

          protected java.util.List<IHistoryElement<T>> elements

  - ### Constructor Detail

    - #### History

          public History()

  - ### Method Detail

    - #### getElements

          public java.util.List<IHistoryElement<T>> getElements()

    - #### setElements

          public void setElements(java.util.List<IHistoryElement<T>> newElements)

    - #### isEmpty

          public boolean isEmpty()

      Specified by:
        `isEmpty` in interface `IHistory<T>`

    - #### size

          public int size()

      Specified by:
        `size` in interface `IHistory<T>`

    - #### indexOf

          public int indexOf(T data)

      Specified by:
        `indexOf` in interface `IHistory<T>`

    - #### get

          public IHistoryElement<T> get(int index)

      Specified by:
        `get` in interface `IHistory<T>`

    - #### add

          public boolean add(T data)

      Specified by:
        `add` in interface `IHistory<T>`

    - #### remove

          public IHistoryElement<T> remove(int index)

      Specified by:
        `remove` in interface `IHistory<T>`

    - #### clear

          public boolean clear()

      Specified by:
        `clear` in interface `IHistory<T>`

    - #### getMostRecent

          public T getMostRecent()

      Specified by:
        `getMostRecent` in interface `IHistory<T>`

    - #### getData

          public <D> D[] getData(D[] a)

      Specified by:
        `getData` in interface `IHistory<T>`

    - #### toArray

          public IHistoryElement<T>[] toArray()

      Specified by:
        `toArray` in interface `IHistory<T>`

    - #### iterator

          public java.util.Iterator<IHistoryElement<T>> iterator()

      Specified by:
        `iterator` in interface `java.lang.Iterable<IHistoryElement<T>>`

    - #### createElement

          protected IHistoryElement<T> createElement(T data)

    - #### load

          protected void load()

    - #### save

          protected void save()

    - #### changed

          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