K
- type of the keypublic class LruKNode<K> extends AbstractNode<K,LruKNode<K>>
TreeMap
. Uses backward-K-distance to compare nodes.Constructor and Description |
---|
LruKNode(K key,
int numberOfIds)
Constructor for the LruKNode object.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(LruKNode<K> o)
Compares this node with the specified node.
|
long |
distance()
Computes the backward-K-distance of this node.
|
long |
id(int number)
Returns the number-th last access time of the node.
|
long |
lastId()
Returns the oldest stored access time.
|
int |
numberOfIds()
Returns number of last accesses stored by the node.
|
long |
update()
Updates last access time of this node.
|
equals, getKey, hashCode, toString
public LruKNode(K key, int numberOfIds)
key
- key associated with the nodenumberOfIds
- number of last references the node should storepublic long id(int number)
number
- id of the last access timepublic long lastId()
public long distance()
public long update()
public int numberOfIds()
Copyright © 2016 Egothor. All Rights Reserved.