org.apache.groovy.json.internal

## Class SimpleCache<K,V>

- java.lang.Object
- - org.apache.groovy.json.internal.SimpleCache<K,V>

- All Implemented Interfaces:
    Cache<K,V>

      public class SimpleCache<K,V>
      extends java.lang.Object
      implements Cache<K,V>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleCache(int limit)`
    `SimpleCache(int limit, CacheType type)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `V` | `get(K key)`
    `V` | `getSilent(K key)`
    `void` | `put(K key, V value)`
    `void` | `remove(K key)`
    `int` | `size()`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpleCache

          public SimpleCache(int limit,
                             CacheType type)

    - #### SimpleCache

          public SimpleCache(int limit)

  - ### Method Detail

    - #### put

          public void put(K key,
                          V value)

      Specified by:
        `put` in interface `Cache<K,V>`

    - #### get

          public V get(K key)

      Specified by:
        `get` in interface `Cache<K,V>`

    - #### getSilent

          public V getSilent(K key)

      Specified by:
        `getSilent` in interface `Cache<K,V>`

    - #### remove

          public void remove(K key)

      Specified by:
        `remove` in interface `Cache<K,V>`

    - #### size

          public int size()

      Specified by:
        `size` in interface `Cache<K,V>`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`