In Effective Java, paragraph 17, Josh Bloch states that static members in an interface (and an implementation of this interface) are bad practices known as the Constant Interface Antipattern:
A persistent interface template makes poor use of interfaces. That class uses some constants inside the implementation details. The implementation of the persistent interface calls this implementation detail to leak into the class. This is not a consequence for class users that the class implements a constant interface. In fact, it can even confuse them. Worse, it is a commitment: if in a future release the class is modified so that it no longer needs to use constants, it still needs to implement an interface to ensure binary compatibility. If a non-final class implements a persistent interface, all its subclasses will have namespaces contaminated with constants in the interface.
There are several persistent library interfaces in the java platform, such as java.io.ObjectStreamConstants. These interfaces should be considered anomalies and should not be emulated.
I am pretty sure that I understand the reasons for this and completely agree.
My question is: groups related constants (note: they are NOT suitable for enumeration, consider a mathematical example of the coupled constants pi and e) in the interface compared to a non-intuitive class - a good idea, provided that you only access values through static links and static importers, keep the hidden interface from your API with the default access modifier and never implement the interface ?
? - , , , ?