Xerces2 Implementation: Class CMStateSet

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

# INTERNAL:

  Usage of this class is not supported. It may be altered or removed at any time.

Version:
  $Id: CMStateSet.java 446752 2006-09-15 21:55:19Z mrglavas $

Constructor Summary
`CMStateSet(int bitCount)`

Method Summary
`boolean` | `equals(java.lang.Object o)`
`boolean` | `getBit(int bitToGet)`
`int` | `hashCode()`
`void` | `intersection(CMStateSet setToAnd)`
`boolean` | `isEmpty()`
`void` | `setBit(int bitToSet)`
`void` | `setTo(CMStateSet srcSet)`
`java.lang.String` | `toString()`
`void` | `union(CMStateSet setToOr)`
`void` | `zeroBits()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### CMStateSet

    public CMStateSet(int bitCount)

Method Detail

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### intersection

    public final void intersection(CMStateSet setToAnd)

### getBit

    public final boolean getBit(int bitToGet)

### isEmpty

    public final boolean isEmpty()

### union

    public final void union(CMStateSet setToOr)

### setBit

    public final void setBit(int bitToSet)

### setTo

    public final void setTo(CMStateSet srcSet)

### zeroBits

    public final void zeroBits()

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2007 The Apache Software Foundation. All Rights Reserved.