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

com.github.krukow.clj_ds.TransientCollection Maven / Gradle / Ivy

package com.github.krukow.clj_ds;

/**
 * A {@link TransientCollection} is a collection that does not retain older
 * versions in order to gain efficient modifications. To manipulate a
 * {@link TransientCollection}, one must still used the new values produced by
 * the "destructive" operations plus, minus, etc. However, no guarantees are
 * made on the previous values of the collection.
 */
public interface TransientCollection {

	/**
	 * @return A new {@link TransientCollection} consisting of all the elements
	 *         of the current collection together with the value val (no
	 *         guarantees are made on the current collection).
	 */
	TransientCollection plus(E val);

	/**
	 * @return A corresponding {@link PersistentCollection} consisting of the
	 *         elements of the current {@link TransientCollection}.
	 */
	PersistentCollection persist();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy