@Test public void testBlank() { Set<Integer> set = newSet(); assertFalse(set.contains(0)); assertFalse(set.contains(-5)); assertFalse(set.contains(2)); }
public boolean contains(E val) { Objects.requireNonNull(val); for (E[] vals : values) { if (vals != null && Arrays.binarySearch(vals, val) >= 0) return true; } return false; }
BinaryArraySet extends AbstractSet<E> { public boolean contains(E val) { Objects.requireNonNull(val); for (E[] vals : values) { if (vals != null && Arrays.binarySearch(vals, val) >= 0) return true; } return false; } }
BinaryArraySet extends AbstractSet<E> { public boolean contains(E val) { Objects.requireNonNull(val); for (E[] vals : values) { if (vals != null && Arrays.binarySearch(vals, val) >= 0) return true; } return false; } BinaryArraySet();  BinaryArraySet(Collection<? extends E> coll); @SuppressWarnings("unchecked")  BinaryArraySet(E... vals); }
BinaryArraySet extends AbstractSet<E> { public boolean contains(E val) { Objects.requireNonNull(val); for (E[] vals : values) { if (vals != null && Arrays.binarySearch(vals, val) >= 0) return true; } return false; } BinaryArraySet();  BinaryArraySet(Collection<? extends E> coll); @SuppressWarnings("unchecked")  BinaryArraySet(E... vals); int size(); boolean contains(E val); boolean add(E val); @SuppressWarnings("unchecked") void addUnique(E val); @SuppressWarnings("unchecked") void clear(); Iterator<E> iterator(); }
BinaryArraySet extends AbstractSet<E> { public boolean contains(E val) { Objects.requireNonNull(val); for (E[] vals : values) { if (vals != null && Arrays.binarySearch(vals, val) >= 0) return true; } return false; } BinaryArraySet();  BinaryArraySet(Collection<? extends E> coll); @SuppressWarnings("unchecked")  BinaryArraySet(E... vals); int size(); boolean contains(E val); boolean add(E val); @SuppressWarnings("unchecked") void addUnique(E val); @SuppressWarnings("unchecked") void clear(); Iterator<E> iterator();  }