title: How to monitor changes on objects contained in an ObservableList JavaFX
body: <p>I really have difficulties to understand how the <a href="https://docs.oracle.com/javase/8/javafx/api/javafx/collections/ObservableList.html" rel="noreferrer"><code>ObservableList</code></a> object is working in JavaFX. I want to monitor if an object in the <code>List</code> has been modified. So far, I only see that I can monitor if the <code>List</code>, as an entity itself, has been modified... but not the objects within the <code>List</code>:</p>
  
  <pre><code>ObservableList&lt;Stuff&gt; myList = FXCollections.&lt;Stuff&gt;observableArrayList();
  myList.add(someStuff);
  
  myList.addListener((ListChangeListener.Change&lt;? extends Stuff&gt; change) -&gt; {
      while(change.next()){
          if(change.wasUpdated()){
              System.out.println("Update detected");
          }
          else if(change.wasPermutated()){
  
          }
          else{
              for (Stuff remitem : change.getRemoved()) {
                  //do things
              }
              for (Stuff additem : change.getAddedSubList()) {
                  //do things
              }
          }
      }
  });
  someStuff.setThing("clobber"); // trigger listener
  </code></pre>
  
  <p>Is there a way to do this? I'm looking for a workflow such that a modification to the object triggers → modification on the list → refresh on a some view.</p>
  
  <p>Thanks</p>