1 module antlr.v4.runtime.misc.IntSet; 2 3 /** 4 * TODO add interface description 5 */ 6 interface IntSet 7 { 8 9 /** 10 * @uml 11 * Adds the specified value to the current set. 12 * 13 * @param el the value to add 14 * 15 * @exception IllegalStateException if the current set is read-only 16 */ 17 public void add(int el); 18 19 /** 20 * @uml 21 * Modify the current {@link IntSet} object to contain all elements that are 22 * present in itself, the specified {@code set}, or both. 23 * 24 * @param set The set to add to the current set. A {@code null} argument is 25 * treated as though it were an empty set. 26 * @return {@code this} (to support chained calls) 27 * 28 * @exception IllegalStateException if the current set is read-only 29 */ 30 public IntSet addAll(IntSet set); 31 32 /** 33 * @uml 34 * Return a new {@link IntSet} object containing all elements that are 35 * present in both the current set and the specified set {@code a}. 36 * 37 * @param a The set to intersect with the current set. A {@code null} 38 * argument is treated as though it were an empty set. 39 * @return A new {@link IntSet} instance containing the intersection of the 40 * current set and {@code a}. The value {@code null} may be returned in 41 * place of an empty result set. 42 */ 43 public IntSet and(IntSet a); 44 45 public IntSet complement(IntSet elements); 46 47 public IntSet or(IntSet a); 48 49 public IntSet subtract(IntSet a); 50 51 private int size(); 52 53 public bool isNil(); 54 55 public bool opEquals(Object obj); 56 57 public int getSingleElement(); 58 59 public bool contains(int el); 60 61 public void remove(int el); 62 63 public int[] toList(); 64 65 public string toString(); 66 67 }