adavid.util
Class Sorter

java.lang.Object
  |
  +--adavid.util.Sorter

public class Sorter
extends java.lang.Object


Constructor Summary
Sorter()
           
 
Method Summary
static java.lang.Class[] bubbleSortD(java.lang.Class[] classes)
           
static void bubbleSortD(java.lang.Object[] objs, int min, int max)
           
static Sortable[] bubbleSortD(Sortable[] objs)
           
static void bubbleSortD(Sortable[] objs, int min, int max)
           
static java.lang.String[] bubbleSortD(java.lang.String[] strings)
           
static java.lang.Class[] bubbleSortI(java.lang.Class[] classes)
           
static void bubbleSortI(java.lang.Object[] objs, int min, int max)
           
static Sortable[] bubbleSortI(Sortable[] objs)
           
static void bubbleSortI(Sortable[] objs, int min, int max)
           
static java.lang.String[] bubbleSortI(java.lang.String[] strings)
           
static java.lang.String getListSeparator()
          manage the list separator
static boolean isBefore(java.lang.String str1, java.lang.String str2, java.lang.String key)
          order law for the match sort if str1
static boolean isQuoted()
          manage the quote flag
static java.lang.String[] matchSort(java.lang.String key, java.lang.String[] strings, boolean newone)
          sort a matching list with a keyword
static java.util.Enumeration print(java.util.Enumeration list, java.io.PrintStream out, boolean subEnum)
          we want to do something for Enumeration, but the problem is that when we use one , then we consume it and we can not use any more, for this reason, we have this special function which produces one copy and prints an Enumeration to the given PrintStream the boolean tells whether to replace sub-enumeration objects by copies or not, and thus to print them or not Enumeration inside Vector or arrays are not printed!
static java.lang.Object[] reverse(java.lang.Object[] objs)
          reverse an array, returns a copy
static void reverse(java.lang.Object[] objs, int min, int max)
          reverse a sub array, no copy is made
static void setListSeparator(java.lang.String sep)
           
static void setQuoted(boolean b)
           
static java.lang.Class[] sortD(java.lang.Class[] classes)
          copy the class array, and sort it in increase order
static void sortD(java.lang.Object[] objs, int min, int max)
          sort a sub array, no copy is made ; decrease order
static Sortable[] sortD(Sortable[] objs)
          copy the sortable array, and sort it in decrease order
static void sortD(Sortable[] objs, int min, int max)
          sort a sub array, no copy is made ; increase order
static java.lang.String[] sortD(java.lang.String[] strings)
          copy the string array, and sort it in decrease order
static java.lang.Class[] sortI(java.lang.Class[] classes)
          copy the class array, and sort it in increase order
static void sortI(java.lang.Object[] objs, int min, int max)
          sort a sub array, no copy is made ; increase order
static Sortable[] sortI(Sortable[] objs)
          copy the Sortable array, and sort it in increase order
static void sortI(Sortable[] objs, int min, int max)
          sort a sub array, no copy is made ; increase order
static java.lang.String[] sortI(java.lang.String[] strings)
          copy the string array, and sort it in increase order
static java.lang.Object[] toObjects(java.lang.Object[] objs)
          convenient method to get arrays of objects
static java.lang.Object[] toObjects(java.util.Vector objs)
          convenient method to get arrays of objects
static java.lang.String toString(java.lang.Object obj)
          any object string representation, treats correctly vectors and arrays, even if they are recursive
static java.lang.String toString(java.lang.Object[] array)
          array string representation
static java.lang.String toString(java.util.Vector vector)
          vector string representation
static java.lang.String[] toStrings(java.lang.Object[] objs)
          convenient method to get arrays of strings
static java.lang.String[] toStrings(java.util.Vector objs)
          convenient method to get arrays of strings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sorter

public Sorter()
Method Detail

getListSeparator

public static java.lang.String getListSeparator()
manage the list separator

setListSeparator

public static void setListSeparator(java.lang.String sep)

isQuoted

public static boolean isQuoted()
manage the quote flag

setQuoted

public static void setQuoted(boolean b)

reverse

public static java.lang.Object[] reverse(java.lang.Object[] objs)
reverse an array, returns a copy

reverse

public static void reverse(java.lang.Object[] objs,
                           int min,
                           int max)
reverse a sub array, no copy is made

matchSort

public static java.lang.String[] matchSort(java.lang.String key,
                                           java.lang.String[] strings,
                                           boolean newone)
sort a matching list with a keyword

isBefore

public static boolean isBefore(java.lang.String str1,
                               java.lang.String str2,
                               java.lang.String key)
order law for the match sort if str1

sortI

public static java.lang.String[] sortI(java.lang.String[] strings)
copy the string array, and sort it in increase order

bubbleSortI

public static java.lang.String[] bubbleSortI(java.lang.String[] strings)

sortI

public static java.lang.Class[] sortI(java.lang.Class[] classes)
copy the class array, and sort it in increase order

bubbleSortI

public static java.lang.Class[] bubbleSortI(java.lang.Class[] classes)

sortI

public static void sortI(java.lang.Object[] objs,
                         int min,
                         int max)
sort a sub array, no copy is made ; increase order

bubbleSortI

public static void bubbleSortI(java.lang.Object[] objs,
                               int min,
                               int max)

sortD

public static java.lang.String[] sortD(java.lang.String[] strings)
copy the string array, and sort it in decrease order

bubbleSortD

public static java.lang.String[] bubbleSortD(java.lang.String[] strings)

sortD

public static java.lang.Class[] sortD(java.lang.Class[] classes)
copy the class array, and sort it in increase order

bubbleSortD

public static java.lang.Class[] bubbleSortD(java.lang.Class[] classes)

sortD

public static void sortD(java.lang.Object[] objs,
                         int min,
                         int max)
sort a sub array, no copy is made ; decrease order

bubbleSortD

public static void bubbleSortD(java.lang.Object[] objs,
                               int min,
                               int max)

sortI

public static Sortable[] sortI(Sortable[] objs)
copy the Sortable array, and sort it in increase order

bubbleSortI

public static Sortable[] bubbleSortI(Sortable[] objs)

sortI

public static void sortI(Sortable[] objs,
                         int min,
                         int max)
sort a sub array, no copy is made ; increase order

bubbleSortI

public static void bubbleSortI(Sortable[] objs,
                               int min,
                               int max)

sortD

public static Sortable[] sortD(Sortable[] objs)
copy the sortable array, and sort it in decrease order

bubbleSortD

public static Sortable[] bubbleSortD(Sortable[] objs)

sortD

public static void sortD(Sortable[] objs,
                         int min,
                         int max)
sort a sub array, no copy is made ; increase order

bubbleSortD

public static void bubbleSortD(Sortable[] objs,
                               int min,
                               int max)

toString

public static java.lang.String toString(java.lang.Object[] array)
array string representation

toString

public static java.lang.String toString(java.util.Vector vector)
vector string representation

toString

public static java.lang.String toString(java.lang.Object obj)
any object string representation, treats correctly vectors and arrays, even if they are recursive

toStrings

public static java.lang.String[] toStrings(java.lang.Object[] objs)
convenient method to get arrays of strings

toStrings

public static java.lang.String[] toStrings(java.util.Vector objs)
convenient method to get arrays of strings

toObjects

public static java.lang.Object[] toObjects(java.util.Vector objs)
convenient method to get arrays of objects

toObjects

public static java.lang.Object[] toObjects(java.lang.Object[] objs)
convenient method to get arrays of objects

print

public static java.util.Enumeration print(java.util.Enumeration list,
                                          java.io.PrintStream out,
                                          boolean subEnum)
we want to do something for Enumeration, but the problem is that when we use one , then we consume it and we can not use any more, for this reason, we have this special function which produces one copy and prints an Enumeration to the given PrintStream the boolean tells whether to replace sub-enumeration objects by copies or not, and thus to print them or not Enumeration inside Vector or arrays are not printed!