org.pure4j.collections.IPersistentCollection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pure4j-core Show documentation
Show all versions of pure4j-core Show documentation
Pure Functional Programming Semantics For Java
package org.pure4j.collections;
import java.util.Collection;
import org.pure4j.annotations.immutable.ImmutableValue;
/**
* Each IPersistentCollection should have:
*
* - A no-args constructor for the empty collection
* - A constructor taking an ISeq.
* - A static create method taking a varargs array (impure)
* - An impure method taking another Collection (for copy)
*
*
* @author robmoffat
*
* @param Base-type for collection elements
*/
@ImmutableValue
public interface IPersistentCollection extends Seqable, Collection, Counted {
IPersistentCollection cons(K o);
IPersistentCollection empty();
ITransientCollection asTransient();
//IPersistentCollection addAll(ISeq extends K> items);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy