Package org.htmlunit.cyberneko
Class HTMLNamedEntitiesParser.RootState
- java.lang.Object
-
- org.htmlunit.cyberneko.HTMLNamedEntitiesParser.State
-
- org.htmlunit.cyberneko.HTMLNamedEntitiesParser.RootState
-
- Enclosing class:
- HTMLNamedEntitiesParser
protected static class HTMLNamedEntitiesParser.RootState extends HTMLNamedEntitiesParser.State
This is our initial state and has a special optimization applied. We don't iterate, we jump by character code to the position.
-
-
Field Summary
Fields Modifier and Type Field Description private int
offset_
-
Fields inherited from class org.htmlunit.cyberneko.HTMLNamedEntitiesParser.State
characters_, endNode_, endsWithSemicolon_, entityOrFragment_, isMatch_, length_, nextState_, resolvedValue_
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RootState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HTMLNamedEntitiesParser.State
lookup(int character)
Lookup the state by iterating over the chars at this state, should not be that many and due to the small size of the array, should be cache onlyprotected void
optimize()
-
Methods inherited from class org.htmlunit.cyberneko.HTMLNamedEntitiesParser.State
add, updateNonSemicolonEntity
-
-
-
-
Method Detail
-
lookup
public HTMLNamedEntitiesParser.State lookup(int character)
Description copied from class:HTMLNamedEntitiesParser.State
Lookup the state by iterating over the chars at this state, should not be that many and due to the small size of the array, should be cache only- Overrides:
lookup
in classHTMLNamedEntitiesParser.State
- Parameters:
character
- the char to look up- Returns:
- the next state or the same in case the character was not found
-
optimize
protected void optimize()
-
-