Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mindswap.pellet
Class ConceptCacheLRU

    java.lang.Object
      org.mindswap.pellet.AbstractConceptCache
          org.mindswap.pellet.ConceptCacheLRU

All Implemented Interfaces:
  java.util.Map<aterm.ATermAppl,CachedNode>, ConceptCache

    public class ConceptCacheLRU

extends AbstractConceptCache
implements ConceptCache

Title:

Description: LRU implementation of ConceptCache. Primitive concepts and their negation are always kept in the cache. The least recently used complex concept will be removed from the cache if the max size is reached.

Copyright: Copyright (c) 2007

Company: Clark & Parsia, LLC.

Author:
  Ron Alford

Nested Class Summary

Nested classes/interfaces inherited from interface java.util.Map
`java.util.Map.Entry<K,V>`

Constructor Summary
`ConceptCacheLRU()` Creates an empty ConceptCacheImpl with no size restrictions
`ConceptCacheLRU(int maxSize)` Creates an empty cache with at most `maxSize` elements which are neither named or negations of names.

Method Summary
`void` | `clear()`
`boolean` | `containsKey(java.lang.Object key)`
`boolean` | `containsValue(java.lang.Object value)`
`java.util.Set<java.util.Map.Entry<aterm.ATermAppl,CachedNode>>` | `entrySet()`
`CachedNode` | `get(java.lang.Object key)`
`boolean` | `isEmpty()`
`java.util.Set<aterm.ATermAppl>` | `keySet()`
`CachedNode` | `put(aterm.ATermAppl key, CachedNode value)`
`void` | `putAll(java.util.Map<? extends aterm.ATermAppl,? extends CachedNode> t)`
`CachedNode` | `remove(java.lang.Object key)`
`int` | `size()`
`java.util.Collection<CachedNode>` | `values()`

Methods inherited from class org.mindswap.pellet.AbstractConceptCache
`getMaxSize, getSat, putSat, remove, setMaxSize`

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

Methods inherited from interface org.mindswap.pellet.ConceptCache
`getMaxSize, getSat, putSat, remove, setMaxSize`

Methods inherited from interface java.util.Map
`equals, hashCode`

Constructor Detail

### ConceptCacheLRU

    public ConceptCacheLRU()

  Creates an empty ConceptCacheImpl with no size restrictions

  Parameters:
    `maxSize` -

### ConceptCacheLRU

    public ConceptCacheLRU(int maxSize)

  Creates an empty cache with at most `maxSize` elements which are neither named or negations of names.

  Parameters:
    `maxSize` -

Method Detail

### clear

    public void clear()

  Specified by:
    `clear` in interface `java.util.Map<aterm.ATermAppl,CachedNode>`

### containsKey

    public boolean containsKey(java.lang.Object key)

  Specified by:
    `containsKey` in interface `java.util.Map<aterm.ATermAppl,CachedNode>`

### containsValue

    public boolean containsValue(java.lang.Object value)

  Specified by:
    `containsValue` in interface `java.util.Map<aterm.ATermAppl,CachedNode>`

### entrySet

    public java.util.Set<java.util.Map.Entry<aterm.ATermAppl,CachedNode>> entrySet()

  Specified by:
    `entrySet` in interface `java.util.Map<aterm.ATermAppl,CachedNode>`

### get

    public CachedNode get(java.lang.Object key)

  Specified by:
    `get` in interface `java.util.Map<aterm.ATermAppl,CachedNode>`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `java.util.Map<aterm.ATermAppl,CachedNode>`

### keySet

    public java.util.Set<aterm.ATermAppl> keySet()

  Specified by:
    `keySet` in interface `java.util.Map<aterm.ATermAppl,CachedNode>`

### put

    public CachedNode put(aterm.ATermAppl key,
                          CachedNode value)

  Specified by:
    `put` in interface `java.util.Map<aterm.ATermAppl,CachedNode>`

### putAll

    public void putAll(java.util.Map<? extends aterm.ATermAppl,? extends CachedNode> t)

  Specified by:
    `putAll` in interface `java.util.Map<aterm.ATermAppl,CachedNode>`

### remove

    public CachedNode remove(java.lang.Object key)

  Specified by:
    `remove` in interface `java.util.Map<aterm.ATermAppl,CachedNode>`

### size

    public int size()

  Specified by:
    `size` in interface `java.util.Map<aterm.ATermAppl,CachedNode>`

### values

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

  Specified by:
    `values` in interface `java.util.Map<aterm.ATermAppl,CachedNode>`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Evren Sirin. All Rights Reserved.