Class DefaultSearchHistory

    • Constructor Detail

      • DefaultSearchHistory

        public DefaultSearchHistory​(int maxCapacity)
        Creates new DefaultSearchHistory with given history capacity
        Parameters:
        maxCapacity - The maximum history capacity
    • Method Detail

      • savePattern

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

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