Emulation is the process of accepting characters and converting them to screen operations. The supported operations are embodied in the Ops interface and implemented inside Term.
The most common way to achieve the conversion is through a state machine. Therefore some classes are available for the construction and programming of such state machines.
A transition is characterized by the new state and the action to perform. Transitions are assigned to the state table via State.setAction(char c, State new_state, Actor actor). The first two are obvious. The actor is a singleton subclass of Actor that overrides Actor.action() in order to preform a specific action.
The state machine is programmed by creating new States and assigning transitions for each relevant character.
This scheme lends itself to object oriented inheritance by having subclass Interp's re-use their superclasses' state tables and actions. They can also modify the state tables they've inherited.
Because of this you need not start each new Interp from scratch. For example InterpDumb has a bases state 'st_base' and defines some common actions like ...
act_err to indicate a bad state transition act_regular a regular character act_nop no-op used for intermediate states act_cr carriage return act_lf line feed ...
'st_base' is enhanced further and is joined by other states in InterpANSI.
This decision was made with the cognizance that inner class proliferation is probably not the best thing.
The termcap specification for "ansi" is very simplistic and hardly covers the full gamut of operations. Not only that but vi seems to not work very well with TERM=ansi, particulary when it deals with long lines.
However, there is no name in the termcap database that represents the full 6429 spec, so for those we're stuck with using historical implementation names like "vt220", "xterm" and "dtterm".
I've chosen "dtterm" as it is the newest, I believe matches the ANSI spec best and some of it's extra features, like glyph gutters, are already implemented in Term.