title: Populate Tableview with super class fields
body: <p>I have several classes that all inherit from one <code>super</code> class that need to populate several <code>TableView</code>s related to their class.</p>
  <p>The super class is abstract and some of the getters and setters are final but still contains data needed to populate the cells.</p>
  <p>Writing a new Callback class for each and every column is doable, but I'm looking for a way to implements this.</p>
  <h3>sample code</h3>
  <pre class="lang-java prettyprint-override"><code>class SuperClass
  {
    protected String name;
    protected double value;
    public final void setName(String name)
    {
      this.name = name;
    }
    public final void getName()
    {
      return this.name;
    }
    public final void setValue(double value)
    {
      this.value = value;
    }
    public double getValue()
    {
      return this.value;
    }
  }
  </code></pre>
  <pre class="lang-java prettyprint-override"><code>class SubClass1 extends SuperClass
  {
    private int id;
    public void setId(int id)
    {
      this.id = id;
    }
    public int getId()
    {
      return this.id;
    }
  }
  </code></pre>
  <pre class="lang-java prettyprint-override"><code>class SubClass2 extends SuperClass
  {
    private String location;
    public void setLocation(String location)
    {
      this.location = location;
    }
  }
  </code></pre>
  <pre class="lang-java prettyprint-override"><code>class SubClass3 extends SuperClass
  {
    private ObservableMap&lt;SuperClass&gt; map;
    public ObservableMap&lt;SuperClass&gt; map()
    {
      return this.map;
    }
  }
  </code></pre>
  <h3>TableView</h3>
  <pre class="lang-java prettyprint-override"><code>TableColumn&lt;SubClass1, Integer&gt; tc1_id;
  TableColumn&lt;SubClass1, String&gt; tc1_name;
  TableColumn&lt;SubClass1, Double&gt; tc1_value;
  TableColumn&lt;SubClass2, String&gt; tc2_loc;
  TableColumn&lt;SubClass2, String&gt; tc2_name;
  TableColumn&lt;SubClass2, Double&gt; tc2_value;
  TableColumn&lt;SubClass3, String&gt; tc3_name;
  TableColumn&lt;SubClass3, Double&gt; tc3_value;
  </code></pre>
  <p>Here's a reference of what I was going to do...
  <a href="https://stackoverflow.com/questions/12134394/accessing-subclass-properties-in-a-javafx-tableview-observablearraylist">Accessing Subclass properties in a JavaFX TableView ObservableArrayList</a></p>
  <p>But just with the sample code, I'm basically rewriting 2 methods, 3 times each... and there's a bit more than that in the actual program. (Just a smidge more)</p>