com.g2forge.alexandria.collection.CollectionCollection 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.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.stream.Stream;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public class CollectionCollection implements ICollection {
protected final Collection collection;
@Override
public Iterator iterator() {
return collection.iterator();
}
@Override
public Stream stream() {
return collection.stream();
}
@Override
public Collection toCollection() {
return Collections.unmodifiableCollection(collection);
}
}