org.onemind.commons.java.datastructure
Class MruList.MruEntry

java.lang.Object
  extended byorg.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

Constructor Summary
MruList.MruEntry(java.lang.Object obj, long time)
          Constructor
 
Method Summary
 int compareTo(MruList.MruEntry e)
          Compare by the access time
 int compareTo(java.lang.Object o)
          
 long getLastAccessTime()
          Return the lastAccessTime
 java.lang.Object getObj()
          Return the obj
 void setLastAccessTime(long lastAccessTime)
          Set the lastAccessTime
 void setObj(java.lang.Object obj)
          Set the obj
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MruList.MruEntry

public MruList.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()



Copyright © 2004-2006 . All Rights Reserved.