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

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

public class SetFactory<E>
extends Object
implements 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(Set<E> set)
           
 void clearNonpermanent()
           
protected  SetFactory.Entry<E> getEntry(int size)
           
protected static int getIndexFor(int hashCode, int tableLength)
           
 Set<E> getSet(List<E> elements)
           
protected  void leaveEntry(SetFactory.Entry<E> entry)
           
 void makePermanent(Set<E> set)
           
protected  void removeEntry(SetFactory.Entry<E> entry)
           
 void removeReference(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(Set<E> set)

removeReference

public void removeReference(Set<E> set)

makePermanent

public void makePermanent(Set<E> set)

getSet

public Set<E> getSet(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)


Copyright © 2012. All Rights Reserved.