| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| DSet |
|
| 1.0;1 |
| 1 | package org.odmg; | |
| 2 | ||
| 3 | ||
| 4 | ||
| 5 | /** | |
| 6 | ||
| 7 | * The ODMG Set collection interface. | |
| 8 | ||
| 9 | * A <code>DSet</code> object is an unordered collection that does not support | |
| 10 | ||
| 11 | * multiple elements with the same value. An implementation typically is very | |
| 12 | ||
| 13 | * efficient at determining whether the collection contains a particular value. | |
| 14 | ||
| 15 | * <p> | |
| 16 | ||
| 17 | * All of the operations defined by the JavaSoft <code>Set</code> | |
| 18 | ||
| 19 | * interface are supported by an ODMG implementation of <code>DSet</code>, | |
| 20 | ||
| 21 | * the exception <code>UnsupportedOperationException</code> is not thrown when a | |
| 22 | ||
| 23 | * call is made to any of the <code>Set</code> methods. | |
| 24 | ||
| 25 | * @author David Jordan (as Java Editor of the Object Data Management Group) | |
| 26 | ||
| 27 | * @version ODMG 3.0 | |
| 28 | ||
| 29 | */ | |
| 30 | ||
| 31 | // * @see java.lang.UnsupportedOperationException | |
| 32 | ||
| 33 | ||
| 34 | ||
| 35 | public interface DSet extends DCollection, java.util.Set | |
| 36 | ||
| 37 | { | |
| 38 | ||
| 39 | ||
| 40 | ||
| 41 | /** | |
| 42 | ||
| 43 | * Create a new <code>DSet</code> object that is the set union of this | |
| 44 | ||
| 45 | * <code>DSet</code> object and the set referenced by <code>otherSet</code>. | |
| 46 | ||
| 47 | * @param otherSet The other set to be used in the union operation. | |
| 48 | ||
| 49 | * @return A newly created <code>DSet</code> instance that contains the union of the two sets. | |
| 50 | ||
| 51 | */ | |
| 52 | ||
| 53 | public DSet union(DSet otherSet); | |
| 54 | ||
| 55 | ||
| 56 | ||
| 57 | /** | |
| 58 | ||
| 59 | * Create a new <code>DSet</code> object that is the set intersection of this | |
| 60 | ||
| 61 | * <code>DSet</code> object and the set referenced by <code>otherSet</code>. | |
| 62 | ||
| 63 | * @param otherSet The other set to be used in the intersection operation. | |
| 64 | ||
| 65 | * @return A newly created <code>DSet</code> instance that contains the | |
| 66 | ||
| 67 | * intersection of the two sets. | |
| 68 | ||
| 69 | */ | |
| 70 | ||
| 71 | public DSet intersection(DSet otherSet); | |
| 72 | ||
| 73 | ||
| 74 | ||
| 75 | /** | |
| 76 | ||
| 77 | * Create a new <code>DSet</code> object that contains the elements of this | |
| 78 | ||
| 79 | * collection minus the elements in <code>otherSet</code>. | |
| 80 | ||
| 81 | * @param otherSet A set containing elements that should not be in the result set. | |
| 82 | ||
| 83 | * @return A newly created <code>DSet</code> instance that contains the elements | |
| 84 | ||
| 85 | * of this set minus those elements in <code>otherSet</code>. | |
| 86 | ||
| 87 | */ | |
| 88 | ||
| 89 | public DSet difference(DSet otherSet); | |
| 90 | ||
| 91 | ||
| 92 | ||
| 93 | /** | |
| 94 | ||
| 95 | * Determine whether this set is a subset of the set referenced by <code>otherSet</code>. | |
| 96 | ||
| 97 | * @param otherSet Another set. | |
| 98 | ||
| 99 | * @return True if this set is a subset of the set referenced by <code>otherSet</code>, | |
| 100 | ||
| 101 | * otherwise false. | |
| 102 | ||
| 103 | */ | |
| 104 | ||
| 105 | public boolean subsetOf(DSet otherSet); | |
| 106 | ||
| 107 | ||
| 108 | ||
| 109 | /** | |
| 110 | ||
| 111 | * Determine whether this set is a proper subset of the set referenced by | |
| 112 | ||
| 113 | * <code>otherSet</code>. | |
| 114 | ||
| 115 | * @param otherSet Another set. | |
| 116 | ||
| 117 | * @return True if this set is a proper subset of the set referenced by | |
| 118 | ||
| 119 | * <code>otherSet</code>, otherwise false. | |
| 120 | ||
| 121 | */ | |
| 122 | ||
| 123 | public boolean properSubsetOf(DSet otherSet); | |
| 124 | ||
| 125 | ||
| 126 | ||
| 127 | /** | |
| 128 | ||
| 129 | * Determine whether this set is a superset of the set referenced by <code>otherSet</code>. | |
| 130 | ||
| 131 | * @param otherSet Another set. | |
| 132 | ||
| 133 | * @return True if this set is a superset of the set referenced by <code>otherSet</code>, | |
| 134 | ||
| 135 | * otherwise false. | |
| 136 | ||
| 137 | */ | |
| 138 | ||
| 139 | public boolean supersetOf(DSet otherSet); | |
| 140 | ||
| 141 | ||
| 142 | ||
| 143 | /** | |
| 144 | ||
| 145 | * Determine whether this set is a proper superset of the set referenced by | |
| 146 | ||
| 147 | * <code>otherSet</code>. | |
| 148 | ||
| 149 | * @param otherSet Another set. | |
| 150 | ||
| 151 | * @return True if this set is a proper superset of the set referenced by | |
| 152 | ||
| 153 | * <code>otherSet</code>, otherwise false. | |
| 154 | ||
| 155 | */ | |
| 156 | ||
| 157 | public boolean properSupersetOf(DSet otherSet); | |
| 158 | ||
| 159 | } | |
| 160 |