IntCharSet implements Iterable<Integer> { public boolean contains(int singleChar) { return indexOf(singleChar) >= 0; }  static IntCharSet of(Interval interval); static IntCharSet of(Interval... intervals); static IntCharSet ofCharacterRange(int start, int end); static IntCharSet ofCharacter(int singleChar); static IntCharSet allChars(); static IntCharSet nlChars(); @SuppressWarnings("ReferenceEquality") void add(IntCharSet set); @SuppressWarnings("IncrementInForLoopAndHeader") void add(Interval interval); void add(int c); boolean contains(int singleChar); boolean contains(IntCharSet other); @Override boolean equals(Object o); @Override int hashCode(); IntCharSet and(IntCharSet set); @SuppressWarnings("ReferenceEquality") void sub(IntCharSet set); static IntCharSet complementOf(IntCharSet x); boolean containsElements(); int numIntervals(); List<Interval> getIntervals(); Iterator<Interval> intervalIterator(); IntCharSet getCaseless(UnicodeProperties unicodeProperties); @Override String toString(); static IntCharSet copyOf(IntCharSet intCharSet); int size(); @Override IntCharSetIterator iterator();  }
@Test public void contains() { IntCharSet a = IntCharSet.of(new Interval(3, 7), new Interval(10, 15)); IntCharSet b = IntCharSet.ofCharacterRange(4, 6); IntCharSet c = IntCharSet.ofCharacterRange(1, 5); IntCharSet d = IntCharSet.ofCharacterRange(1, 20); IntCharSet e = IntCharSet.of(new Interval(4, 6), new Interval(10, 15)); assertThat(a.contains(b)).isTrue(); assertThat(a.contains(e)).isTrue(); assertThat(a.contains(c)).isFalse(); assertThat(a.contains(d)).isFalse(); }