org.eclipse.jdt.internal.compiler.util
Class SimpleSet

java.lang.Object
  extended by org.eclipse.jdt.internal.compiler.util.SimpleSet
All Implemented Interfaces:
Cloneable

public final class SimpleSet
extends Object
implements Cloneable

A simple lookup table is a non-synchronized Hashtable, whose keys and values are Objects. It also uses linear probing to resolve collisions rather than a linked list of hash table entries.


Field Summary
 int elementSize
           
 int threshold
           
 Object[] values
           
 
Constructor Summary
SimpleSet()
           
SimpleSet(int size)
           
 
Method Summary
 Object add(Object object)
           
 Object addIfNotIncluded(Object object)
           
 void asArray(Object[] copy)
           
 void clear()
           
 Object clone()
           
 boolean includes(Object object)
           
 Object remove(Object object)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

values

public Object[] values

elementSize

public int elementSize

threshold

public int threshold
Constructor Detail

SimpleSet

public SimpleSet()

SimpleSet

public SimpleSet(int size)
Method Detail

add

public Object add(Object object)

addIfNotIncluded

public Object addIfNotIncluded(Object object)

asArray

public void asArray(Object[] copy)

clear

public void clear()

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

includes

public boolean includes(Object object)

remove

public Object remove(Object object)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.