PrefixedNameSet suitable for storing large number
of entries; basically anything above trivially small sets (4 or less).
Notes about usage:
PrefixedName instances are assumed
interned, so that equality comparison can be done (both for values
stored and keys used)
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final LargePrefixedNameSet. | mBuckets
Secondary (spill) area, in which keys whose hash values collide with primary ones are added. |
| pack-priv static final int | MIN_HASH_AREA
Let's not bother creating tiny hash areas; should seldom be a problem as smaller sets are usually created using different impl. |
| pack-priv final PrefixedName[] | mNames
Primary hash area in which NameKeys are added. |
| pack-priv final boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | appendNames(StringBuilder sb, String sep)
Implements abstract com. Method called by debug/error handling code, to get a list of all names contained. |
| public boolean | Returns: True if the set contains specified name; false if not.Implements abstract com.
|
| public boolean |
| mBuckets | back to summary |
|---|---|
| pack-priv final LargePrefixedNameSet. Secondary (spill) area, in which keys whose hash values collide with primary ones are added. Number of buckets is 1/4 of number of primary entries, | |
| MIN_HASH_AREA | back to summary |
|---|---|
| pack-priv static final int MIN_HASH_AREA Let's not bother creating tiny hash areas; should seldom be a problem as smaller sets are usually created using different impl. class. | |
| mNames | back to summary |
|---|---|
| pack-priv final PrefixedName[] mNames Primary hash area in which NameKeys are added. Sized to be the smallest power of two bigger than number of entries; but at least 4 (it doesn't make sense to create smaller arrays) | |
| mNsAware | back to summary |
|---|---|
| pack-priv final boolean mNsAware | |
| LargePrefixedNameSet | back to summary |
|---|---|
| public LargePrefixedNameSet(boolean nsAware, PrefixedName[] names) | |
| appendNames | back to summary |
|---|---|
| public void appendNames(StringBuilder sb, String sep) Implements abstract com. Method called by debug/error handling code, to get a list of all names contained.
| |
| contains | back to summary |
|---|---|
| public boolean contains(PrefixedName name) Implements abstract com.
| |
| hasMultiple | back to summary |
|---|---|
| public boolean hasMultiple() Implements abstract com.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final PrefixedName | |
| pack-priv final LargePrefixedNameSet. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public PrefixedName | |
| public LargePrefixedNameSet. |
| mName | back to summary |
|---|---|
| pack-priv final PrefixedName mName | |
| mNext | back to summary |
|---|---|
| pack-priv final LargePrefixedNameSet. | |
| Bucket | back to summary |
|---|---|
| public Bucket(PrefixedName name, LargePrefixedNameSet. | |
| getName | back to summary |
|---|---|
| public PrefixedName getName() | |
| getNext | back to summary |
|---|---|
| public LargePrefixedNameSet. | |