Constructor and Description |
---|
FunctionTable()
Creates an empty function table.
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String name,
FunctionEntry entry)
Adds a function to this function table.
|
static FunctionTable |
create(java.io.InputStream in)
Creates this object from an input stream, expecting its byte representation.
|
void |
fromBytes(byte[] data)
Reads this object's representation from a byte array.
|
FunctionEntry |
get(java.lang.String name)
Gets a matching function entry for this function name.
|
java.lang.Iterable<java.util.Map.Entry<java.lang.String,FunctionEntry>> |
getEntries() |
void |
readBytes(java.io.InputStream in)
Imports this object from bytes.
|
byte[] |
toBytes()
Gets this object's representation as bytes.
|
void |
writeBytes(java.io.OutputStream out)
Exports this object to bytes.
|
public static FunctionTable create(java.io.InputStream in) throws java.io.IOException
in
- the input stream to read from.java.io.IOException
- if a read error occurs.public void add(java.lang.String name, FunctionEntry entry)
name
- the name of the function.entry
- the function entry to associate.public FunctionEntry get(java.lang.String name)
name
- the function name.public java.lang.Iterable<java.util.Map.Entry<java.lang.String,FunctionEntry>> getEntries()
public void writeBytes(java.io.OutputStream out) throws java.io.IOException
Saveable
writeBytes
in interface Saveable
out
- the output stream to write to.java.io.IOException
- if a write problem occurs.public void readBytes(java.io.InputStream in) throws java.io.IOException
Saveable
public byte[] toBytes() throws java.io.IOException
Saveable
public void fromBytes(byte[] data) throws java.io.IOException
Saveable