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.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
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(java.lang.Object o)
int
compareTo(MruList.MruEntry e)
Compare by the access timelong
getLastAccessTime()
Return the lastAccessTimejava.lang.Object
getObj()
Return the objvoid
setLastAccessTime(long lastAccessTime)
Set the lastAccessTimevoid
setObj(java.lang.Object obj)
Set the objjava.lang.String
toString()
-
-
-
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 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:
toString
in classjava.lang.Object
-
-