All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.setl.json.primitive.cache.ICache Maven / Gradle / Ivy

Go to download

An implementation of the Canonical JSON format with support for javax.json and Jackson

The newest version!
package io.setl.json.primitive.cache;

import java.util.function.Function;
import javax.annotation.Nonnull;

/**
 * An interface that caches should implement.
 *
 * @author Simon Greatrix on 05/02/2020.
 */
public interface ICache {

  /**
   * Get or create a value.
   *
   * @param key     the key
   * @param creator the function to create the value from the key
   *
   * @return the value
   */
  @Nonnull
  V get(K key, Function creator);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy