I am trying to perform some rule checking in my application. I am using an inner interface(Check) within a class and am creating anonymous classes of the type interface(Check). Using this approach, the idea is to create an anonymous class for each rule. Please see code below:
But, I am not sure how to call the methods of anonymous classes from another class? Say, there's another class called TypeCheck. How do I call the IS_NUMBER.check method?
I have never used interfaces with anonymous classes before and I am trying this out. Thank YOU!