/** * Copyright (c): Uwe Schmidt, FH Wedel * * You may study, modify and distribute this source code * FOR NON-COMMERCIAL PURPOSES ONLY. * This copyright message has to remain unchanged. * * Note that this document is provided 'as is', * WITHOUT WARRANTY of any kind either expressed or implied. */ package ds.interfaces; /** Simple interface for sets */ import java.util.Iterator; import ds.util.Invariant; import ds.util.E; // example class for elements public interface Set extends Iterable, Invariant { boolean isEmpty(); boolean member(E e); int size(); E findMin(); E findMax(); Set insert(E e); Set remove(E e); Set union(Set m2); Set difference(Set m2); Set intersect(Set m2); Set copy(); // inherited // Iterator iterator(); // boolean inv(); }