Class StringHistoryManager
PreferencesHistoryManager for strings, providing simple and efficient
history management functionalities such as adding, removing, and clearing history items.
It is designed for use cases where history items are plain strings, making it ideal for
applications requiring simple, persistent storage of string data like recent user inputs
or configurations. This class uses the Preferences API to persist history records,
ensuring that they are maintained across application restarts.
Due to the limitations of the Preferences API, this manager is not suitable for
scenarios involving large-scale data or complex data structures. It is optimized for
lightweight history management tasks where history items are stored and retrieved
in a straight forward fashion without transformation.
Key features include:
- Persisting history locally in a simple approach using the Preferences API
- Adding items while ensuring uniqueness
- Removing specific history items or clearing all history
- Providing a read-only view of history items to external components
- Observability of updates, suitable for UI integration
-
Property Summary
Properties inherited from class HistoryManager
filter, maxHistorySize -
Field Summary
Fields inherited from class PreferencesHistoryManager
DELIMITER -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class PreferencesHistoryManager
loadHistory, storeHistoryMethods inherited from class HistoryManager
add, add, clear, filterProperty, getAllUnmodifiable, getFilter, getMaxHistorySize, maxHistorySizeProperty, remove, remove, set, setFilter, setMaxHistorySize
-
Constructor Details
-
StringHistoryManager
-