Package adams.core

Class AbstractHistory<T>

    • Field Detail

      • MAX_HISTORY_COUNT

        public static final int MAX_HISTORY_COUNT
        the maximum entries in the history.
        See Also:
        Constant Field Values
      • MAX_HISTORY_LENGTH

        public static final int MAX_HISTORY_LENGTH
        the maximum length of a caption in the history.
        See Also:
        Constant Field Values
      • m_History

        protected List<T> m_History
        the history of objects.
    • Constructor Detail

      • AbstractHistory

        public AbstractHistory()
        Initializes the history.
    • Method Detail

      • initialize

        protected void initialize()
        Initializes members.
      • copy

        protected abstract T copy​(T obj)
        Creates a copy of the object.
        Parameters:
        obj - the object to copy
      • clear

        public void clear()
        Clears the history.
      • add

        public void add​(T obj)
        Adds the object to the history.
        Parameters:
        obj - the object to add
      • size

        public int size()
        Returns the number of entries in the history.
        Returns:
        the size of the history
      • getHistory

        public List<T> getHistory()
        Returns the current history.
        Returns:
        the history