20 lines
318 B
Java
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();
|
|
}
|