Class UserHistory

  • All Implemented Interfaces:
    Serializable

    public class UserHistory
    extends Object
    implements Serializable

    Contains all the information about a user's history:

    • The X most recent pages viewed
    • The X most recently used labels
    X being defined by maxHistoryLength.

    Adding information to history is synchronized, so is accessing. The returned lists when accessing the history are unmodifiable copies.

    See Also:
    Serialized Form
    • Constructor Detail

      • UserHistory

        public UserHistory​(int historyLength)
    • Method Detail

      • addLabel

        public void addLabel​(Label label)
      • getMaxHistoryLength

        public int getMaxHistoryLength()
      • setMaxHistoryLength

        public void setMaxHistoryLength​(int maxHistoryLength)
      • getContent

        public List<Long> getContent()
        All the pages, sorted with Most Frequently Used returned at the start of the list.

        If there are no pages, and empty list is returned.

      • getLabels

        public List<Long> getLabels()