title: All static members in a class that implements java.util.Observer?
body: <p>I want to make a class <code>R</code> which will observe all instances of class <code>S</code>, that is, I am using the observer-observable pattern. There is no need for having multiple instances of class <code>R</code>, I am sure of that. That is why I made all members of <code>R</code> as static. But, I am not sure if this is the right way to design the class. The <code>public void addObserver(Observer o)</code> method of <code>Observable</code> needs an object and not a static class. Is it okay if I create an instance of <code>R</code> only so that I can pass it to <code>addObserver</code> ? Does it violate the Observable-Observer pattern in any way ?</p>