This repository has been archived on 2022-06-01. You can view files and clone it, but cannot push or open issues or pull requests.
LinkDitch/4-Abstraction/src/main/java/datastructures/set/CustomSet.java
qvalentin e4f1670742
All checks were successful
continuous-integration/drone/push Build is passing
Code Smell: Remove duplicate logic for searching in sets
2022-04-22 14:14:04 +02:00

20 lines
318 B
Java

package datastructures.set;
import java.util.Optional;
import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Stream;
public interface CustomSet<T> {
Stream<T> stream();
boolean add(T value);
boolean remove(T value);
Optional<T> find(Predicate<T> predicate);
Set<T> getSet();
}