Class MruList.MruEntry

  • All Implemented Interfaces:
    java.lang.Comparable
    Enclosing class:
    MruList

    protected static class MruList.MruEntry
    extends java.lang.Object
    implements java.lang.Comparable
    Represent an entry in the MruList
    Author:
    TiongHiang Lee
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long _lastAccessTime
      the last access time *
      private java.lang.Object _obj
      the object *
    • Constructor Summary

      Constructors 
      Constructor Description
      MruEntry​(java.lang.Object obj, long time)
      Constructor
    • Field Detail

      • _lastAccessTime

        private long _lastAccessTime
        the last access time *
      • _obj

        private java.lang.Object _obj
        the object *
    • Constructor Detail

      • MruEntry

        public MruEntry​(java.lang.Object obj,
                        long time)
        Constructor
        Parameters:
        obj - the object
        time - the time
    • Method Detail

      • compareTo

        public int compareTo​(MruList.MruEntry e)
        Compare by the access time
        Parameters:
        e - another entry
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
      • compareTo

        public int compareTo​(java.lang.Object o)
        Specified by:
        compareTo in interface java.lang.Comparable
      • getLastAccessTime

        public final long getLastAccessTime()
        Return the lastAccessTime
        Returns:
        the lastAccessTime.
      • setLastAccessTime

        public final void setLastAccessTime​(long lastAccessTime)
        Set the lastAccessTime
        Parameters:
        lastAccessTime - The lastAccessTime to set.
      • getObj

        public final java.lang.Object getObj()
        Return the obj
        Returns:
        the obj.
      • setObj

        public final void setObj​(java.lang.Object obj)
        Set the obj
        Parameters:
        obj - The obj to set.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object