com.ctc.wstx.dtd
Class SmallNameKeySet

java.lang.Object
  extended by com.ctc.wstx.dtd.NameKeySet
      extended by com.ctc.wstx.dtd.SmallNameKeySet

public final class SmallNameKeySet
extends NameKeySet

NameKeySet implementation suitable for storing small set of NameKey values (generally 8 or less). Uses linear search, and is thus the most compact presentation for a set

Notes about usage:


Constructor Summary
SmallNameKeySet(boolean nsAware, NameKey[] names)
           
 
Method Summary
 void appendNames(java.lang.StringBuffer sb, java.lang.String sep)
           
 boolean contains(NameKey name)
           
 boolean hasMultiple()
           
 
Methods inherited from class com.ctc.wstx.dtd.NameKeySet
toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SmallNameKeySet

public SmallNameKeySet(boolean nsAware,
                       NameKey[] names)
Method Detail

hasMultiple

public boolean hasMultiple()
Specified by:
hasMultiple in class NameKeySet
Returns:
True if set contains more than one entry; false if not (empty or has one)

contains

public boolean contains(NameKey name)
Specified by:
contains in class NameKeySet
Returns:
True if the set contains specified name; false if not.

appendNames

public void appendNames(java.lang.StringBuffer sb,
                        java.lang.String sep)
Specified by:
appendNames in class NameKeySet