title: A generic observer pattern in Java
body: <p>The <code>java.util.Observer</code> and <code>java.util.Observable</code> are ugly. They require the sorts of casts that make type-safety fans uncomfortable, and you can't define a class to be an <code>Observer</code> of multiple things without ugly casts. In fact, in "<a href="https://stackoverflow.com/questions/12113283/how-do-i-know-the-generic-object-that-the-observer-class-sends-in-java">How do I know the generic object that the Observer class sends in Java?</a>", <a href="https://stackoverflow.com/a/12113384/590790">an answerer says</a> that only one type of data should be used in each observer / observable.</p>
  
  <p>I'm trying to make a generic version of the observer pattern in Java to get round both these problems. It's not unlike the one in the previously mentioned post, but that question was not obviously resolved (the last comment is an unanswered question from the OP).</p>