Top Description Fields Constructors Methods
com.dlsc.gemsfx.util

public Class StringHistoryManager

extends PreferencesHistoryManager<String>
Class Inheritance
Imports
javafx.util.StringConverter, org.apache.commons.lang3.StringUtils, java.util.prefs.Preferences

Manages a history of string records using the Java Preferences API. This class specializes the generic 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

Field Summary

Modifier and TypeField and Description
private static final StringConverter<String>
Inherited from com.dlsc.gemsfx.util.PreferencesHistoryManager:
DELIMITER

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.dlsc.gemsfx.util.PreferencesHistoryManager:
loadHistorystoreHistory

Field Detail

CONVERTERback to summary
private static final StringConverter<String> CONVERTER

Constructor Detail

StringHistoryManagerback to summary
public StringHistoryManager(Preferences preferences, String key)