net.dontdrinkandroot.cache.metadata.comparator.impl

## Class LruComparator<K,M extends MetaData>

- java.lang.Object
- - net.dontdrinkandroot.cache.metadata.comparator.impl.LruComparator<K,M>

All Implemented Interfaces:
  Comparator<Map.Entry<K,M>>, MetaDataComparator<K,M>

    public class LruComparator<K,M extends MetaData>
    extends Object
    implements MetaDataComparator<K,M>

Sorts items by ascending access time (older first), if the access time is equal the one with the lower count is picked.

Author:
  Philip W. Sorst <philip@sorst.net>

### Constructor Summary

Constructors
Constructor and Description
`LruComparator()`

### Method Summary

Methods
`int` `compare(Map.Entry<K,M> entry1, Map.Entry<K,M> entry2)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.Comparator

`equals`

### Constructor Detail

#### LruComparator

    public LruComparator()

### Method Detail

#### compare

    public int compare(Map.Entry<K,M> entry1,
              Map.Entry<K,M> entry2)

Specified by:
  `compare` in interface `Comparator<Map.Entry<K,M extends MetaData>>`