Base class for numberformatter