An Event-Based Deterministic Finite Automaton implementation in Java