Quantcast
Channel: Examples Java Code Geeks » Enum
Viewing all articles
Browse latest Browse all 5

Using an enum as a state machine

$
0
0
In this short example, a parser state machine processes raw XML from a ByteBuffer. Each state has its own process method and if there is not enough data available, the state machine can return to retrieve more data. Each transition between states is well defined and the code for all states is together in one ...

Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images