title: How to pass different Generics in a Callback Class?
body: <p>For a JFXTreeTableColumn I wrote a custom Cell Factory as Callback. Code works fine but what if I want to pass different Generics?</p>
  
  <p>I already tried to pass the Generics as ? or T, S but I definitely did something wrong</p>
  
  <pre><code>public class CallbackImpl implements Callback&lt;TreeTableColumn&lt;Order, String&gt;, TreeTableCell&lt;Order, String&gt;&gt; {
  
      private final ObservableList&lt;String&gt; paymentData;
  
      public CallbackImpl(ObservableList&lt;String&gt; paymentData) {
          this.paymentData = paymentData;
      }
  
      @Override
      public TreeTableCell&lt;Order, String&gt; call(TreeTableColumn&lt;Order, String&gt; tc) {
          ComboBox&lt;String&gt; combo = new ComboBox&lt;&gt;();
          combo.getItems().addAll(paymentData);
          JFXTreeTableCell&lt;Order, String&gt; cell = new JFXTreeTableCell&lt;Order, String&gt;() {
              @Override
              protected void updateItem(String payment, boolean empty) {
                  super.updateItem(payment, empty);
                  if (empty) {
                      setGraphic(null);
                  } else {
                      combo.setValue(payment);
                      setGraphic(combo);
                  }
              }
          };
          return cell ;
      }
  }
  </code></pre>
  
  <p>I want to to pass a Table with <code>&lt;DifferentClass, String&gt;</code> or even <code>&lt;DifferentClass, Integer&gt;</code> (I know that i have to change the code for Integer to work). </p>
  
  <p>Usage in FXML Controller:
  <code>col.setCellFactory(new CallbackImpl(paymentData));</code></p>