Top Description Inners Fields Constructors Methods
com.ctc.wstx.dtd

public final Class LargePrefixedNameSet

extends PrefixedNameSet
Class Inheritance
Imports
java.util.Iterator, .TreeSet, com.ctc.wstx.util.PrefixedName

Implementation of PrefixedNameSet suitable for storing large number of entries; basically anything above trivially small sets (4 or less).

Notes about usage:

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
pack-priv final LargePrefixedNameSet.Bucket[]
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

Constructor Summary

AccessConstructor and Description
public
LargePrefixedNameSet(boolean nsAware, PrefixedName[] names)

Method Summary

Modifier and TypeMethod and Description
public void
appendNames(StringBuilder sb, String sep)

Implements abstract com.ctc.wstx.dtd.PrefixedNameSet.appendNames.

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.
contains
(PrefixedName name)

Implements abstract com.ctc.wstx.dtd.PrefixedNameSet.contains.

public boolean
Inherited from com.ctc.wstx.dtd.PrefixedNameSet:
toStringtoString

Field Detail

mBucketsback to summary
pack-priv final LargePrefixedNameSet.Bucket[] mBuckets

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_AREAback 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.

mNamesback 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)

mNsAwareback to summary
pack-priv final boolean mNsAware

Constructor Detail

LargePrefixedNameSetback to summary
public LargePrefixedNameSet(boolean nsAware, PrefixedName[] names)

Method Detail

appendNamesback to summary
public void appendNames(StringBuilder sb, String sep)

Implements abstract com.ctc.wstx.dtd.PrefixedNameSet.appendNames.

Method called by debug/error handling code, to get a list of all names contained.

Annotations
@Override
containsback to summary
public boolean contains(PrefixedName name)

Implements abstract com.ctc.wstx.dtd.PrefixedNameSet.contains.

Returns:boolean

True if the set contains specified name; false if not.

Annotations
@Override
hasMultipleback to summary
public boolean hasMultiple()

Implements abstract com.ctc.wstx.dtd.PrefixedNameSet.hasMultiple.

Returns:boolean

Doc from com.ctc.wstx.dtd.PrefixedNameSet.hasMultiple.

True if set contains more than one entry; false if not (empty or has one)

Annotations
@Override
com.ctc.wstx.dtd back to summary

private final Class LargePrefixedNameSet.Bucket

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final PrefixedName
pack-priv final LargePrefixedNameSet.Bucket

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public PrefixedName
public LargePrefixedNameSet.Bucket
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mNameback to summary
pack-priv final PrefixedName mName
mNextback to summary
pack-priv final LargePrefixedNameSet.Bucket mNext

Constructor Detail

Bucketback to summary
public Bucket(PrefixedName name, LargePrefixedNameSet.Bucket next)

Method Detail

getNameback to summary
public PrefixedName getName()
getNextback to summary
public LargePrefixedNameSet.Bucket getNext()