Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## es.upm.gib.eutilsrdfwrapper.utils
Class CacheMap<T,S>

    java.lang.Object
      es.upm.gib.eutilsrdfwrapper.utils.CacheMap<T,S>

    public class CacheMap<T,S>

extends java.lang.Object

A map-based cache which keeps track of the count of added elements and automatically erases the oldest ones (accessed longer ago) when the max allowed number is exceeded.

Constructor Summary
`CacheMap(int maxSize)`

Method Summary
`boolean` | `contains(T key)`
`S` | `get(T key)`
`boolean` | `isEmpty()`
`java.util.Set<T>` | `keySet()`
`void` | `put(T key, S value)`
`S` | `remove(T key)`
`int` | `size()`
`java.util.Collection<S>` | `values()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CacheMap

    public CacheMap(int maxSize)

Method Detail

### put

    public void put(T key,
                    S value)

### get

    public S get(T key)

### contains

    public boolean contains(T key)

### remove

    public S remove(T key)

### isEmpty

    public boolean isEmpty()

### size

    public int size()

### keySet

    public java.util.Set<T> keySet()

### values

    public java.util.Collection<S> values()

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD