title: Why is EventListenerList traversed backwards in fireFooXXX()?
body: <p>I don't understand the rationale of this code, taken from <a href="http://java.sun.com/javase/6/docs/api/javax/swing/event/EventListenerList.html" rel="noreferrer">javax.swing.event.EventListenerList</a> docs:</p>
  
  <pre><code>protected void fireFooXXX() {
      // Guaranteed to return a non-null array
      Object[] listeners = listenerList.getListenerList();
      // Process the listeners last to first, notifying
      // those that are interested in this event
      for (int i = listeners.length-2; i&gt;=0; i-=2) {
          if (listeners[i]==FooListener.class) {
              // Lazily create the event:
              if (fooEvent == null)
                  fooEvent = new FooEvent(this);                 
              ((FooListener)listeners[i+1]).fooXXX(fooEvent);
          }
      }
  }
  </code></pre>
  
  <ol>
  <li>Why is the list traversed backwards?</li>
  <li>Why is only every second listener called?</li>
  </ol>
  
  <p>The event firing is implemented exactly this way in <a href="http://java.sun.com/javase/6/docs/api/javax/swing/tree/DefaultTreeModel.html" rel="noreferrer">javax.swing.tree.DefaultTreeModel</a> among others, so it's obviously me who's just not getting something.</p>