Logo Search packages:      
Sourcecode: jlex version File versions  Download package

Enumeration JLex::SparseBitSet::elements (  ) [inline]

Return an Enumeration of Integers which represent set bit indices in this SparseBitSet.

Definition at line 7719 of file Main.java.

References bits, BITS, LG_BITS, offs, and size().

Referenced by JLex::CSet::map(), and toString().

      return new Enumeration() {
          int idx=-1, bit=BITS;
          { advance(); }
          public boolean hasMoreElements() {
            return (idx<size);
          public Object nextElement() {
            int r = bit + (offs[idx] << LG_BITS);
            return new Integer(r);
          private void advance() {
            while (idx<size) {
                while (++bit<BITS)
                  if (0!=(bits[idx] & (1L<<bit)))
                idx++; bit=-1;

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index