01 /* This file is part of the project "Hilbert II" - http://www.qedeq.org
02 *
03 * Copyright 2000-2013, Michael Meyling <mime@qedeq.org>.
04 *
05 * "Hilbert II" is free software; you can redistribute
06 * it and/or modify it under the terms of the GNU General Public
07 * License as published by the Free Software Foundation; either
08 * version 2 of the License, or (at your option) any later version.
09 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16 package org.qedeq.kernel.bo.common;
17
18 import java.util.Iterator;
19
20
21 /**
22 * An instance of this interface represents a set of {@link QedeqBo}s.
23 *
24 * @author Michael Meyling
25 */
26 public interface QedeqBoSet {
27
28 /**
29 * Is element in set?
30 *
31 * @param element QedeqBo to check for.
32 * @return Is <code>element</code> in this set?
33 * @throws IllegalArgumentException if the element was a
34 * NullPointer
35 */
36 public boolean contains(final QedeqBo element);
37
38 /**
39 * Is this set empty?
40 *
41 * @return Is this set empty?
42 */
43 public boolean isEmpty();
44
45 /**
46 * Get number of elements.
47 *
48 * @return Number of elements in this set.
49 */
50 public int size();
51
52 /**
53 * Returns an iterator over the elements in this set. The elements are
54 * returned in no particular order (unless this set is an instance of some
55 * class that provides a guarantee).
56 *
57 * @return Iterator over the {@link QedeqBo} elements in this set.
58 */
59 public Iterator iterator();
60
61 }
|