com.g2forge.alexandria.collection.DCollectionCollection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ax-collection Show documentation
Show all versions of ax-collection Show documentation
Extended collection API, which will evolve to encompass all ADTs.
package com.g2forge.alexandria.collection;
import java.util.Iterator;
import java.util.stream.Stream;
/**
* Sub-interface of {@link ICollection} which allows functional implementation of just the {@link ICollection#toCollection()} method.
*
* @param The type of the elements in this collection.
*/
@FunctionalInterface
public interface DCollectionCollection extends ICollection {
public default Iterator iterator() {
return toCollection().iterator();
}
public default Stream stream() {
return toCollection().stream();
}
}