test_class.declarator: set
test_class.modifier: protected
test_class.original_string: protected Set set;
test_class.type: Set
test_class.var_name: set
test_class.file: ontopia-engine/src/test/java/net/ontopia/utils/CompactHashSetTest.java
test_class.identifier: CompactHashSetTest
test_case.body: @Test
    public void testRemove() {
      set.add("hei");
      Assert.assertTrue("remove didn't know element was in set",
                 set.remove("hei"));
      Assert.assertTrue("removing only element in set does not make it empty",
                 set.isEmpty());
    }
test_case.class_method_signature: CompactHashSetTest.testRemove()
test_case.full_signature: @Test public void testRemove()
test_case.identifier: testRemove
test_case.invocations: add assertTrue remove assertTrue isEmpty
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRemove()
focal_class.declarator: INITIAL_SIZE = 3
focal_class.modifier: protected final static
focal_class.original_string: protected final static int INITIAL_SIZE = 3;
focal_class.type: int
focal_class.var_name: INITIAL_SIZE
focal_class.declarator: LOAD_FACTOR = 0.75
focal_class.modifier: protected final static
focal_class.original_string: protected final static double LOAD_FACTOR = 0.75;
focal_class.type: double
focal_class.var_name: LOAD_FACTOR
focal_class.declarator: nullObject = new Object()
focal_class.modifier: protected final static
focal_class.original_string: protected final static Object nullObject = new Object();
focal_class.type: Object
focal_class.var_name: nullObject
focal_class.declarator: deletedObject = new Object()
focal_class.modifier: protected final static
focal_class.original_string: protected final static Object deletedObject = new Object();
focal_class.type: Object
focal_class.var_name: deletedObject
focal_class.declarator: elements
focal_class.modifier: protected
focal_class.original_string: protected int elements;
focal_class.type: int
focal_class.var_name: elements
focal_class.declarator: freecells
focal_class.modifier: protected
focal_class.original_string: protected int freecells;
focal_class.type: int
focal_class.var_name: freecells
focal_class.declarator: objects
focal_class.modifier: protected
focal_class.original_string: protected E[] objects;
focal_class.type: E[]
focal_class.var_name: objects
focal_class.declarator: modCount
focal_class.modifier: protected
focal_class.original_string: protected int modCount;
focal_class.type: int
focal_class.var_name: modCount
focal_class.file: ontopia-engine/src/main/java/net/ontopia/utils/CompactHashSet.java
focal_class.identifier: CompactHashSet
focal_class.class_method_signature: CompactHashSet.CompactHashSet()
focal_class.full_signature: public  CompactHashSet()
focal_class.identifier: CompactHashSet
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  CompactHashSet()
focal_class.class_method_signature: CompactHashSet.CompactHashSet(int size)
focal_class.full_signature: public  CompactHashSet(int size)
focal_class.identifier: CompactHashSet
focal_class.modifiers: public
focal_class.parameters: (int size)
focal_class.signature:  CompactHashSet(int size)
focal_class.class_method_signature: CompactHashSet.CompactHashSet(Collection<E> c)
focal_class.full_signature: public  CompactHashSet(Collection<E> c)
focal_class.identifier: CompactHashSet
focal_class.modifiers: public
focal_class.parameters: (Collection<E> c)
focal_class.signature:  CompactHashSet(Collection<E> c)
focal_class.class_method_signature: CompactHashSet.iterator()
focal_class.full_signature: @Override public Iterator<E> iterator()
focal_class.identifier: iterator
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Iterator<E>
focal_class.signature: Iterator<E> iterator()
focal_class.class_method_signature: CompactHashSet.size()
focal_class.full_signature: @Override public int size()
focal_class.identifier: size
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int size()
focal_class.class_method_signature: CompactHashSet.isEmpty()
focal_class.full_signature: @Override public boolean isEmpty()
focal_class.identifier: isEmpty
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isEmpty()
focal_class.class_method_signature: CompactHashSet.contains(Object o)
focal_class.full_signature: @Override public boolean contains(Object o)
focal_class.identifier: contains
focal_class.modifiers: @Override public
focal_class.parameters: (Object o)
focal_class.return: boolean
focal_class.signature: boolean contains(Object o)
focal_class.class_method_signature: CompactHashSet.add(Object o)
focal_class.full_signature: @Override public boolean add(Object o)
focal_class.identifier: add
focal_class.modifiers: @Override public
focal_class.parameters: (Object o)
focal_class.return: boolean
focal_class.signature: boolean add(Object o)
focal_class.class_method_signature: CompactHashSet.remove(Object o)
focal_class.full_signature: @Override public boolean remove(Object o)
focal_class.identifier: remove
focal_class.modifiers: @Override public
focal_class.parameters: (Object o)
focal_class.return: boolean
focal_class.signature: boolean remove(Object o)
focal_class.class_method_signature: CompactHashSet.clear()
focal_class.full_signature: @Override public void clear()
focal_class.identifier: clear
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clear()
focal_class.class_method_signature: CompactHashSet.toArray()
focal_class.full_signature: @Override public Object[] toArray()
focal_class.identifier: toArray
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Object[]
focal_class.signature: Object[] toArray()
focal_class.class_method_signature: CompactHashSet.toArray(T[] a)
focal_class.full_signature: @Override public T[] toArray(T[] a)
focal_class.identifier: toArray
focal_class.modifiers: @Override public
focal_class.parameters: (T[] a)
focal_class.return: T[]
focal_class.signature: T[] toArray(T[] a)
focal_class.class_method_signature: CompactHashSet.dump()
focal_class.full_signature: public void dump()
focal_class.identifier: dump
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void dump()
focal_class.class_method_signature: CompactHashSet.rehash()
focal_class.full_signature: protected void rehash()
focal_class.identifier: rehash
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void rehash()
focal_class.class_method_signature: CompactHashSet.rehash(int newCapacity)
focal_class.full_signature: protected void rehash(int newCapacity)
focal_class.identifier: rehash
focal_class.modifiers: protected
focal_class.parameters: (int newCapacity)
focal_class.return: void
focal_class.signature: void rehash(int newCapacity)
focal_class.superclass: extends java.util.AbstractSet<E>
focal_method.body: @Override
    public boolean remove(Object o) {
      if (o == null) o = nullObject;
      
      int hash = o.hashCode();
      int index = (hash & 0x7FFFFFFF) % objects.length;
      int offset = 1;
      
      // search for the object (continue while !null and !this object)
      while(objects[index] != null &&
            !(objects[index].hashCode() == hash &&
              objects[index].equals(o))) {
        index = ((index + offset) & 0x7FFFFFFF) % objects.length;
        offset = offset*2 + 1;
  
        if (offset == -1)
          offset = 2;
      }
  
      // we found the right position, now do the removal
      if (objects[index] != null) {
        // we found the object
  
        // same problem here as with add
        objects[index] = (E) deletedObject;
        modCount++;
        elements--;
        return true;
      } else
        // we did not find the object
        return false;
    }
focal_method.class_method_signature: CompactHashSet.remove(Object o)
focal_method.full_signature: @Override public boolean remove(Object o)
focal_method.identifier: remove
focal_method.invocations: hashCode hashCode equals
focal_method.modifiers: @Override public
focal_method.parameters: (Object o)
focal_method.return: boolean
focal_method.signature: boolean remove(Object o)