issue2395-improvements - enum with abstract methods to avoid switch; usi...

issue 2395 - This pull request includes improvements in the source code