Package jflex

Class CharSetEnumerator


  • public final class CharSetEnumerator
    extends java.lang.Object
    Enumerator for the elements of a CharSet.

    Does not implement java.util.Enumeration, but supports the same protocol.

    Version:
    JFlex 1.7.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int index  
      private long mask  
      private int offset  
      private CharSet set  
    • Constructor Summary

      Constructors 
      Constructor Description
      CharSetEnumerator​(CharSet characters)
      Constructor for CharSetEnumerator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void advance()  
      boolean hasMoreElements()
      Returns whether the iterator has more characters.
      int nextElement()
      Returns the next character.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • index

        private int index
      • offset

        private int offset
      • mask

        private long mask
    • Constructor Detail

      • CharSetEnumerator

        public CharSetEnumerator​(CharSet characters)
        Constructor for CharSetEnumerator.
        Parameters:
        characters - set of characters.
    • Method Detail

      • advance

        private void advance()
      • hasMoreElements

        public boolean hasMoreElements()
        Returns whether the iterator has more characters.
        Returns:
        whether the iterator has more elements.
      • nextElement

        public int nextElement()
        Returns the next character.
        Returns:
        character.