org.jutil
Class TStringArray

java.lang.Object
  extended by org.jutil.TStringArray

public final class TStringArray
extends java.lang.Object

This is the TStringArray utility code class.


Constructor Summary
TStringArray()
          Ensure that no one can create instances of this Class.
 
Method Summary
static java.lang.String[] addElement(java.lang.String[] array, java.lang.String element)
          addElement: add an element to the end of a String[] usage: org.jutil.TStringArray.addElement(array, "new element");
static java.lang.String[] append(java.lang.String[] array0, java.lang.String[] array1)
          append: appends the contents of array1 to the end of array0 usage: org.jutil.TStringArray.append(array0, array1);
static java.lang.String[] fromEnumeration(java.util.Enumeration enumeration)
          usage: org.jutil.TStringArray.fromEnumeration(Enumeration enumeration);
static java.lang.String[] fromList(java.util.List list)
          usage: org.jutil.TStringArray.fromList( final List list );
static java.lang.String[] fromSet(java.util.Set set)
          usage: org.jutil.TStringArray.fromSet( final Set set );
static int scanFor(java.lang.String[] array, java.lang.String find)
          Scan String[] for occurence of the search String find
Uses the String method indexOf() to comapare the Strings
static int scanForEquals(java.lang.String[] array, java.lang.String find)
          Scan String[] for occurence of the search String find
Uses the String method equals() to comapare the Strings
returns the index position in the String[] that equals the search string, -1 if not found usage: org.jutil.TStringArray.scanForEquals(String find, String[] array);
static int scanForKey(java.lang.String[] array, java.lang.String key)
          scanForArgKey: scan String[] for occurence of key string using the default delim char '=' as the divider, for use in an array containg key/value pairs such as "myKey=MyValue" returns the index position in the String[] that contains the key string usage: org.jutil.TStringArray.scanForKey(String key);
static int scanForKey(java.lang.String[] array, java.lang.String key, char charDelim)
          scanForArgKey: scan String[] for occurence of key string using the delim char as the divider, for use in an array containg key/value pairs such as "myKey=MyValue" returns the index position in the String[] that contains the key string usage: org.jutil.TStringArray.scanForKey( String key, String[] array );
static void sort(java.lang.String[] array)
          Sort the String[] array
usage: org.jutil.TStringArray.sort(array);
static java.util.Map toMap(java.lang.String[] array)
          usage: org.jutil.TStringArray.toMap(array, '=');
static java.util.Map toMap(java.lang.String[] array, char delim)
          usage: org.jutil.TStringArray.toMap(array, '=');
static java.util.Properties toProperties(java.lang.String[] array)
          Convert a String[] containing key/value strings "key=value" to a Properties usage: org.jutil.TStringArray.toProperties(array);
static java.lang.String toString(java.lang.String[] array)
          Concat a String[] to a String dividing with the default delim char ','
usage: org.jutil.TStringArray.toString(array);
static java.lang.String toString(java.lang.String[] array, char delim)
          Concat a String[] to a String dividing with the delim char
usage: org.jutil.TStringArray.toString(array, ',');
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TStringArray

public TStringArray()
Ensure that no one can create instances of this Class.

Method Detail

toProperties

public static final java.util.Properties toProperties(java.lang.String[] array)
Convert a String[] containing key/value strings "key=value" to a Properties usage: org.jutil.TStringArray.toProperties(array);


toString

public static final java.lang.String toString(java.lang.String[] array)
Concat a String[] to a String dividing with the default delim char ','
usage: org.jutil.TStringArray.toString(array);


toString

public static final java.lang.String toString(java.lang.String[] array,
                                              char delim)
Concat a String[] to a String dividing with the delim char
usage: org.jutil.TStringArray.toString(array, ',');


sort

public static final void sort(java.lang.String[] array)
Sort the String[] array
usage: org.jutil.TStringArray.sort(array);


scanFor

public static final int scanFor(java.lang.String[] array,
                                java.lang.String find)
Scan String[] for occurence of the search String find
Uses the String method indexOf() to comapare the Strings


scanForEquals

public static final int scanForEquals(java.lang.String[] array,
                                      java.lang.String find)
Scan String[] for occurence of the search String find
Uses the String method equals() to comapare the Strings
returns the index position in the String[] that equals the search string, -1 if not found usage: org.jutil.TStringArray.scanForEquals(String find, String[] array);


scanForKey

public static final int scanForKey(java.lang.String[] array,
                                   java.lang.String key)
scanForArgKey: scan String[] for occurence of key string using the default delim char '=' as the divider, for use in an array containg key/value pairs such as "myKey=MyValue" returns the index position in the String[] that contains the key string usage: org.jutil.TStringArray.scanForKey(String key);


scanForKey

public static final int scanForKey(java.lang.String[] array,
                                   java.lang.String key,
                                   char charDelim)
scanForArgKey: scan String[] for occurence of key string using the delim char as the divider, for use in an array containg key/value pairs such as "myKey=MyValue" returns the index position in the String[] that contains the key string usage: org.jutil.TStringArray.scanForKey( String key, String[] array );


addElement

public static final java.lang.String[] addElement(java.lang.String[] array,
                                                  java.lang.String element)
addElement: add an element to the end of a String[] usage: org.jutil.TStringArray.addElement(array, "new element");


append

public static final java.lang.String[] append(java.lang.String[] array0,
                                              java.lang.String[] array1)
append: appends the contents of array1 to the end of array0 usage: org.jutil.TStringArray.append(array0, array1);


fromEnumeration

public static final java.lang.String[] fromEnumeration(java.util.Enumeration enumeration)
usage: org.jutil.TStringArray.fromEnumeration(Enumeration enumeration);


fromList

public static final java.lang.String[] fromList(java.util.List list)
usage: org.jutil.TStringArray.fromList( final List list );


fromSet

public static final java.lang.String[] fromSet(java.util.Set set)
usage: org.jutil.TStringArray.fromSet( final Set set );


toMap

public static final java.util.Map toMap(java.lang.String[] array)
usage: org.jutil.TStringArray.toMap(array, '=');


toMap

public static final java.util.Map toMap(java.lang.String[] array,
                                        char delim)
usage: org.jutil.TStringArray.toMap(array, '=');