fipaos.parser.acl.bitefficient
Class DecoderCodetable
- public class DecoderCodetable
Implementation of decoder codetable for fipa-bitefficient-std messages
- Author:
- Heikki Helin, Mikko Laukkanen
Constructor Summary |
DecoderCodetable(int sz) Initialize the codetable with given size. |
Method Summary |
int | insert(String s) Insert a new String to codetable. |
String | lookup(int code) Returns the String to which the specified code is mapped in this
codetable. |
DecoderCodetable
public DecoderCodetable(int sz)
- Initialize the codetable with given size.
- Parameters:
- sz - Size of the codetable in bits. According to FIPA
specs, this shall be a number between 8 and 16.
insert
public int insert(String s)
- Insert a new String to codetable. If the code table is full,
(size>>3) entries are removed from the end of LRU list.
- Parameters:
- s - String to insert
lookup
public String lookup(int code)
- Returns the String to which the specified code is mapped in this
codetable. The entry in the codetable is moved to the end of
LRU list.
- Parameters:
- code - The code to lookup
- Returns: The String to which the code is mapped in this codetable;
null if the code is not mapped to any String in this
hashtable.
to Class fipaos.parser.acl.bitefficient.DecoderCodetable.Entry- dict Actual codetable