
com.github.krukow.clj_ds.PersistentMap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clj-ds Show documentation
Show all versions of clj-ds Show documentation
Port of Clojure's data structures to Java
The newest version!
package com.github.krukow.clj_ds;
import java.util.Map;
/**
* {@link PersistentMap}s
*
* @param
* The type of the keys
* @param
* The type of the values
*/
public interface PersistentMap extends Map {
/**
* @return An empty instance of this kind of {@link PersistentMap}
*/
PersistentMap zero();
/**
* @return A new {@link PersistentMap} consisting of the content of the
* current {@link PersistentMap} where the given key is associated
* to the value val. The new association may replace a previous
* association.
*/
PersistentMap plus(K key, V val);
/**
* @return A new {@link PersistentMap} consisting of the content of the
* current {@link PersistentMap} where the given key is associated
* to the value val.
* @throws java.lang.RuntimeException
* If the key is already present in the {@link PersistentMap}.
*/
PersistentMap plusEx(K key, V val);
/**
* @return A new {@link PersistentMap} consisting of the content of the
* current {@link PersistentMap} without the assocation to the given
* key.
*/
PersistentMap minus(K key);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy