|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ccl.util.Util
A general purpose class with a variety of support and convenience methods.
There are different groups of methods in this class:
debug and assertion methods
print methods - convenience methods for System.out.print etc. that additionally make sure output is gets flushed immediately.
basic converter methods
string methods
string/vector converter methods
vector methods
sorting and inserting methods
system methods
date methods
random generator methods
miscellaneous methods
Some basic but none the less the most used methods by myself are:
- println
- printlnErr
- isEmpty
- stringToLines
- atoi
- itoa
- systemAndWait
- sleep
- getDate
But there are also some gems which are less regularly used but still quite
usefull:
- getStackTrace(java.lang.Throwable)
- getDump(java.lang.Object)
- formatMemoryInfo()
- denullify(java.lang.String)
- formatBlock(java.lang.String, int)
Potential future but not yet existing classes to move some code into
are:
StringUtil, VectorUtil, SystemUtil, and maybe Debug.
Field Summary | |
static java.lang.Object |
O_CONSTANT
This could be also private and instead you would have to use getConstantObject(), but yet you have the choice. |
Method Summary | |
static java.lang.String |
appendSpaces(java.lang.String pString_,
int length_)
Append spaces to the end of a string. |
static void |
assert(boolean bAssert_)
Deprecated. use 'assert' keyword from jdk 1.4 or above. |
static void |
assert(java.lang.Object pObject_)
Deprecated. use 'assert' keyword from jdk 1.4 or above. |
static boolean |
atob(java.lang.String pString_)
Converts a String to a boolean. |
static double |
atod(java.lang.String pString_)
String to double converter. |
static float |
atof(java.lang.String pString_)
String to float converter. |
static int |
atoi(java.lang.String pString_)
String to int converter. |
static long |
atol(java.lang.String pString_)
String to long converter. |
static int |
btoi(byte b_)
Deprecated. Use byteToInt(byte) instead. |
static int |
bytesToInt(byte[] abInt)
Converts a byte array into an int. |
static char |
byteToChar(byte b_)
Converts a byte to a char. |
static int |
byteToInt(byte b_)
Converts a byte to an int. |
static java.lang.String |
byteToString(byte b_)
Converts a byte to a String. |
static java.lang.String |
centerLine(java.lang.String pString,
int lineLength)
Returns a string withe the provided content in the center and no line feed. |
static int |
compare(java.lang.String firstString,
java.lang.String anotherString)
Deprecated. Use String.compare instead. |
static java.lang.String |
concat(java.lang.String pString_,
char cWidth_)
This function concatenates a String with a char. |
static java.lang.String |
concat(java.util.Vector pVector_)
This function concatenates different Strings into one String. |
static java.lang.String |
concat(java.util.Vector pVector_,
char cWith_)
This function concatenates different Strings into one String. |
static java.lang.String |
concat(java.util.Vector pVector_,
java.lang.String sWith_)
This function concatenates different Strings into one String. |
static java.util.Vector |
concat(java.util.Vector vFirst_,
java.util.Vector vSecond_)
Create a new vector which consists of both given vectors. |
static int |
contains(java.lang.String sToLookIn_,
java.lang.String sThis_)
Deprecated. Well, String.indexOf(String) should be just fine!? |
static boolean |
contains(java.util.Vector pVector_,
java.lang.String sFind_)
Test if a vector contains a given string. |
static boolean |
contains(java.util.Vector pVector_,
ccl.util.Testable pFilter_)
Test if a vector contains an element which succeeds a given test filter. |
static int |
count(java.lang.String pString_,
char c_)
How many chars c_ contains the String pString_. |
static java.lang.String |
cToS(char c_)
A character to String converter. |
static void |
debug(int i)
If the debug mode was set with the setDebug function to true, this debug statements is equal to a printlnErr statement, otherwise it will be ignored. |
static void |
debug(java.lang.Object oMessage_)
If the debug mode was set with the setDebug function to true, this debug statements is equal to a printlnErr statement, otherwise it will be ignored. |
static void |
debug(java.lang.Object oOriginator_,
java.lang.Object oMessage_)
If the debug mode was set with the setDebug function to true, this debug statements is equal to a printlnErr statement, otherwise it will be ignored. |
static java.lang.String |
denullify(java.lang.String pString_)
Returns "" if the input string is null, otherwise returns the same string back. |
static java.lang.String |
dtoa(double d_)
Converts a double to a String. |
static boolean |
endsWith(java.lang.String sThis_,
char cOther_)
Tests if this string ends with the specified character. |
static boolean |
endsWith(java.lang.String pString_,
java.lang.String sEnd_)
Tests if this string ends with the second string. |
static java.util.Vector |
enumerationToVector(java.util.Enumeration pEnumeration_)
Convert an enumeration to a vector. |
static boolean |
equals(java.util.Vector vFirst_,
java.util.Vector vSecond_)
Do the elements of two vectors at the same position equal each other? |
static boolean |
equalsCaseless(java.lang.String sA_,
java.lang.String sB_)
Compares two strings. |
static java.util.Vector |
filter(java.util.Vector pVector_,
java.lang.Object oBadElement_)
All object in this vector which equal the bad element are not copied over to the resulting vector. |
static java.util.Vector |
filter(java.util.Vector pVector_,
ccl.util.Testable pFilter_)
Create a new vector and copy all elements of the pVector_ paramter over which are accepted by the test filter. |
static java.util.Vector |
filter(java.util.Vector pVector_,
java.util.Vector vBadElements_)
All object in this vector which equal an object in the bad vector are not copied over to the resulting vector. |
static java.lang.String |
firstCharToLowerCase(java.lang.String pString_)
Returns the given string with the first char converted to lower case. |
static java.lang.String |
firstCharToUpperCase(java.lang.String pString_)
Returns the given string with the first char converted to upper case. |
static java.lang.String |
formatBlock(java.lang.String pString)
This method takes a string and reformats it so that each line has no more than the given length and the text will be aligned as a block. |
static java.lang.String |
formatBlock(java.lang.String pString,
int lineLength)
This method takes a string and reformats it so that each line has no more than the given length and the text will be aligned as a block. |
static java.lang.String |
formatBlock(java.lang.String pString,
int lineLength,
int indentation)
This method takes a string and reformats it so that each line has no more than the given length and the text will be aligned as a block. |
static java.lang.String |
formatCenter(java.lang.String pString,
int lineLength)
This method takes a string and reformats it so that each line has no more than the given length and the text will be centered in the middle. |
static java.lang.String |
formatLeft(java.lang.String pString)
This method takes a string and reformats it so that each line has no more than the given length and the text will be aligned to the left side. |
static java.lang.String |
formatLeft(java.lang.String pString,
int lineLength)
This method takes a string and reformats it so that each line has no more than the given length and the text will be aligned to the left side. |
static java.lang.String |
formatLeft(java.lang.String pString,
int lineLength,
int indentation)
This method takes a string and reformats it so that each line has no more than the given length and the text will be aligned to the left side. |
static java.lang.String |
formatMemoryInfo()
Returns a message which has nicely formatted information about the current memory usage. |
static void |
gc()
System.gc() does not always garanty immediate execution. |
static java.util.Calendar |
getCalendar()
|
static java.util.Calendar |
getCalendar(java.lang.String sTimeZoneID_)
This is a replacement of the SimpleTimeZone.getTimeZone(String) function that additionally creates a GregorianCalendar of the given timezone. |
static java.lang.Object |
getConstantObject()
Sometimes you need a dummy object just to have any value for a hashtable or so and it doesn't matter at all if we always use the same object, so here is one you can use without wasting extra memory. |
static java.lang.String |
getDate()
Returns the current date as an ISO date string. |
static java.lang.String |
getDate(java.util.Calendar pCalendar_)
Returns the given date as an ISO date string. |
static java.util.Calendar |
getDate(java.lang.String sDate_)
For example: 1999-11-26. |
static java.lang.String |
getDateTimeAndMillis()
Returns a string consiting of the iso date, time, and milli seconds, all concatenated without any space, colon, or dash. |
static int |
getDiffPosition(java.lang.String s1,
java.lang.String s2)
Finds out the first position (started with 0) at which two strings start to differ. |
static java.lang.String |
getDump(java.lang.Object object_)
This method returns a string with dump out of all its attribute fields, private as well as public fields. |
static java.lang.String |
getFirstDayOfMonth(java.lang.String sDate_)
Provide an iso date string and get back an iso date string which has the day set to one. |
static java.lang.String |
getHeuteSortable()
Deprecated. |
static java.lang.String |
getLastDayOfMonth(java.lang.String sDate_)
Provide an iso date string and get back an iso date string with the last day in the same month. |
static java.lang.String |
getLocalHostName()
Get the name of the localhost. |
static java.lang.String |
getMonth(java.lang.String sDate)
Returns the English name of the month of the given iso-date. |
static java.lang.String |
getNextDay(java.lang.String sDate_)
Provides the iso date of the next day after the given date. |
static int |
getNumberOfDays(java.lang.String sFrom_,
java.lang.String sTo_)
Return the number of days between to dates. |
static java.lang.String |
getObjectName(java.lang.Object pObject_)
pObject_.getClass().getName() returns the name including its package. |
static int |
getOccurances(java.lang.String source,
int zeichen)
Count how often a string contains a special char. |
static int |
getOccurances(java.lang.String source_,
java.lang.String lookFor_)
Count how often a string is contained in another string. |
static java.lang.String |
getSpaces(int length_)
Returns a String which consists only of spaces and has the lenght 'length_' or which is empty if length_ equals zero. |
static java.lang.String |
getStackTrace(java.lang.Throwable pThrowable_)
Returns a string which contains the stack trace. |
static java.lang.String |
getStandardDate(java.util.Date pDate_)
|
static java.lang.String |
getTime(java.util.Calendar pCalendar_)
|
static java.lang.String |
getTime(java.util.Date pDate_)
Returns the time as a string of the given date object. |
static java.lang.String |
getTimeWithMillis()
Returns the current time with milli seconds. |
static java.lang.String |
getTimeWithMillis(java.util.Calendar calendar_)
Returns the current time with milli seconds. |
static java.lang.String |
getTodaySortable()
Deprecated. use getDate() instead. |
static long |
getUsedMemory()
This method returns the memory currently in use. |
static java.lang.String |
getUsedMemoryPercentage()
This method returns the percentage of used memory. |
static java.lang.String |
getUsedMemoryPercentage(long used,
long total)
This method returns the percentage of used memory. |
static int |
indexOfNot(java.lang.String pString_,
char cNot_)
|
static int |
indexOfNot(java.lang.String pString_,
char cNot_,
int startIndex_)
|
static int |
insert(java.util.Vector pVector_,
int lowestOffset_,
int highestOffset_,
java.lang.Object pObject_,
ccl.util.Comparable pComparable_)
Inert a new object into a vector and keep the vector sorted. |
static int |
insert(java.util.Vector pVector_,
java.lang.Object pObject_,
ccl.util.Comparable pComparable_)
Inert a new object into a vector and keep the vector sorted. |
static java.util.Vector |
insert(java.util.Vector vDestination_,
java.util.Vector vOther_,
int destination)
Insert at a special offset all elements of the second vector into the first vector. |
static byte[] |
intToBytes(int i_)
Converts an int into a byte array. |
static java.util.Vector |
invert(java.util.Vector vSource_)
Create a new vector and invert the order of the elements. |
static boolean |
isAlpha(char c_)
Checks that a character is of type alpha. |
static boolean |
isDateValid(java.lang.String sDate_)
Input format of the date is either CCYY-MM-DD or CCYYMMDD. |
static boolean |
isDebug()
Returns the current debug mode. |
static boolean |
isDigit(char c_)
Return true for digit characters. |
static boolean |
isEmpty(java.lang.String sTest_)
Tests, if a given String equals null or "". |
static boolean |
isEmpty(java.util.Vector vTest_)
Tests, if a given Vector is null or has size 0. |
static boolean |
isOSLinux()
Returns true if the current operating system is Linux. |
static boolean |
isOSSolaris()
Returns true if the current operating system is Sun Microsystem's Solaris (or SunOS). |
static boolean |
isOSUnix()
Returns true if the current operating system is either Linux or Solaris. |
static boolean |
isOSWindows()
Returns true if the current operating system is Microsoft Windows. |
static boolean |
isSpaceLine(java.lang.String sLine_)
Tests if a string contains only space, tab, and linefeed characters. |
static boolean |
isSwingPackage(java.lang.String sFullPackageName_)
Returns true if sFullPackageName_ is a swing package, either old com.sun.java.swing or new javax.swing convention. |
static boolean |
isTrue(java.lang.Boolean pBoolean_)
Boolean to boolean converter. |
static boolean |
isVocal(char c_)
Return true if the given character can be found in the string "aeoui???". |
static java.lang.String |
itoa(int i_)
Converts an int to a String. |
static java.lang.String |
ltoa(long l_)
Converts an long to a String. |
static double |
ltod(long l_)
A long to double converter. |
static java.lang.String |
ltrim(java.lang.String s)
Removes space, carriage, linefeed, and tab chars at the right side of a string. |
static java.util.Vector |
map(java.util.Vector pVector_,
ccl.util.Transformable pTransformable_)
Convert each element of the vector by a transformation object. |
static int |
max(int a_,
int b_)
Deprecated. |
static long |
max(long a_,
long b_)
Deprecated. |
static int |
min(int a_,
int b_)
Deprecated. |
static java.lang.String |
multiplyChar(char c,
int anzahl)
Create a string by concatenating one char several times. |
static java.lang.String |
multiplyChar(java.lang.String sFill,
int anzahl)
Create a string by concatenating one string several times. |
static java.util.Vector |
objectsToVector(java.lang.Object[] apObjects)
Convert an array of objects to a vector. |
static java.lang.String |
paddWith(int number_,
int stellen_,
char cPadd_)
Fill a string with a given char for alignment purposes. |
static java.lang.String |
paddWith(java.lang.String pString_,
int stellen_,
char cPadd_)
Fill a string with a given char for alignment purposes. |
static java.lang.String |
paddWithSpace(double dNumber_,
int stellen)
Fill a string with space chars for alignment purposes. |
static java.lang.String |
paddWithSpace(int number,
int stellen)
Fill a string with space chars for alignment purposes. |
static java.lang.String |
paddWithSpace(long number,
int stellen)
Fill a string with space chars for alignment purposes. |
static java.lang.String |
paddWithSpace(java.lang.String pString_,
int stellen)
Fill a string with space chars for alignment purposes. |
static java.lang.String |
paddWithZero(int number,
int stellen)
Fill a string with zero chars for alignment purposes. |
static java.lang.String |
paddWithZero(long number,
int stellen)
Fill a string with zero chars for alignment purposes. |
static java.lang.String |
paddWithZero(java.lang.String sNumber_,
int stellen_)
Fill a string with zero chars for alignment purposes. |
static void |
panicIf(boolean bPanic_)
panicIf <=> not assert. |
static void |
panicIf(boolean bPanic_,
java.lang.String sMessage_)
panicIf <=> not assert. |
static void |
print(char c_)
Prints out a char to System.out. |
static void |
print(java.lang.Object pObject_)
Prints out the object to System.out. |
static void |
print(java.lang.String pString_)
Prints out a String to System.out. |
static void |
printErr(char c_)
Prints out a char to System.err. |
static void |
printErr(java.lang.Object pObject_)
Prints out the object to System.err. |
static void |
printErr(java.lang.String pString_)
Prints out a String to System.err. |
static void |
println()
Same as print('\n'). |
static void |
println(java.lang.Exception e)
Prints out the exception, its stack trace, and the current thread to System.out! |
static void |
println(java.lang.Object pObject_)
Prints out the object to System.out together with a new line. |
static void |
println(java.lang.String pString_)
Prints out a String to System.out together with a new line. |
static void |
printlnErr()
The same as println, except output goes to std err. |
static void |
printlnErr(java.lang.Exception exception_)
Prints out an error report for an exception to System.err. |
static void |
printlnErr(java.lang.Object pObject_)
Prints out the object to System.err. |
static void |
printlnErr(java.lang.Object oClass_,
java.lang.Object oMessage_)
Prints out a String with a prefix of the oClass_ class name to System.err. |
static void |
printlnErr(java.lang.String sMessage_)
The same as println, except output goes to std err. |
static void |
quickSort(java.lang.Object[] s,
int lo,
int hi,
ccl.util.Comparable cmp)
An implementation of Quicksort using medians of 3 for partitions. |
static void |
quickSort(java.util.Vector v,
int lo,
int hi,
ccl.util.Comparable cmp)
An implementation of Quicksort using medians of 3 for partitions. |
static java.lang.String |
removeMultipleSpaces(java.lang.String pString_)
What the method name says. |
static java.lang.String |
replace(java.lang.String pString_,
char cOld_,
char cNew_)
Replaces all occurences of cOld_ in pString with cNew_. |
static java.lang.String |
replace(java.lang.String pString_,
char cOld_,
char cNew_,
int startIndex_)
Replaces all occurences of cOld_ in pString with cNew_. |
static java.lang.String |
replace(java.lang.String pString_,
java.lang.String sOld_,
java.lang.String sNew_)
Replaces all occurences of sOld_ in pString with sNew_. |
static java.lang.String |
replace(java.lang.String pString_,
java.lang.String sOld_,
java.lang.String sNew_,
int startIndex_)
Replaces all occurences of sOld_ in pString with sNew_. |
static java.lang.String |
rightPaddWithSpace(java.lang.String pString_,
int stellen)
Add spaces at the right side of a string if necessary. |
static boolean |
rnd()
|
static double |
rnd(double df)
Returns the a pseudorandom double number between 0.0 and excluding the provided double value. |
static float |
rnd(float f)
Returns the a pseudorandom float number between 0.0 and excluding the provided float value. |
static int |
rnd(int end_)
Random number in the range [0, end_] (both inclusive). |
static int |
rnd(int start_,
int end_)
Random number in the range [start_, end_] (both inclusive). |
static java.lang.String |
rtrim(java.lang.String s)
Removes space, carriage, linefeed, and tab chars at the right side of a string. |
static void |
setDate(java.util.Calendar pCalendar_,
java.lang.String sDate_)
|
static void |
setDebug(boolean bDebug_)
Sets the debug mode for the running application. |
static void |
setDebug(java.lang.String sDebug_)
Sets the debug mode for the running application. |
static void |
setTime(java.util.Calendar pCalendar_,
java.lang.String sTime_)
|
static void |
showLiveSignal()
For batch applications to indicate progess to the user. |
static void |
showLiveSignal(char c_)
For batch applications to indicate progess to the user. |
static java.lang.String |
shrinkString(java.lang.String pString,
int maxSize)
Reformat a string which is not longer than a given size. |
static void |
sleep(int seconds_)
Current thread sleeps in seconds. |
static java.util.Vector |
sort(java.util.Enumeration pEnumeration_)
Quicksort for Enumeration. |
static java.util.Vector |
sort(java.util.Enumeration pEnumeration_,
ccl.util.Comparable pComparable_)
Quicksort for Enumeration. |
static java.util.Vector |
sort(java.util.Vector pVector_)
Uses Quicksort using medians of 3 for partitions. |
static java.util.Vector |
sort(java.util.Vector vInput_,
ccl.util.Comparable pComparable_)
Uses Quicksort using medians of 3 for partitions and the |
static java.util.Vector |
sortCaseSensitive(java.util.Vector pVector_)
Case sensitive sort has 'Zorro' ordered before 'arthur'. |
static void |
sortFast(java.util.Vector pVector_)
Uses Quicksort using medians of 3 for partitions. |
static void |
sortFast(java.util.Vector vInput_,
ccl.util.Comparable pComparable_)
Like sort but works directly on the input vector. |
static java.util.Date |
stringToDate(java.lang.String sDate_)
Input format of the date is either CCYY-MM-DD or CCYYMMDD. |
static java.util.Vector |
stringToLines(int lines_,
java.lang.String pString_)
This function takes a String and separates it into different lines. |
static java.util.Vector |
stringToLines(int lines_,
java.lang.String pString_,
char cCutter_)
This function takes a String and separates it into different lines. |
static java.util.Vector |
stringToLines(java.lang.String pString_)
This function takes a String and separates it into different lines. |
static java.util.Vector |
stringToLines(java.lang.String pString_,
char cCutter_)
This function takes a String and separates it into different lines. |
static java.util.Vector |
stringToLines(java.lang.String sLines_,
java.lang.String sCutter_)
This function takes a String and separates it into different lines. |
static java.util.Vector |
stringToLines(java.lang.String sLines_,
java.lang.String sTokenizerString_,
boolean bUseTokenizer_)
This function takes a String and separates it into different lines. |
static java.util.Vector |
subtract(java.util.Vector vSource_,
java.util.Vector vToDelete_)
Create a new vector through extracting all elements of the second vector from the first vector. |
static java.lang.Object |
swap()
This method is the second step of a service to swap two objects in less than 3 steps. |
static java.lang.Object |
swap(java.lang.Object objFirst,
java.lang.Object objSecond)
This method is the first part of a service to swap two objects in less than 3 steps. |
static int |
swapInt()
This method is the second step of a service to swap two int values in less than 3 steps. |
static int |
swapInt(int first,
int second)
This method is the first part of a service to swap two int values in less than 3 steps. |
static java.lang.Process |
system(java.lang.String sCommand_)
This method does return immediately. |
static java.lang.Process |
system(java.lang.String[] asCommand_)
Execute an external command. |
static java.lang.Process |
system(java.util.Vector vArgs_)
Execute an external command. |
static java.lang.String |
systemAndGetError(java.lang.String commandline)
Does a system exec and returns the stderr output. |
static java.lang.String |
systemAndGetError(java.util.Vector vArgs_)
Does a system exec and returns the stderr output. |
static java.lang.String |
systemAndWait(java.lang.String commandline)
Does a system exec and returns the stdout. |
static java.lang.String |
systemAndWait(java.util.Vector vArgs_)
Does a system exec and returns the stdout. |
static int |
toLowerCase(int character_)
Works with ints instead of chars. |
static java.lang.String |
toString(java.lang.Object pObject_)
Before returning pObject_.toString() it checks if pObject_ is null. |
static int |
toUpperCase(int character_)
Works with ints instead of chars. |
static java.util.Vector |
toVector(java.util.Enumeration pEnumeration_)
Enumeration to Vector converter. |
static java.lang.String |
unifySpaces(java.lang.String s)
Seems to do the same as 'removeMultipleSpaces(String)'. |
static java.lang.String |
untabify(java.lang.String pString)
Replaces tabs with spaces, a maximum of 8 each. |
static java.lang.Object[] |
vectorToObjects(java.util.Vector pVector_)
Convenience class for java.util.Vector.copyInto(..). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.Object O_CONSTANT
getConstantObject()
Method Detail |
public static void setDebug(boolean bDebug_)
debug(Object)
public static boolean isDebug()
public static void setDebug(java.lang.String sDebug_)
debug(Object)
public static void debug(java.lang.Object oMessage_)
setDebug(boolean)
public static void debug(int i)
setDebug(boolean)
public static void debug(java.lang.Object oOriginator_, java.lang.Object oMessage_)
setDebug(boolean)
,
printlnErr(java.lang.Object, java.lang.Object)
public static void panicIf(boolean bPanic_)
ApplicationException
public static void panicIf(boolean bPanic_, java.lang.String sMessage_)
sMessage_
- The error message for the Exception.ApplicationException
public static void assert(boolean bAssert_)
public static void assert(java.lang.Object pObject_)
public static void print(char c_)
public static void print(java.lang.String pString_)
public static void print(java.lang.Object pObject_)
public static void println(java.lang.String pString_)
pString_
- a string without a trailing newline to send
to standard output.public static void println(java.lang.Exception e)
printlnErr
public static void println(java.lang.Object pObject_)
public static void println()
print
public static void printErr(char c_)
public static void printErr(java.lang.String pString_)
public static void printErr(java.lang.Object pObject_)
public static void printlnErr()
public static void printlnErr(java.lang.String sMessage_)
sMessage_
- a string without a trailing newline to send
to standard error.public static void printlnErr(java.lang.Object pObject_)
pObject_
- an object that will be converted to a string which
will be sent to standard error with a newline appended.public static void printlnErr(java.lang.Exception exception_)
exception_
- the exception to print to
standard error.public static void printlnErr(java.lang.Object oClass_, java.lang.Object oMessage_)
public static void showLiveSignal()
public static void showLiveSignal(char c_)
c_
- The char that should be printed to
stdout.public static int atoi(java.lang.String pString_)
public static long atol(java.lang.String pString_)
public static java.lang.String itoa(int i_)
public static java.lang.String ltoa(long l_)
public static java.lang.String dtoa(double d_)
public static float atof(java.lang.String pString_)
public static double atod(java.lang.String pString_)
public static double ltod(long l_)
l_
- the long value to convert to a double.
public static byte[] intToBytes(int i_)
bytesToInt(byte[])
public static int bytesToInt(byte[] abInt)
intToBytes(int)
public static char byteToChar(byte b_)
public static int btoi(byte b_)
public static int byteToInt(byte b_)
public static java.lang.String byteToString(byte b_)
public static java.lang.String cToS(char c_)
public static int toUpperCase(int character_)
public static int toLowerCase(int character_)
public static boolean atob(java.lang.String pString_)
public static boolean isTrue(java.lang.Boolean pBoolean_)
public static boolean isEmpty(java.lang.String sTest_)
public static int getOccurances(java.lang.String source, int zeichen)
public static int getOccurances(java.lang.String source_, java.lang.String lookFor_)
public static java.lang.String multiplyChar(char c, int anzahl)
public static java.lang.String multiplyChar(java.lang.String sFill, int anzahl)
public static java.lang.String getSpaces(int length_)
public static java.lang.String appendSpaces(java.lang.String pString_, int length_)
public static java.lang.String paddWith(int number_, int stellen_, char cPadd_)
public static java.lang.String paddWith(java.lang.String pString_, int stellen_, char cPadd_)
public static java.lang.String paddWithSpace(int number, int stellen)
public static java.lang.String paddWithSpace(long number, int stellen)
public static java.lang.String paddWithSpace(double dNumber_, int stellen)
public static java.lang.String paddWithSpace(java.lang.String pString_, int stellen)
public static java.lang.String rightPaddWithSpace(java.lang.String pString_, int stellen)
public static java.lang.String paddWithZero(int number, int stellen)
public static java.lang.String paddWithZero(long number, int stellen)
public static java.lang.String paddWithZero(java.lang.String sNumber_, int stellen_)
public static java.lang.String removeMultipleSpaces(java.lang.String pString_)
public static java.lang.String rtrim(java.lang.String s)
public static java.lang.String ltrim(java.lang.String s)
public static java.lang.String unifySpaces(java.lang.String s)
public static boolean equalsCaseless(java.lang.String sA_, java.lang.String sB_)
public static java.lang.String firstCharToUpperCase(java.lang.String pString_)
public static java.lang.String firstCharToLowerCase(java.lang.String pString_)
public static boolean endsWith(java.lang.String sThis_, char cOther_)
public static boolean endsWith(java.lang.String pString_, java.lang.String sEnd_)
public static java.lang.String replace(java.lang.String pString_, char cOld_, char cNew_)
String.replace(char, char)
public static java.lang.String replace(java.lang.String pString_, char cOld_, char cNew_, int startIndex_)
public static java.lang.String replace(java.lang.String pString_, java.lang.String sOld_, java.lang.String sNew_)
pString_
- a string that shall get some sub strings replaced.sOld_
- a string for which all occurences in the first string shall be replaced.sNew_
- a string which will be used for replacement of the old sub strings.
public static java.lang.String replace(java.lang.String pString_, java.lang.String sOld_, java.lang.String sNew_, int startIndex_)
startIndex_
- The startindex_ gives the position in
pString_ where the replace procedure
should start.public static boolean isSpaceLine(java.lang.String sLine_)
public static java.lang.String untabify(java.lang.String pString)
public static java.lang.String denullify(java.lang.String pString_)
public static java.lang.String toString(java.lang.Object pObject_)
public static int contains(java.lang.String sToLookIn_, java.lang.String sThis_)
public static int compare(java.lang.String firstString, java.lang.String anotherString)
public static int indexOfNot(java.lang.String pString_, char cNot_, int startIndex_)
public static int indexOfNot(java.lang.String pString_, char cNot_)
public static int count(java.lang.String pString_, char c_)
public static boolean isDigit(char c_)
public static boolean isVocal(char c_)
public static java.lang.String shrinkString(java.lang.String pString, int maxSize)
public static java.lang.String concat(java.util.Vector pVector_)
pVector_
- Contains the Strings that will be concatenated.
stringToLines(java.lang.String)
public static java.lang.String concat(java.util.Vector pVector_, java.lang.String sWith_)
pVector_
- Contains the Strings that will be concatenated.sWith_
- The 'glue' for the other Strings.
stringToLines(java.lang.String, char)
public static java.lang.String concat(java.util.Vector pVector_, char cWith_)
pVector_
- Contains the Strings that will be concatenated.cWith_
- The 'glue' for the other Strings.
stringToLines(java.lang.String, char)
public static java.lang.String concat(java.lang.String pString_, char cWidth_)
public static java.util.Vector stringToLines(int lines_, java.lang.String pString_, char cCutter_)
lines_
- The number of lines that should be extracted.
Zero if maximum number of lines is requested.cCutter_
- The character that separates pString_ into
different lines
public static java.util.Vector stringToLines(java.lang.String pString_, char cCutter_)
cCutter_
- The character that separates pString_ into
different lines
concat(java.util.Vector, java.lang.String)
public static java.util.Vector stringToLines(java.lang.String pString_)
public static java.util.Vector stringToLines(int lines_, java.lang.String pString_)
lines_
- The number of lines that should be extracted.
Zero if maximum number of lines is requested.
concat(java.util.Vector, java.lang.String)
public static java.util.Vector stringToLines(java.lang.String sLines_, java.lang.String sCutter_)
concat(java.util.Vector, java.lang.String)
public static java.util.Vector stringToLines(java.lang.String sLines_, java.lang.String sTokenizerString_, boolean bUseTokenizer_)
concat(java.util.Vector, java.lang.String)
public static java.lang.String formatBlock(java.lang.String pString)
public static java.lang.String formatBlock(java.lang.String pString, int lineLength)
public static java.lang.String formatBlock(java.lang.String pString, int lineLength, int indentation)
indentation
- add indentation spaces to left
of each line.public static java.lang.String formatLeft(java.lang.String pString)
public static java.lang.String formatLeft(java.lang.String pString, int lineLength)
public static java.lang.String formatLeft(java.lang.String pString, int lineLength, int indentation)
indentation
- add indentation spaces to left
of each line.public static java.lang.String formatCenter(java.lang.String pString, int lineLength)
public static java.lang.String centerLine(java.lang.String pString, int lineLength)
public static int getDiffPosition(java.lang.String s1, java.lang.String s2)
s1
- a string to compare, is not allowed to be null.s2
- a string to compare, is not allowed to be null.
public static boolean isEmpty(java.util.Vector vTest_)
public static java.util.Vector toVector(java.util.Enumeration pEnumeration_)
public static java.util.Vector objectsToVector(java.lang.Object[] apObjects)
public static java.lang.Object[] vectorToObjects(java.util.Vector pVector_)
pVector_
- the vector to convert into an array.
public static java.util.Vector filter(java.util.Vector pVector_, java.lang.Object oBadElement_)
public static java.util.Vector filter(java.util.Vector pVector_, java.util.Vector vBadElements_)
public static java.util.Vector filter(java.util.Vector pVector_, ccl.util.Testable pFilter_)
public static java.util.Vector map(java.util.Vector pVector_, ccl.util.Transformable pTransformable_)
public static boolean contains(java.util.Vector pVector_, java.lang.String sFind_)
public static boolean contains(java.util.Vector pVector_, ccl.util.Testable pFilter_)
public static java.util.Vector enumerationToVector(java.util.Enumeration pEnumeration_)
public static java.util.Vector concat(java.util.Vector vFirst_, java.util.Vector vSecond_)
public static java.util.Vector subtract(java.util.Vector vSource_, java.util.Vector vToDelete_)
public static java.util.Vector insert(java.util.Vector vDestination_, java.util.Vector vOther_, int destination)
public static boolean equals(java.util.Vector vFirst_, java.util.Vector vSecond_)
public static java.util.Vector invert(java.util.Vector vSource_)
public static void quickSort(java.lang.Object[] s, int lo, int hi, ccl.util.Comparable cmp)
s
- the array to sortlo
- the least index to sort fromhi
- the greatest indexcmp
- the comparator to use for comparing elementspublic static void quickSort(java.util.Vector v, int lo, int hi, ccl.util.Comparable cmp)
v
- the vector to sortlo
- the least index to sort fromhi
- the greatest indexcmp
- the comparator to use for comparing elementspublic static java.util.Vector sort(java.util.Vector vInput_, ccl.util.Comparable pComparable_)
public static void sortFast(java.util.Vector vInput_, ccl.util.Comparable pComparable_)
public static java.util.Vector sort(java.util.Vector pVector_)
public static void sortFast(java.util.Vector pVector_)
public static java.util.Vector sort(java.util.Enumeration pEnumeration_)
public static java.util.Vector sort(java.util.Enumeration pEnumeration_, ccl.util.Comparable pComparable_)
public static java.util.Vector sortCaseSensitive(java.util.Vector pVector_)
public static int insert(java.util.Vector pVector_, int lowestOffset_, int highestOffset_, java.lang.Object pObject_, ccl.util.Comparable pComparable_)
public static int insert(java.util.Vector pVector_, java.lang.Object pObject_, ccl.util.Comparable pComparable_)
public static java.lang.Process system(java.lang.String sCommand_) throws java.io.IOException
java.io.IOException
- Whatever can go wrong.systemAndWait(java.util.Vector)
,
systemAndGetError(java.util.Vector)
public static java.lang.Process system(java.lang.String[] asCommand_) throws java.io.IOException
java.io.IOException
- Whatever Runtime.exec(..) throws.public static java.lang.Process system(java.util.Vector vArgs_) throws java.io.IOException
java.io.IOException
- Whatever Runtime.exec(..) throws.public static java.lang.String systemAndWait(java.util.Vector vArgs_) throws java.io.IOException
vArgs_
- the arguments to system.exec().
Should not be null or empty.
java.io.IOException
- Whatever might go wrong.public static java.lang.String systemAndWait(java.lang.String commandline) throws java.io.IOException
commandline
- the arguments to system.exec().
Should not be null or empty.
java.io.IOException
- Whatever might go wrong.public static java.lang.String systemAndGetError(java.util.Vector vArgs_) throws java.io.IOException
vArgs_
- the arguments to system.exec().
Should not be null or empty.
java.io.IOException
- Whatever might go wrong.public static java.lang.String systemAndGetError(java.lang.String commandline) throws java.io.IOException
commandline
- the arguments to system.exec().
Should not be null or empty.
java.io.IOException
- Whatever might go wrong.public static boolean isOSWindows()
public static boolean isOSLinux()
public static boolean isOSSolaris()
public static boolean isOSUnix()
public static void gc()
public static java.lang.String getLocalHostName()
public static boolean isSwingPackage(java.lang.String sFullPackageName_)
public static java.lang.String getStackTrace(java.lang.Throwable pThrowable_)
public static java.lang.String getDump(java.lang.Object object_)
public static boolean rnd()
public static int rnd(int end_)
public static int rnd(int start_, int end_)
public static float rnd(float f)
public static double rnd(double df)
public static java.lang.String getStandardDate(java.util.Date pDate_)
public static java.lang.String getDate()
public static java.lang.String getDate(java.util.Calendar pCalendar_)
public static java.lang.String getTime(java.util.Date pDate_)
public static java.lang.String getTime(java.util.Calendar pCalendar_)
public static java.lang.String getTimeWithMillis()
public static java.lang.String getTimeWithMillis(java.util.Calendar calendar_)
calendar_
- the current time.
public static java.lang.String getDateTimeAndMillis()
public static java.util.Date stringToDate(java.lang.String sDate_)
public static java.util.Calendar getDate(java.lang.String sDate_)
public static java.util.Calendar getCalendar(java.lang.String sTimeZoneID_)
sTimeZoneID_
- If it is null or "" then "GMT" is used.public static java.util.Calendar getCalendar()
public static void setTime(java.util.Calendar pCalendar_, java.lang.String sTime_)
sTime_
- e.g. 23:59:59public static void setDate(java.util.Calendar pCalendar_, java.lang.String sDate_)
sDate_
- e.g. 2000-01-26public static boolean isDateValid(java.lang.String sDate_)
public static int getNumberOfDays(java.lang.String sFrom_, java.lang.String sTo_)
public static java.lang.String getNextDay(java.lang.String sDate_)
public static java.lang.String getLastDayOfMonth(java.lang.String sDate_)
public static java.lang.String getFirstDayOfMonth(java.lang.String sDate_)
public static java.lang.String getMonth(java.lang.String sDate)
public static java.lang.String getTodaySortable()
public static java.lang.String getHeuteSortable()
getTodaySortable()
public static java.lang.Object getConstantObject()
public static void sleep(int seconds_)
public static boolean isAlpha(char c_)
c_
- a character to test for alpha status.
public static long max(long a_, long b_)
java.lang.Math.max
public static int max(int a_, int b_)
java.lang.Math.max
public static int min(int a_, int b_)
java.lang.Math.min
public static java.lang.Object swap(java.lang.Object objFirst, java.lang.Object objSecond)
For example:
o1 = swap(o1, o2);
o2 = swap();
swap
public static java.lang.Object swap()
Note that this method will keep a reference to the first object until the swap method pair will be used again with a new pair of parameters!!!
swap
public static int swapInt(int first, int second)
swapInt
public static int swapInt()
swapInt
public static java.lang.String getObjectName(java.lang.Object pObject_)
public static long getUsedMemory()
public static java.lang.String getUsedMemoryPercentage()
public static java.lang.String getUsedMemoryPercentage(long used, long total)
public static java.lang.String formatMemoryInfo()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |