| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private final ObjectProperty | |
| private final ObservableList | |
| private static final Logger | |
| private final IntegerProperty | |
| private final ObservableList |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final void | |
| public final void | |
| public final void | |
| private List | Returns: the converted unique list of stringsthe list of strings to convert history)Converts a given list of strings to a unique list of strings. |
| public final ObjectProperty | Returns: the property object for the filterReturns the property object for the filter used when adding items to the history. |
| public final ObservableList | |
| public final Predicate | |
| public final int | |
| protected abstract void | |
| public final IntegerProperty | Returns: the maximum number of items in the historyThe maximum number of items that the history will store. |
| public final boolean | Returns: true if the item was removed, false otherwisethe item to remove item)Removes the given item from the history. |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| protected abstract void | |
| private void |
| DEFAULT_MAX_HISTORY_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_MAX_HISTORY_SIZE | |
| filter | back to summary |
|---|---|
| private final ObjectProperty<Predicate<T>> filter | |
| history | back to summary |
|---|---|
| private final ObservableList<T> history | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| maxHistorySize | back to summary |
|---|---|
| private final IntegerProperty maxHistorySize | |
| unmodifiableHistory | back to summary |
|---|---|
| private final ObservableList<T> unmodifiableHistory | |
| HistoryManager | back to summary |
|---|---|
| public HistoryManager() | |
| add | back to summary |
|---|---|
| public final void add(T item) Adds the given item to the history. The method ensures that duplicates will not be added.
| |
| add | back to summary |
|---|---|
| public final void add(List<T> items) Adds the given items to the history.
| |
| clear | back to summary |
|---|---|
| public final void clear() Clears the history. | |
| convertToUniqueList | back to summary |
|---|---|
| private List Converts a given list of strings to a unique list of strings. Filters out empty strings. | |
| filterProperty | back to summary |
|---|---|
| public final ObjectProperty Returns the property object for the filter used when adding items to the history. Only items that pass the filter will be added to the history.
| |
| getAllUnmodifiable | back to summary |
|---|---|
| public final ObservableList Returns an unmodifiable list of the history. | |
| getFilter | back to summary |
|---|---|
| public final Predicate | |
| getMaxHistorySize | back to summary |
|---|---|
| public final int getMaxHistorySize() | |
| loadHistory | back to summary |
|---|---|
| protected abstract void loadHistory() | |
| maxHistorySizeProperty | back to summary |
|---|---|
| public final IntegerProperty maxHistorySizeProperty() The maximum number of items that the history will store. If the number of items exceeds this value, the oldest items will be removed.
| |
| remove | back to summary |
|---|---|
| public final boolean remove(T item) Removes the given item from the history.
| |
| remove | back to summary |
|---|---|
| public final void remove(List<T> items) Removes the given items from the history.
| |
| set | back to summary |
|---|---|
| public final void set(List<T> history) Sets the history of the HistoryManager with the provided list of strings. The method ensures that duplicates are removed from the list.
| |
| setFilter | back to summary |
|---|---|
| public final void setFilter(Predicate<T> filter) | |
| setMaxHistorySize | back to summary |
|---|---|
| public final void setMaxHistorySize(int maxHistorySize) | |
| storeHistory | back to summary |
|---|---|
| protected abstract void storeHistory() | |
| trimHistory | back to summary |
|---|---|
| private void trimHistory() Trims the history list to ensure it does not exceed the maximum allowed size. If the current history size is greater than the maximum size, the method removes the extra elements from the history list. | |