public final class LargePrefixedNameSet extends PrefixedNameSet
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 |
LargePrefixedNameSet.Bucket |
| Modifier and Type | Field and Description |
|---|---|
(package private) LargePrefixedNameSet.Bucket[] |
mBuckets
Secondary (spill) area, in which keys whose hash values collide
with primary ones are added.
|
(package private) static 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.
|
(package private) PrefixedName[] |
mNames
Primary hash area in which NameKeys are added.
|
(package private) boolean |
mNsAware |
| Constructor and Description |
|---|
LargePrefixedNameSet(boolean nsAware,
PrefixedName[] names) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendNames(java.lang.StringBuilder sb,
java.lang.String sep)
Method called by debug/error handling code, to get a list of
all names contained.
|
boolean |
contains(PrefixedName name) |
boolean |
hasMultiple() |
toString, toStringstatic final int MIN_HASH_AREA
final boolean mNsAware
final PrefixedName[] mNames
final LargePrefixedNameSet.Bucket[] mBuckets
public LargePrefixedNameSet(boolean nsAware,
PrefixedName[] names)
public boolean hasMultiple()
hasMultiple in class PrefixedNameSetpublic boolean contains(PrefixedName name)
contains in class PrefixedNameSetpublic void appendNames(java.lang.StringBuilder sb,
java.lang.String sep)
appendNames in class PrefixedNameSet