|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jibx.util.StringSizedSet
public class StringSizedSet
Fixed size hash set of String values.
| Field Summary | |
|---|---|
static double |
DEFAULT_FILL_FRACTION
Default fill fraction for sizing of tables. |
protected int |
m_arraySize
Size of array used for keys. |
protected int |
m_hitOffset
Offset added (modulo table size) to slot number on collision. |
protected String[] |
m_keyTable
Array of key table slots. |
| Constructor Summary | |
|---|---|
StringSizedSet(int count)
Constructor with only value count specified. |
|
StringSizedSet(int count,
double fill)
Constructor with full specification. |
|
| Method Summary | |
|---|---|
boolean |
add(String key)
Add a key to the set. |
void |
clear()
Set the table to the empty state. |
boolean |
contains(String key)
Check if an entry is present in the table. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double DEFAULT_FILL_FRACTION
protected final int m_arraySize
protected final String[] m_keyTable
protected final int m_hitOffset
| Constructor Detail |
|---|
public StringSizedSet(int count,
double fill)
count - number of values to assume in sizing of tablefill - fraction fill for table (maximum of 0.7, to
prevent excessive collisions)public StringSizedSet(int count)
count - number of values to assume in initial sizing of table| Method Detail |
|---|
public boolean add(String key)
key - key to be added to table (non-null)
true if added, false if already present
value if key not previously present in tablepublic final boolean contains(String key)
key - key to be found
true if key found in table, false
if notpublic void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||