SimpleCache (Groovy 5.0.0)
Description: declaration: package: org.apache.groovy.json.internal, class: SimpleCache

Package 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 Object implements Cache<K,V>

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `V`
  `get(K key)`
  `V`
  `getSilent(K key)`
  `void`
  `put(K key, V value)`
  `void`
  `remove(K key)`
  `int`
  `size()`
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### SimpleCache

    public SimpleCache(int limit, CacheType type)

  - ### SimpleCache

    public SimpleCache(int limit)

- ## Method Details

  - ### 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 String toString()
    Overrides:
      `toString` in class `Object`