public class LitTable extends GeneralHashTable<java.lang.Object,java.lang.Object> implements java.io.ObjectOutput
DEFAULT_INITIAL_SIZE, mask, num_bindings, table
Constructor and Description |
---|
LitTable(Compilation comp) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
emit() |
Literal |
findLiteral(java.lang.Object value) |
void |
flush() |
int |
hash(java.lang.Object key)
Calculate hash code of a key.
|
protected boolean |
matches(java.lang.Object key1,
java.lang.Object key2)
Compare two keys for equivalence.
|
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
void |
writeBoolean(boolean v) |
void |
writeByte(int v) |
void |
writeBytes(java.lang.String s) |
void |
writeChar(int v) |
void |
writeChars(java.lang.String v) |
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeInt(int v) |
void |
writeLong(long v) |
void |
writeObject(java.lang.Object obj) |
void |
writeShort(int v) |
void |
writeUTF(java.lang.String v) |
allocEntries, getEntryHashCode, getEntryNext, getNode, makeEntry, setEntryNext
clear, entrySet, get, get, getOrDefault, hashToIndex, matches, put, put, rehash, remove, size
clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, toString, values
public LitTable(Compilation comp)
public int hash(java.lang.Object key)
AbstractHashTable
hash
in class AbstractHashTable<HashNode<java.lang.Object,java.lang.Object>,java.lang.Object,java.lang.Object>
protected boolean matches(java.lang.Object key1, java.lang.Object key2)
AbstractHashTable
AbstractHashTable.hash(Object)
method if you want
a different equivalence relation.matches
in class AbstractHashTable<HashNode<java.lang.Object,java.lang.Object>,java.lang.Object,java.lang.Object>
public void emit() throws java.io.IOException
java.io.IOException
public void flush()
flush
in interface java.io.ObjectOutput
public void close()
close
in interface java.io.ObjectOutput
close
in interface java.lang.AutoCloseable
public void write(int b) throws java.io.IOException
write
in interface java.io.DataOutput
write
in interface java.io.ObjectOutput
java.io.IOException
public void writeBytes(java.lang.String s) throws java.io.IOException
writeBytes
in interface java.io.DataOutput
java.io.IOException
public void write(byte[] b) throws java.io.IOException
write
in interface java.io.DataOutput
write
in interface java.io.ObjectOutput
java.io.IOException
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in interface java.io.DataOutput
write
in interface java.io.ObjectOutput
java.io.IOException
public void writeBoolean(boolean v)
writeBoolean
in interface java.io.DataOutput
public void writeChar(int v)
writeChar
in interface java.io.DataOutput
public void writeByte(int v)
writeByte
in interface java.io.DataOutput
public void writeShort(int v)
writeShort
in interface java.io.DataOutput
public void writeInt(int v)
writeInt
in interface java.io.DataOutput
public void writeLong(long v)
writeLong
in interface java.io.DataOutput
public void writeFloat(float v)
writeFloat
in interface java.io.DataOutput
public void writeDouble(double v)
writeDouble
in interface java.io.DataOutput
public void writeUTF(java.lang.String v)
writeUTF
in interface java.io.DataOutput
public void writeChars(java.lang.String v)
writeChars
in interface java.io.DataOutput
public void writeObject(java.lang.Object obj) throws java.io.IOException
writeObject
in interface java.io.ObjectOutput
java.io.IOException
public Literal findLiteral(java.lang.Object value)