News for hackers. Stuff that matters.
Re:Java Secret: Using an enum to build a State machine by ZoFreX on Tuesday July 12, 2011 @04:30PM (#2756409)
Java enums are very underused and rather awesome. This article misses out members and constructors, which is a pity.
Re:Java Secret: Using an enum to build a State machine by peter_lawrey on Wednesday July 13, 2011 @10:29AM (#2759056)
In a state machine, all the state should be in the context rather than the code blocks. The Java Tutorial on enums talks about fields and constructors.