I have an interface:
public interface Condition {
boolean check();
JSONObject toJSON();
Condition fromJSON();
}
And i need to ensure that, every implementation of this interface overrides method fromJSON and i need that method to be static. Is there any way how to do that??
I tried making that method static in the interface, but it does not work as i want.
I also dont want to make it abstract class as every implementation has different functionality of the method.
Is there any other method ho to ensure that every implementation has static method fromJSON ??