Class PersistableSearchHistoryBase

    • Constructor Detail

      • PersistableSearchHistoryBase

        public PersistableSearchHistoryBase()
    • Method Detail

      • savePattern

        public void savePattern​(String pattern)
        Saves pattern in the history.
        Specified by:
        savePattern in interface ISearchHistory
        Parameters:
        pattern - pattern to save.
      • getRecentPatterns

        public List<String> getRecentPatterns​(int maxPatterns)
        Return recent history patterns. Use ISearchHistory.ALL_PATTERNS to obtain all patterns stored in the history.
        Specified by:
        getRecentPatterns in interface ISearchHistory
        Parameters:
        maxPatterns - maximum number of patterns to return.
        Returns:
        recent patterns or empty iterable if there are no patterns.
      • saveState

        protected abstract void saveState()
        Saves the state.
      • loadState

        protected abstract void loadState()
        Loads the state.
      • getPatterns

        protected List<String> getPatterns()
        Returns:
        history patterns.