title: How to represent complex class in an AbstractTableModel?
body: <p>I have this class:</p>
  
  <pre><code>public abstract class Directory {
  
      protected int id;
      protected File path;
      protected LinkedList&lt;Filter&gt; filters;
      protected LinkedList&lt;File&gt; files;
      protected int wildcard;
      public static int numCols = 3;
  
      /* other things */
  }
  </code></pre>
  
  <p>And I wrote this table model:</p>
  
  <pre><code>public class DirectoryListTableModel extends AbstractTableModel {
  
      private static final long serialVersionUID = 1L;
      private LinkedList&lt;Directory&gt; datalist;
      private String[] columnNames= {"ID", "Directory", "Wildcard", "Filters"};
  
  
      public DirectoryListTableModel(){
      }
  
      public void setDatalist(LinkedList&lt;Directory&gt; temp){
          this.datalist = temp;
      }
  
      public void showElement(){
          fireTableRowsInserted(this.datalist.size()-2,this.datalist.size()-2);
      }
  
      public LinkedList&lt;Directory&gt; getDatalist(){
          return (LinkedList&lt;Directory&gt;) this.datalist.clone();
      }
  
      @Override
      public String getColumnName(int column) {
          return this.columnNames[column];    
      }
  
      @Override
      public int getColumnCount() {
          return Directory.numCols;
      }
  
      @Override
      public int getRowCount() {
          return this.datalist.size();
      }
  
      @Override
      public Object getValueAt(int row, int col) {
  
          Directory temp = this.datalist.get(row);
  
          switch(col){
          case 0:
              return temp.getId();
          case 1:
              return temp.getPath();
          case 2:
              return temp.getWildcard();
          default:
              return null;        
          }
      }
  }
  </code></pre>
  
  <p>As you can see I have a <code>LinkedList&lt;Filter&gt;</code> that I would like too show as a simple string. How can I do that?</p>