title: Ordering LinkedList <class>
body: <p>I've created a <code>linkedlist&lt;FileInfo&gt;</code> - file info is class which contains following: </p>
  
  <pre><code>class FileInfo {
        public String Name; 
        public Long Length; 
        public Long LastModified;
        public String LockedBy;
  }
  </code></pre>
  
  <p>I need to order this list based on <strong>name</strong> or <em>lastmodified</em>. How can I achieve this? I can't use </p>
  
  <pre><code>Collections.sort(actTreeFileInfoLinkdList)
  </code></pre>
  
  <p>because generic is not a string. How can I sort it? I'm new in java, so maybe there is obvious and simple answer I cant figure out, thanks :) </p>