org.semanticweb.HermiT.blocking
Class SetFactory<E>

java.lang.Object
  extended by org.semanticweb.HermiT.blocking.SetFactory<E>
All Implemented Interfaces:
java.io.Serializable

public class SetFactory<E>
extends java.lang.Object
implements java.io.Serializable

This class is used to create sets of various types. It ensures that each distinct set exists only once, thus allowing sets to be compared with ==. Instances of this class are used to create various labels in blocking.

See Also:
Serialized Form

Nested Class Summary
protected static class SetFactory.Entry<T>
           
 
Field Summary
protected  SetFactory.Entry[] m_entries
           
protected  int m_resizeThreshold
           
protected  int m_size
           
protected  SetFactory.Entry[] m_unusedEntries
           
 
Constructor Summary
SetFactory()
           
 
Method Summary
 void addReference(java.util.Set<E> set)
           
 void clearNonpermanent()
           
protected  SetFactory.Entry<E> getEntry(int size)
           
protected static int getIndexFor(int hashCode, int tableLength)
           
 java.util.Set<E> getSet(java.util.List<E> elements)
           
protected  void leaveEntry(SetFactory.Entry<E> entry)
           
 void makePermanent(java.util.Set<E> set)
           
protected  void removeEntry(SetFactory.Entry<E> entry)
           
 void removeReference(java.util.Set<E> set)
           
protected  void resize()
           
 int sizeInMemory()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_unusedEntries

protected SetFactory.Entry[] m_unusedEntries

m_entries

protected SetFactory.Entry[] m_entries

m_size

protected int m_size

m_resizeThreshold

protected int m_resizeThreshold
Constructor Detail

SetFactory

public SetFactory()
Method Detail

clearNonpermanent

public void clearNonpermanent()

sizeInMemory

public int sizeInMemory()

addReference

public void addReference(java.util.Set<E> set)

removeReference

public void removeReference(java.util.Set<E> set)

makePermanent

public void makePermanent(java.util.Set<E> set)

getSet

public java.util.Set<E> getSet(java.util.List<E> elements)

resize

protected void resize()

removeEntry

protected void removeEntry(SetFactory.Entry<E> entry)

getEntry

protected SetFactory.Entry<E> getEntry(int size)

leaveEntry

protected void leaveEntry(SetFactory.Entry<E> entry)

getIndexFor

protected static int getIndexFor(int hashCode,
                                 int tableLength)