View Javadoc

1   /*
2    * Created on 9 mars 2005
3    *
4    * TODO To change the template for this generated file go to
5    * Window - Preferences - Java - Code Style - Code Templates
6    */
7   package com.loribel.commons.abstraction;
8   
9   import java.io.*;
10  import java.util.*;
11  
12  /***
13   * @author borgr1
14   */
15  public interface GB_FilesSorter
16  {
17      /***
18       * Sorts a list of {@link File} by Date.
19       *
20       * @param l List - the list to sort
21       * @param a_flagAscending boolean - the orientation of the sort
22       */
23      void sortByDate(
24              List l,
25              boolean a_flagAscending);
26  
27      /***
28       * Sorts a list of {@link File} by Size.
29       *
30       * @param l List - the list to sort
31       * @param a_flagAscending boolean - the orientation of the sort
32       */
33      void sortBySize(
34              List l,
35              boolean a_flagAscending);
36  
37      /***
38       * Sorts a list of {@link File} by Name.
39       *
40       * @param l List - the list to sort
41       * @param a_flagAscending boolean - the orientation of the sort
42       * @param a_flagIgnoreCase boolean - true to ignore case in the comparaison
43       */
44      void sortByName(
45              List l,
46              boolean a_flagAscending,
47              boolean a_flagIgnoreCase);
48  
49      /***
50       * Sorts a list of {@link File} by Path.
51       *
52       * @param l List - the list to sort
53       * @param a_flagAscending boolean - the orientation of the sort
54       * @param a_flagIgnoreCase boolean - true to ignore case in the comparaison
55       */
56      void sortByPath(
57              List l,
58              boolean a_flagAscending,
59              boolean a_flagIgnoreCase);
60  
61      /***
62       * Sorts an array of {@link File} by Date.
63       *
64       * @param a_array File[] - the array to sort
65       * @param a_flagAscending boolean - the orientation of the sort
66       */
67      void sortByDate(
68              File[] a_array,
69              boolean a_flagAscending);
70  
71      /***
72       * Sorts an array of {@link File} by Size.
73       *
74       * @param a_array File[] - the array to sort
75       * @param a_flagAscending boolean - the orientation of the sort
76       */
77      void sortBySize(
78              File[] a_array,
79              boolean a_flagAscending);
80  
81      /***
82       * Sorts an array of {@link File} by Name.
83       *
84       * @param a_array File[] - the array to sort
85       * @param a_flagAscending boolean - the orientation of the sort
86       * @param a_flagIgnoreCase boolean - true to ignore case in the comparaison
87       */
88      void sortByName(
89              File[] a_array,
90              boolean a_flagAscending,
91              boolean a_flagIgnoreCase);
92  
93      /***
94       * Sorts an array of {@link File} by Path.
95       *
96       * @param a_array File[] - the array to sort
97       * @param a_flagAscending boolean - the orientation of the sort
98       * @param a_flagIgnoreCase boolean - true to ignore case in the comparaison
99       */
100     void sortByPath(
101             File[] a_array,
102             boolean a_flagAscending,
103             boolean a_flagIgnoreCase);
104 }