# Class: com.pnfsoftware.jeb.util.collect.CacheMap

A simple [CacheMap](CacheMap), with optional support for cached entries ordering.

## Constructor: CacheMap
- parameter: `maxSize`, type: `int`
- parameter: `evictSize`, type: `int`
- parameter: `ordered`, type: `boolean`

Description: Construct a cache map. Whenever an element is added and the map exceeds the maximum size, it will be partially cleaned up by evicting the last accessed objects.
parameter: maxSize: maximum size of the cache map
parameter: evictSize: number of objects evicted during a partial cache cleanup
parameter: ordered: true to naturally order elements in the map

## Constructor: CacheMap
- parameter: `maxSize`, type: `int`
- parameter: `evictSize`, type: `int`

Description: Construct a cache map. Whenever an element is added and the map exceeds the maximum size, it will be partially cleaned up by evicting the last accessed objects.
parameter: maxSize: maximum size of the cache map
parameter: evictSize: number of objects evicted during a partial cache cleanup

## Constructor: CacheMap
- parameter: `maxSize`, type: `int`

Description: Construct a cache map with an eviction size equals to 25% of the cache size.
parameter: maxSize: maximum size of the map

## Field: dbgHitCount
Type: `int`

## Field: dbgQueryCount
Type: `int`

## Method: clear


## Method: containsKey
- parameter: `key`, type: `K`
- return type: `boolean`


## Method: get
- parameter: `key`, type: `K`
- return type: `V`


## Method: keys
- return type: `java.util.Set<K>`

Description: 
return: a copy of the cache keys \(the client may modify the returned set, it will not impact         the cache\)

## Method: put
- parameter: `key`, type: `K`
- parameter: `val`, type: `V`
- return type: `V`


## Method: remove
- parameter: `key`, type: `K`
- return type: `V`


## Method: removeRange
- parameter: `fromKey`, type: `K`
- parameter: `toKey`, type: `K`
- return type: `boolean`

Description: 
parameter: fromKey: start of range
parameter: toKey: end of range \(exclusive\)
return: true if some entries were removed

## Method: size
- return type: `int`


