KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > JSci > maths > MathSet


1 package JSci.maths;
2
3 /**
4 * This interface defines a set.
5 * @jsci.planetmath Set
6 * @version 1.2
7 * @author Mark Hale
8 */

9 public interface MathSet {
10         /**
11         * Returns the cardinality.
12         */

13         int cardinality();
14         /**
15         * Performs the union of this set with another.
16         * @param set a set.
17         * @return the union of the two sets.
18         */

19         MathSet union(MathSet set);
20         /**
21         * Performs the intersection of this set with another.
22         * @param set a set.
23         * @return the intersection of the two sets.
24         */

25         MathSet intersect(MathSet set);
26 }
27
28
Popular Tags