Class BaseXHistory


  • public final class BaseXHistory
    extends Object
    This class remembers previous text inputs of a GUI component.
    Author:
    BaseX Team 2005-24, BSD License, Christian Gruen
    • Constructor Detail

      • BaseXHistory

        public BaseXHistory​(StringsOption key,
                            Options options)
        Constructor.
        Parameters:
        key - key to history values
        options - options
    • Method Detail

      • add

        public void add​(String input)
        Adds the specified value on top of history and stores the history in the options. Empty values will be ignored.
        Parameters:
        input - new input
      • get

        public String get​(boolean next)
        Returns a history value.
        Parameters:
        next - next/previous entry
        Returns:
        entry, or null if history is empty
      • values

        public String[] values()
        Returns all values.
        Returns:
        history values