org.infinispan.stream.impl.intops.object.DistinctOperation Maven / Gradle / Ivy
package org.infinispan.stream.impl.intops.object;
import java.util.stream.Stream;
import org.infinispan.stream.impl.intops.IntermediateOperation;
/**
* Performs distinct operation on a regular {@link Stream}
* @param the type in the stream
*/
public class DistinctOperation implements IntermediateOperation, S, Stream> {
private static final DistinctOperation> OPERATION = new DistinctOperation<>();
private DistinctOperation() { }
public static DistinctOperation getInstance() {
return (DistinctOperation) OPERATION;
}
@Override
public Stream perform(Stream stream) {
return stream.distinct();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy