## net.dontdrinkandroot.cache.metadata.comparator.impl
Class LfuComparator<K,M extends MetaData>

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

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

    public class LfuComparator<K,M extends MetaData>

extends Object
implements MetaDataComparator<K,M>

Sorts items by ascending count, if the count is equal the older item is picked.

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

Constructor Summary
`LfuComparator()`

Method Summary
`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

### LfuComparator

    public LfuComparator()

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>>`

Copyright © 2013 dontdrinkandroot. All Rights Reserved.