Class MruList.MruEntry
- java.lang.Object
-
- org.onemind.commons.java.datastructure.MruList.MruEntry
-
- All Implemented Interfaces:
java.lang.Comparable
- Enclosing class:
- MruList
protected static class MruList.MruEntry extends java.lang.Object implements java.lang.ComparableRepresent an entry in the MruList- Author:
- TiongHiang Lee
-
-
Field Summary
Fields Modifier and Type Field Description private long_lastAccessTimethe last access time *private java.lang.Object_objthe object *
-
Constructor Summary
Constructors Constructor Description MruEntry(java.lang.Object obj, long time)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(java.lang.Object o)intcompareTo(MruList.MruEntry e)Compare by the access timelonggetLastAccessTime()Return the lastAccessTimejava.lang.ObjectgetObj()Return the objvoidsetLastAccessTime(long lastAccessTime)Set the lastAccessTimevoidsetObj(java.lang.Object obj)Set the objjava.lang.StringtoString()
-
-
-
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:
compareToin interfacejava.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:
toStringin classjava.lang.Object
-
-