Package adams.core

Class AbstractPersistentHistory<T>

    • Field Detail

      • m_HistoryFile

        protected PlaceholderFile m_HistoryFile
        the file to save the history to.
    • Constructor Detail

      • AbstractPersistentHistory

        public AbstractPersistentHistory()
    • Method Detail

      • setHistoryFile

        public void setHistoryFile​(PlaceholderFile value)
        Sets the file to load from/save to.
        Parameters:
        value - the history file
      • getHistoryFile

        public PlaceholderFile getHistoryFile()
        Returns the file to load from/save to.
        Returns:
        the history file
      • add

        public void add​(T obj)
        Adds the object to the history.
        Overrides:
        add in class AbstractHistory<T>
        Parameters:
        obj - the object to add
      • save

        protected abstract boolean save()
        Saves the history to disk.
        Returns:
        true if successfully saved
      • load

        protected abstract boolean load()
        Loads the history from disk.
        Returns:
        true if successfully loaded