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

com.g2forge.alexandria.collection.DCollectionCollection Maven / Gradle / Ivy

There is a newer version: 0.0.7
Show newest version
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();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy