@Test public void testSize() { CompactHashSet<String> set = new CompactHashSet<>(TRANSLATOR); set.checkStructure(); assertEquals(0, set.size()); set.add("xy"); assertEquals(1, set.size()); set.add("xyz"); assertEquals(2, set.size()); set.add("xy"); assertEquals(2, set.size()); set.add("a"); set.add("b"); set.add("c"); assertEquals(5, set.size()); set.checkStructure(); }
public int size() { return size; }
CompactHashSet extends AbstractSet<E> { public int size() { return size; } }
CompactHashSet extends AbstractSet<E> { public int size() { return size; } CompactHashSet(CompactSetTranslator<E> trans); }
CompactHashSet extends AbstractSet<E> { public int size() { return size; } CompactHashSet(CompactSetTranslator<E> trans); void clear(); int size(); @SuppressWarnings("unchecked") boolean contains(Object obj); boolean add(E obj); boolean remove(Object obj); Iterator<E> iterator(); }
CompactHashSet extends AbstractSet<E> { public int size() { return size; } CompactHashSet(CompactSetTranslator<E> trans); void clear(); int size(); @SuppressWarnings("unchecked") boolean contains(Object obj); boolean add(E obj); boolean remove(Object obj); Iterator<E> iterator();  }