abstract sclass CharacterClassIterator { // move method (go to next character) abstract void acceptChar(char c); // query methods about next character abstract bool canEndHere(); abstract bool canAcceptChar(char c); // together, the following 2 methods define a inclusive character range. // this character range must contain all the characters that // are accepted by canAcceptChar at the current position. // character range should be interpreted in a way compatible with an agreed-on char comparator. abstract char minCharAccepted(); abstract char maxCharAccepted(); }