uka.util
Class IntObjectHashBijection
java.lang.Object
uka.util.IDConstants
uka.util.IntObjectHashBijection
- All Implemented Interfaces:
- Printable, java.io.Serializable
- Direct Known Subclasses:
- IntWeakHashBijection
- public class IntObjectHashBijection
- extends IDConstants
- implements java.io.Serializable, Printable
- Author:
- Bernhard Haumacher
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
INVALID_VALUE1
private int INVALID_VALUE1
INVALID_VALUE2
private java.lang.Object INVALID_VALUE2
hashFunction1
private IntHashFunction hashFunction1
hashFunction2
private HashFunction hashFunction2
all
private IntObjectHashBijection.Entry all
table1
private IntObjectHashBijection.Entry[] table1
table2
private IntObjectHashBijection.Entry[] table2
size
private int size
expandAt
private int expandAt
IntObjectHashBijection
public IntObjectHashBijection()
IntObjectHashBijection
public IntObjectHashBijection(int INVALID_VALUE1,
java.lang.Object INVALID_VALUE2)
init
private void init(int INVALID_VALUE1,
java.lang.Object INVALID_VALUE2)
getSize
public int getSize()
getIndex
private int getIndex(int hash)
getHash1
protected int getHash1(int value1)
getHash2
protected int getHash2(java.lang.Object value2)
iterator
public IntObjectHashBijection.Iterator iterator()
ensureCapacity
private void ensureCapacity(int size)
setHashSize
private void setHashSize(int size)
getEntry1
private IntObjectHashBijection.Entry getEntry1(int hash,
int value1)
getValue2
public java.lang.Object getValue2(int value1)
getEntry2
private IntObjectHashBijection.Entry getEntry2(int hash,
java.lang.Object value2)
getValue1
public int getValue1(java.lang.Object value2)
insert
private void insert(IntObjectHashBijection.Entry newe)
remove1
public void remove1(int value1)
remove2
public void remove2(java.lang.Object value2)
remove1
private void remove1(int hash1,
int value1)
remove2
private void remove2(int hash2,
java.lang.Object value2)
remove
protected void remove(IntObjectHashBijection.Entry e)
createEntry
protected IntObjectHashBijection.Entry createEntry(int value1,
java.lang.Object value2)
- Factory method for creating new entries. May be overridden in
subclasses.
put
public void put(int value1,
java.lang.Object value2)
clear
public void clear()
writeObject
private void writeObject(java.io.ObjectOutputStream out)
throws java.io.IOException
- For serializing an instance of this class, it has to be
externalized, because weak references are not
serializable. Only objects that are currently alive can be
marshaled and inserted to the unmarshaled copy. Therefore, the
validity of identifiers may differ from the copy that is
marshaled and the copy that is unmarshaled.
- Throws:
java.io.IOException
readObject
private void readObject(java.io.ObjectInputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
toString
public java.lang.String toString()
dump
public void dump()
appendTo
public void appendTo(ToString s)
- Description copied from interface:
Printable
- This method should
append the contents of each instance variable of the current
object to the given ToString object. The appended data
should be labeled with the name of the corresponding instance
variable.
- Specified by:
appendTo in interface Printable
- See Also:
ToString,
ToString.append(String, Object),
ToString.append(String, boolean),
ToString.append(String, byte),
ToString.append(String, int)