org.apache.xerces.impl.dtd.models
Class CMStateSet
java.lang.Object
org.apache.xerces.impl.dtd.models.CMStateSet
public class CMStateSet
extends java.lang.Object
This class is a very simple bitset class. The DFA content model code needs
to support a bit set, but the java BitSet class is way, way overkill. Our
bitset never needs to be expanded after creation, hash itself, etc...
Since the vast majority of content models will never require more than 64
bits, and since allocation of anything in Java is expensive, this class
provides a hybrid implementation that uses two ints for instances that use
64 bits or fewer. It has a byte array reference member which will only be
used if more than 64 bits are required.
Note that the code that uses this class will never perform operations
on sets of different sizes, so that check does not have to be made here.
$Id: CMStateSet.java 327940 2005-10-24 03:22:51Z mrglavas $
CMStateSet
public CMStateSet(int bitCount)
equals
public boolean equals(Object o)
getBit
public final boolean getBit(int bitToGet)
hashCode
public int hashCode()
intersection
public final void intersection(CMStateSet setToAnd)
isEmpty
public final boolean isEmpty()
setBit
public final void setBit(int bitToSet)
toString
public String toString()
zeroBits
public final void zeroBits()
Copyright B) 1999-2006 The Apache Software Foundation. All Rights Reserved.