How to implement sort class
<pre><code>private class FileType extends Object {
    private String Name;
    private String Type;

    public FileType() {
        Name = null;
        Type = null;
    }

    public void setFileType(String n, String t) {
        Name = n;
        Type = t;
    }   

    public int compareTo(FileType ft) {
        String decodedFileName = null;
        String decodedInputName = null;
        try {
            decodedFileName = URLDecoder.decode(this.Name, "UTF-8");
            decodedInputName = URLDecoder.decode(ft.Name, "UTF-8");
        }
        catch(UnsupportedEncodingException e) {
        }
        return decodedFileName.compareToIgnoreCase(decodedInputName);
    }
}
</code></pre>

<p>Above code is my define class for file list.<br>
I had implement compare file name.<br>
The type may <code>Folder</code> or <code>File</code>.<br>
But I want to sort file first priority is Type, and second priority is Name.<br>
How can arrive it?  </p>
