Cache (Jakarta-ORO 2.0.8 API)
Date: 2018-05-07

org.apache.oro.util

## Interface Cache

- All Known Implementing Classes:
    CacheFIFO, CacheFIFO2, CacheLRU, CacheRandom, GenericCache

      public interface Cache

  An interface defining the basic functions of a cache.
  Since:
    1.0
  Version:
    2.0.8

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addElement(java.lang.Object key, java.lang.Object value)`
    `int` | `capacity()` Returns the maximum number of elements that can be cached at one time.
    `java.lang.Object` | `getElement(java.lang.Object key)`
    `int` | `size()` Returns the number of elements in the cache, not to be confused with the `capacity()` which returns the number of elements that can be held in the cache at one time.

- - ### Method Detail

    - #### addElement

          void addElement(java.lang.Object key,
                        java.lang.Object value)

    - #### getElement

          java.lang.Object getElement(java.lang.Object key)

    - #### size

          int size()

      Returns the number of elements in the cache, not to be confused with the `capacity()` which returns the number of elements that can be held in the cache at one time.

      Returns:
        The current size of the cache (i.e., the number of elements currently cached).

    - #### capacity

          int capacity()

      Returns the maximum number of elements that can be cached at one time.

      Returns:
        The maximum number of elements that can be cached at one time.

Copyright ? 2000-2003 Apache Software Foundation. All Rights Reserved.