|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.util.Misc
public class Misc
Static class of miscellaneous methods
| Field Summary | |
|---|---|
static boolean |
debug
debug flag |
static String |
MISSING
missing string |
static String |
NaN
NaN string |
| Constructor Summary | |
|---|---|
Misc()
Default constructor; does nothing |
|
| Method Summary | |
|---|---|
static float[][] |
addArray(float[][] a,
float[][] b,
float[][] c)
Add two arrays together |
static void |
addClassLoader(ClassLoader cl)
Add the given class loader into the list of custom class loaders |
static List |
addUnique(List dest,
List src,
Hashtable seen)
Adds all of the elements held by src into the dest list if they are not held in the seen Hashtable. |
static boolean |
allStrings(List listToCheck)
Is the given List a list of String objects. |
static StringBuffer |
append(StringBuffer sb,
Object s1)
Deprecated. See StringUtil |
static StringBuffer |
append(StringBuffer sb,
Object s1,
Object s2)
Deprecated. See StringUtil |
static StringBuffer |
append(StringBuffer sb,
Object s1,
Object s2,
Object s3)
Deprecated. See StringUtil |
static StringBuffer |
append(StringBuffer sb,
Object s1,
Object s2,
Object s3,
Object s4)
Deprecated. See StringUtil |
static StringBuffer |
append(StringBuffer sb,
Object s1,
Object s2,
Object s3,
Object s4,
Object s5)
Deprecated. See StringUtil |
static String |
appendUrlArgs(String base,
String[] args)
Create a url argument String with the given args. |
static String |
appendUrlArgs(String base,
String[] args,
boolean addQuestionMark)
Create a url argument String with the given args. |
static boolean |
arraysEquals(double[][] a,
double[][] b)
check for equality a or b can be null; |
static boolean |
arraysEquals(double[] a,
double[] b)
check for equality a or b can be null; |
static boolean |
arraysEquals(float[][] a,
float[][] b)
check for equality a or b can be null; |
static boolean |
arraysEquals(float[] a,
float[] b)
check for equality a or b can be null; |
static boolean |
arraysEquals(int[][][] a,
int[][][] b)
check for equality a or b can be null; |
static boolean |
arraysEquals(int[][] a,
int[][] b)
check for equality a or b can be null; |
static boolean |
arraysEquals(int[] a,
int[] b)
check for equality a or b can be null; |
static boolean |
arraysEquals(String[] a,
String[] b)
check for equality a or b can be null; |
static double[] |
arrayToDouble(float[] d)
convert float array to double array |
static String |
breakText(String text,
String insert,
int lineSize)
Deprecated. See StringUtil |
static String |
cleanFileName(String name)
Deprecated. Use IOUtil |
static double[][] |
cloneArray(double[][] a)
Clone an array of doubles |
static float[][] |
cloneArray(float[][] a)
Clone an array of floats |
static List |
cloneList(List sourceList)
Utility to create a new list or handle a null argument gracefully. |
static double[] |
computeTicks(double high,
double low,
double base,
double interval)
Compute the tick mark values based on the input. |
static float[] |
computeTicks(float high,
float low,
float base,
float interval)
Compute the tick mark values based on the input. |
static double |
computeTickSpacing(double min,
double max)
Calculate a good spacing interval for labels, contours based on the range of the data. |
static boolean |
contains(Object object,
Object[] array)
Does the given array contain the given object. |
static boolean |
containsRegExp(String patternString)
Deprecated. See StringUtil |
static boolean |
containsString(String string,
List objects,
boolean lowerCase)
Does the the list contain the string |
static float[][] |
copy(float[][] pts,
int pointCnt)
Copy an array to another |
static void |
copyFile(File from,
File to)
Deprecated. Use IOUtil |
static List |
createIntervalList(int start,
int end,
int step)
Create and return a List that holds Integers starting at start to end by step. |
static Hashtable |
createLabelTable(double max,
double min,
double base,
double increment)
Creates a hashtable that will draw text labels starting at the starting point specified using the increment field. |
static double |
decodeLatLon(String latlon)
Decodes a string representation of a latitude or longitude and returns a double version (in degrees). |
static void |
deleteDirectory(File root)
Deprecated. Use IOUtil |
static Object |
deserialize(byte[] bytes)
Deserialize the given byte array into an object |
static String |
doPost(String action,
String data)
Post the form data |
static String |
doPost(String action,
String data,
String[] attrs)
Post the form data |
static Object[] |
doPostAndGetConnection(String action,
String data)
Do an http post with the given action, writing the given data as the post data. |
static Object[] |
doPostAndGetConnection(String action,
String data,
String[] attrs)
Do an http post with the given action, writing the given data as the post data. |
static boolean |
equals(Object o1,
Object o2)
Does an o1.equals (o2) if both objects are non-null. |
static boolean |
equalsIgnoreCase(Object o1,
Object o2)
Compares two object-s toString() methods to see if they are equal, ignoring case. |
static float[][] |
expand(float[][] pts)
Expand an array of points |
static void |
fatal(String msg)
Utility method to print an error and exit |
static void |
fatal(Throwable exc)
Utility method to print an exception and exit |
static void |
fillArray(float[][] a,
float value)
fill array with value |
static int[] |
find(double value,
double[] array)
Find the indices of the array where it is equal to the value |
static int[] |
find(float value,
float[] array)
Find the indices of the array where it is equal to the value |
static int[] |
find(int value,
int[] array)
Find the indices of the array where it is equal to the value |
static Class |
findClass(String className)
Find the Class for the given class name. |
static Constructor |
findConstructor(Class c,
Class[] paramTypes)
Find all constructors of the given class Of these methods find one whose parameter types are assignable from the given parameter types. |
static Object |
findMatch(String source,
List patternList,
List results,
Object dflt)
Deprecated. See StringUtil |
static Object |
findMatch(String source,
List patternList,
Object dflt)
Deprecated. See StringUtil |
static Method |
findMethod(Class c,
String methodName,
Class[] paramTypes)
Find all methods with the given name. |
static String |
format(double value)
Provide a consistent String formatting of the given double value |
static String |
formatLatitude(double value,
String format)
Format a latitude to the given format. |
static String |
formatLatOrLon(double value,
String format,
boolean isLatitude,
boolean use360)
Format a latitude or longitude value to the given format. |
static String |
formatLongitude(double value,
String format,
boolean use360)
Format a longitude to the given format. |
static long |
gc()
Run the garbage collector. |
static float |
getAverage(float[] values)
Average the array. |
static boolean |
getBoolean(String stringValue,
boolean dflt)
Try to decode the given stringValue as an boolean. |
static List<ClassLoader> |
getClassLoaders()
Get the list of dynamic class loaders |
static String |
getClassMethod(String path)
Utility method that returns the ClassName.methodName part of the (possibly) full package.ClassName.methodName path. |
static String |
getClassName(Class c)
Return the end part of the class name |
static long |
getCurrentTime()
Get the current time |
static DecimalFormat |
getDecimalFormat(double v)
Return different pre-defined DecimalFormat objects depending on the value of the given double |
static List |
getDirectories(File dir,
boolean recurse)
Deprecated. Use IOUtil |
static List |
getDirectories(List dirs,
boolean recurse)
Deprecated. Use IOUtil |
static String |
getFileExtension(String f)
Deprecated. Use IOUtil |
static String |
getFileRoot(String f)
Deprecated. Use IOUtil |
static String |
getFileTail(String f)
Deprecated. Use IOUtil |
static List |
getIndexList(List values,
List allValues)
Return a list of Integer indexes, the indexes that each value object is in the all values list. |
static InputStream |
getInputStream(String filename)
Deprecated. Use IOUtil |
static InputStream |
getInputStream(String filename,
Class origin)
Deprecated. Use IOUtil |
static int |
getInt(String stringValue,
int dflt)
Try to decode the given stringValue as an integer. |
static Object |
getLast(List l)
Return the last object in the given list or null if the list is empty. |
static File |
getMostRecentFile(File dir)
Deprecated. Use IOUtil |
static File |
getMostRecentFile(File dir,
FileFilter filter)
Deprecated. Use IOUtil |
static File |
getMostRecentFile(File dir,
FileFilter filter)
Deprecated. Use IOUtil |
static long |
getPauseEveryTime(int minutesDelta)
figure out how long to wait for |
static boolean |
getProperty(Hashtable props,
String prop,
boolean dflt)
Look up the prop in the given set of Hashtable. |
static Color |
getProperty(Hashtable props,
String prop,
Color dflt)
Look up the prop in the given set of properties. |
static double |
getProperty(Hashtable props,
String prop,
double dflt)
get a double property from the props table |
static float |
getProperty(Hashtable props,
String prop,
float dflt)
Look up the prop in the given set of Hashtable. |
static int |
getProperty(Hashtable props,
String prop,
int dflt)
Look up the prop in the given set of Hashtable. |
static String |
getProperty(Hashtable p,
String prop,
String dflt)
Look up the String prop in the given set of properties. |
static PrototypeManager |
getPrototypeManager()
Get the prototype manager |
static float[] |
getRange(float[][] a)
Get the range of all values |
static float[][] |
getRanges(float[][] a)
Get the ranges for each column |
static Runnable |
getRunnable()
Get a Runnable object |
static String |
getSetterMethod(String prop)
For the given property name get the set method name, e.g., returns: |
static String |
getStackTrace()
Return the stack trace of this calling thread |
static String |
getStackTrace(Throwable exc)
Get the stack trace from the given exception |
static String |
getSystemProperty(String key,
String dflt)
Read the given system property. |
static String |
getUniqueId()
Gets a (sort of) unique String identifier. |
static URL |
getURL(String name,
Class origin)
Find the url with the given name as a resource relative to the given class. |
static String |
getValue(String key,
Hashtable props)
Looks up the named value in the props hashtable. |
static List |
getValuesFromIndices(List indices,
List allValues)
Return a list of objects from the allValues list that are at the indices contained by the given indices list. |
static int |
hashcode(Object o1)
Return the hashcode for the object. |
static boolean |
hasSuffix(String fileOrUrl,
String suffix)
Does the given file or url have the given suffix |
static boolean |
haveNotSeen(Object o,
Hashtable map)
The inverse of haveSeen |
static boolean |
haveSeen(Object o,
Hashtable map)
Checks to see if the object o is in the given Hashtable. |
static int |
indexOf(Object object,
Object[] array)
What is the index of the given object |
static float[] |
interpolate(int cnt,
float start,
float end)
Do a linear interpolation with cnt points between start and end |
static boolean |
isHtml(String s)
See if the string is HTML. |
static boolean |
isHtmlFile(String filenameOrUrl)
Deprecated. Use IOUtil |
static boolean |
isImageFile(String filename)
Deprecated. Use IOUtil |
static boolean |
isNaN(double[][] values)
Check if all the values in the array are NaNs |
static boolean |
isNaN(float[][] values)
Check if all the values in the array are NaNs |
static boolean |
isTextFile(String filename)
Deprecated. Use IOUtil |
static String |
join(String[] args)
Deprecated. See StringUtil |
static String |
join(String delimiter,
List args)
Deprecated. See StringUtil |
static String |
join(String delimiter,
List args,
boolean ignoreEmptyStrings)
Deprecated. See StringUtil |
static String |
join(String delimiter,
Object[] args)
Deprecated. See StringUtil |
static String |
join(String delimiter,
Object[] args,
boolean ignoreEmptyStrings)
Deprecated. See StringUtil |
static String |
joinDir(File f1,
String filename)
Deprecated. Use IOUtil |
static String |
joinDir(String f1,
String f2)
Deprecated. Use IOUtil |
static String |
listToString(List l)
Deprecated. See StringUtil |
static String[] |
listToStringArray(List objectList)
Deprecated. See StringUtil |
static void |
main(String[] args)
Test this class |
static String |
makeDir(File f)
Deprecated. Use IOUtil |
static String |
makeDir(String path)
Deprecated. Use IOUtil |
static List |
makeUnique(List l)
Make the list unique |
static String |
makeUrl(String protocol,
String server,
String urlRoot,
String[] args)
Create a URL String with the given protocol, server, url and url arguments. |
static float[] |
merge(float[] a,
float[] b)
Merge the two arrays into one. |
static void |
moveFile(File from,
File to)
Deprecated. Use IOUtil |
static Hashtable |
newHashtable(Hashtable ht,
Object[] o)
Create a Hashtable. |
static Hashtable |
newHashtable(Object[] o)
Create a new Hashtable. |
static Hashtable |
newHashtable(Object[] keys,
Object[] values)
Create a Hashtable and add the given keys and their corresponding values into it. |
static Hashtable |
newHashtable(Object key1,
Object value1)
Create a Hashtable and add the given keys and their corresponding values into it. |
static Hashtable |
newHashtable(Object key1,
Object value1,
Object key2,
Object value2)
Create a Hashtable and add the given keys and their corresponding values into it. |
static Hashtable |
newHashtable(Object key1,
Object value1,
Object key2,
Object value2,
Object key3,
Object value3)
Create a Hashtable and add the given keys and their corresponding values into it. |
static List |
newList(Object o1)
Create a List and add the argument to it. |
static List |
newList(Object[] l)
Copy the objects with the given objectArray into a new List. |
static List |
newList(Object o1,
Object o2)
Create a List and add the arguments to it. |
static List |
newList(Object o1,
Object o2,
Object o3)
Create a List and add the arguments to it. |
static List |
newList(Object o1,
Object o2,
Object o3,
Object o4)
Create a List and add the arguments to it. |
static List |
newList(Object o1,
Object o2,
Object o3,
Object o4,
Object o5)
Create a List and add the arguments to it. |
static double |
normalizeLongitude(double lonValue)
Normalize a longitude value to the range between -180 and 180. |
static String |
padLeft(String s,
int desiredLength)
Deprecated. See StringUtil |
static String |
padLeft(String s,
int desiredLength,
String padString)
Deprecated. See StringUtil |
static String |
padRight(String s,
int desiredLength)
Deprecated. See StringUtil |
static String |
padRight(String s,
int desiredLength,
String padString)
Deprecated. See StringUtil |
static String |
padZero(int value,
int numDigits)
Deprecated. See StringUtil |
static List |
parseCsv(String s,
boolean skipFirst)
Deprecated. See StringUtil |
static double |
parseDouble(String s)
Parse the double value specified by the string s. |
static double[] |
parseDoubles(String sourceString)
The given sourceString is a comma separated list of values, this method parses this String, converting it into an array of doubles. |
static double[] |
parseDoubles(String sourceString,
String delimiter)
The given sourceString is a delimiter separated list
of doubles. |
static float |
parseFloat(String s)
Parse the float value specified by the string s. |
static float[] |
parseFloats(String sourceString)
The given sourceString is a comma separated list of values, this method parses this String, converting it into an array of floats. |
static float[] |
parseFloats(String sourceString,
String delimiter)
The given sourceString is a delimiter separated list
of doubles. |
static int[] |
parseInts(String sourceString,
String delimiter)
The given sourceString is a delimiter separated list
of doubles. |
static double[] |
parseLatLons(String sourceString)
The given sourceString is a comma separated list of lat or lon values, this method parses this String, converting it into an array of doubles. |
static double[] |
parseLatLons(String sourceString,
String delimiter)
The given sourceString is a delimiter separated list
of lats or lons. |
static List |
parseLineWords(String content,
int[] indices,
int[] lengths,
String lineDelimiter,
String commentString,
boolean trimWords)
Deprecated. See StringUtil |
static double |
parseNumber(String value)
Provide a consistent parsing that takes into account localization of the String format of the given numeric value |
static Properties |
parseProperties(String propString)
Create a Properties table from the given semi-colon delimited attribute string. |
static Properties |
parseProperties(String propString,
String delimiter)
Create a Properties table from the given semi-colon delimited attribute string. |
static double |
parseValue(String value)
Deprecated. replaced by parseNumber(String) |
static void |
pauseEvery(int minutesDelta)
Pause every n minutes |
static void |
print(List l)
A method for printing a list. |
static void |
printArray(String prefix,
boolean[] array)
Print out the values in a boolean array. |
static void |
printArray(String prefix,
byte[] array)
Print out the values in an int array. |
static void |
printArray(String prefix,
double[] array)
Print out the values in a double array. |
static void |
printArray(String prefix,
float[] array)
Print out the values in a float array. |
static void |
printArray(String prefix,
int[] array)
Print out the values in an int array. |
static void |
printArray(String prefix,
Object[] array)
Print out the values in an int array. |
static void |
printBits(int b)
Print out the bit pattern in an integer |
static void |
printMembers(Object o)
Print the members of an Object |
static void |
printStack(String msg)
Print the stack trace for a given line of code. |
static void |
printStack(String msg,
int maxLines)
Print the stack trace for a given line of code. |
static void |
printStack(String msg,
int maxLines,
String onlyIfTraceContainsThisString)
Print the stack trace for a given line of code. |
static void |
propertySet(Object object,
String name,
String value)
Use reflection to find the Method with name "set" + Name. |
static boolean |
propertySet(Object object,
String name,
String value,
boolean ignoreError)
Use reflection to find the Method with name "set" + Name. |
static void |
pruneEmptyDirectories(File root)
Deprecated. Use IOUtil |
static byte[] |
readBytes(InputStream is)
Deprecated. Use IOUtil |
static byte[] |
readBytes(InputStream is,
Object loadId)
Deprecated. Use IOUtil |
static String |
readContents(File file)
Deprecated. Use IOUtil |
static String |
readContents(InputStream is)
Deprecated. Use IOUtil |
static String |
readContents(String contentName)
Deprecated. Use IOUtil |
static String |
readContents(String contentName,
Class origin)
Deprecated. Use IOUtil |
static String |
readContents(String contentName,
String dflt)
Deprecated. Use IOUtil |
static String |
readFile(String filename,
Class origin)
Deprecated. Use IOUtil |
static String |
readFile(String filename,
Class origin,
String dflt)
Deprecated. Use IOUtil |
static Properties |
readProperties(String filename,
Properties properties,
Class origin)
Read the given property filename, defined in relation to the given Class. |
static void |
removeLast(List l)
Remove the last element in the given list. |
static String |
removeWhitespace(String inputString)
Deprecated. See StringUtil |
static String |
replace(String string,
String pattern,
String value)
Deprecated. See StringUtil |
static List |
replaceList(List sourceList,
String[] patterns,
String[] values)
Deprecated. See StringUtil |
static String |
replaceList(String v,
List patterns,
List values)
Deprecated. See StringUtil |
static String |
replaceList(String v,
String[] patterns,
String[] values)
Deprecated. See StringUtil |
static float[] |
reverseArray(float[] a)
Reverse the array |
static Object[] |
reverseArray(Object[] fromArray,
Object[] toArray)
Reverse an array |
static List |
reverseList(List l)
Reverse an array |
static void |
run(Object object,
String methodName)
Call object.runMethod in a different thread |
static void |
run(Object object,
String methodName,
Object arg)
Call object.runMethod in a different thread. |
static void |
run(Runnable r)
Run the Runnable. |
static void |
runInABit(long ms,
Object object,
String methodName,
Object arg)
Call object.runMethod in a different thread after a ms millisecond delay |
static void |
runInABit(long ms,
Runnable r)
Call r.run () in a different thread after a ms millisecond delay |
static Object |
safeGet(List l,
int index)
Utility to do a list get only if the index is ok. |
static byte[] |
serialize(Serializable object)
Serialize the given object into its byte array form |
static void |
setCurrentTime(Date date)
Set the current time |
static boolean |
setProperty(Object object,
Method method,
Object objectValue,
boolean ignoreError)
Set a property on a "bean" |
static boolean |
setProperty(Object object,
String name,
Object objectValue,
boolean ignoreError)
Set a property on a "bean" |
static void |
setPrototypeManager(PrototypeManager prototypeManager)
Set the global prototype manager. |
static String |
shorten(String s,
int length)
Deprecated. See StringUtil |
static void |
sleep(long ms)
Pause the current Thread for a specific number of milliseconds. |
static void |
sleepSeconds(long seconds)
Pause the current Thread for a specific number of seconds. |
static List |
sort(Collection listToSort)
Sort the given List. |
static File[] |
sortFilesOnAge(File[] files,
boolean youngestFirst)
Deprecated. Use IOUtil |
static File[] |
sortFilesOnAge(File directory,
FileFilter filter,
boolean youngestFirst)
Deprecated. Use IOUtil |
static List |
sortTuples(List pairs,
boolean ascending)
The elements in the given list object arrays. |
static List |
split(Object source)
Deprecated. See StringUtil |
static List |
split(Object source,
String delimiter)
Deprecated. See StringUtil |
static List |
split(Object source,
String delimiter,
boolean trim)
Deprecated. See StringUtil |
static List |
split(Object source,
String delimiter,
boolean trim,
boolean excludeZeroLength)
Deprecated. See StringUtil |
static String[] |
split(String s,
String delimiter,
int cnt)
Deprecated. See StringUtil |
static boolean |
startsWithVowel(String value)
Deprecated. See StringUtil |
static boolean |
stringMatch(String input,
String patternString)
Deprecated. See StringUtil |
static boolean |
stringMatch(String input,
String patternString,
boolean substring,
boolean caseSensitive)
Deprecated. See StringUtil |
static String |
stripExtension(String f)
Deprecated. Use IOUtil |
static String |
stripTags(String html)
Deprecated. See StringUtil |
static float[][] |
subtractArray(float[][] a,
float[][] b,
float[][] c)
Set c=a-b and return c. |
static double[] |
toDouble(float[] d)
Convert double array to float array |
static double[][] |
toDouble(float[][] d)
Convert to float |
static double[] |
toDouble(int[] d)
Convert int array to double array |
static double[][] |
toDouble(int[][] d)
Convert int array to double array |
static double |
toDouble(Object o)
A method for converting an object to a Double. |
static File[] |
toFiles(List files)
Deprecated. Use IOUtil |
static float[] |
toFloat(double[] d)
Convert double array to float array |
static float[][] |
toFloat(double[][] d)
Convert to float |
static List |
toList(Enumeration enumeration)
Create a list from an enumeration |
static List |
toList(Object[] l)
Copy the objects with the given objectArray into a new List. |
static List |
toString(List l)
Deprecated. See StringUtil |
static String |
toString(Object[] array)
Deprecated. See StringUtil |
static Vector |
toVector(Object[] objectArray)
Copy the objects with the given objectArray into a new Vector. |
static boolean |
typesMatch(Class[] formals,
Class[] actuals)
Returns true if the Classes defined in the actual parameter are equal or a sub-class of the corresponding classes defined in the formal argument. |
static boolean |
typesMatchx(Class[] formals,
Class[] actuals)
dummy |
static long |
usedMemory()
Get the amount of used memory |
static FileFilter |
wrapFilter(FileFilter filter)
Deprecated. Use IOUtil |
static void |
writeBytes(File filename,
byte[] contents)
Deprecated. Use IOUtil |
static void |
writeFile(File filename,
String contents)
Deprecated. Use IOUtil |
static void |
writeFile(String filename,
String contents)
Deprecated. Use IOUtil |
static String |
zeroString(int value)
Deprecated. See StringUtil |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean debug
public static final String MISSING
public static final String NaN
| Constructor Detail |
|---|
public Misc()
| Method Detail |
|---|
public static void setPrototypeManager(PrototypeManager prototypeManager)
prototypeManager - The prototype managerpublic static PrototypeManager getPrototypeManager()
public static long getCurrentTime()
public static void setCurrentTime(Date date)
date - the date to usepublic static double toDouble(Object o)
parseNumber(String) instead.
o - object in question
public static String formatLatitude(double value,
String format)
value - the value to formatformat - the format
formatLatOrLon(double, String, boolean, boolean)
public static String formatLongitude(double value,
String format,
boolean use360)
value - the value to formatformat - the formatuse360 - if true use 0-360 notation instead of -180 to 180 notation
formatLatOrLon(double, String, boolean, boolean)
public static String formatLatOrLon(double value,
String format,
boolean isLatitude,
boolean use360)
Examples for value -34.496 degrees
DD:MM:SS ===> -34:29:45
(if longitude and use360 ===> 326:29:45)
DDH ===> 34W (or 34S if longitude)
DD.d ===> -34.5
DD.dddH ===> 34.496W (or 34.496S if longitude)
DD MM" SS.s' ===> -34 29" 45.6'
value - the value to formatformat - the formatisLatitude - true if latitude, false if longitudeuse360 - if true use 0-360 notation instead of -180 to 180 notation
public static double decodeLatLon(String latlon)
+/- DDD:MM, DDD:MM:, DDD:MM:SS, DDD::SS, DDD.ddddd ===> [+/-] DDD.ddddd +/- DDD, DDD:, DDD:: ===> [+/-] DDD +/- :MM, :MM:, :MM:SS, ::SS, .ddddd ===> [+/-] .ddddd +/- :, :: ===> 0.0 Any of the above with N,S,E,W appended
latlon - string representation of lat or lon
public static List reverseList(List l)
l - The list
public static Object[] reverseArray(Object[] fromArray,
Object[] toArray)
fromArray - array to reversetoArray - reversed array
public static String getClassName(Class c)
c - The class
public static void propertySet(Object object,
String name,
String value)
throws IllegalAccessException,
IllegalArgumentException,
InvocationTargetException
object - The object to invoke the set property method on.name - The name of the method.value - The Strign representation of the value to set.
IllegalAccessException
IllegalArgumentException
InvocationTargetException
public static boolean propertySet(Object object,
String name,
String value,
boolean ignoreError)
throws IllegalAccessException,
IllegalArgumentException,
InvocationTargetException
object - The object to invoke the set property method on.name - The name of the method.value - The String representation of the value to set.ignoreError - If true then don't print out an error
IllegalAccessException
IllegalArgumentException
InvocationTargetExceptionpublic static String getSetterMethod(String prop)
setPropertname
prop - property name
public static boolean setProperty(Object object,
String name,
Object objectValue,
boolean ignoreError)
throws IllegalAccessException,
IllegalArgumentException,
InvocationTargetException
object - object to set property onname - name of the property. object must have setobjectValue - value of the propertyignoreError - true to ignore errors
IllegalAccessException - security violation
IllegalArgumentException - illegal argument
InvocationTargetException - invocation problem
public static boolean setProperty(Object object,
Method method,
Object objectValue,
boolean ignoreError)
throws IllegalAccessException,
IllegalArgumentException,
InvocationTargetException
object - object to set property onmethod - method to callobjectValue - value of the methodignoreError - true to ignore errors
IllegalAccessException - security violation
IllegalArgumentException - illegal argument
InvocationTargetException - invocation problem
public static int getInt(String stringValue,
int dflt)
stringValue - The integer string value.dflt - The dflt to return if the decode fails
public static boolean getBoolean(String stringValue,
boolean dflt)
stringValue - The boolean string value.dflt - The dflt to return if the decode fails
public static Vector toVector(Object[] objectArray)
objectArray - The array of objects.
public static List makeUnique(List l)
l - initial list
public static List toList(Object[] l)
l - The array of objects.
public static List toList(Enumeration enumeration)
enumeration - The enumeration
public static List newList(Object[] l)
l - The array of objects.
public static Object safeGet(List l,
int index)
l - Listindex - Index
public static List createIntervalList(int start,
int end,
int step)
start - The start valueend - The end value.step - The step
public static List sort(Collection listToSort)
listToSort - The list to sort.
public static List sortTuples(List pairs,
boolean ascending)
pairs - list to sortascending - true for ascending sort
public static Properties parseProperties(String propString)
propString - The property String.
public static Properties parseProperties(String propString,
String delimiter)
propString - The property String.delimiter - The delimiter between each name/value pair
public static String getProperty(Hashtable p,
String prop,
String dflt)
p - property tableprop - property to look up.dflt - default value
public static Color getProperty(Hashtable props,
String prop,
Color dflt)
props - properties tableprop - property namedflt - default color
public static boolean getProperty(Hashtable props,
String prop,
boolean dflt)
props - table of propertiesprop - property namedflt - default value
public static int getProperty(Hashtable props,
String prop,
int dflt)
props - table of propertiesprop - property namedflt - default value
public static float getProperty(Hashtable props,
String prop,
float dflt)
props - table of propertiesprop - property namedflt - default value
public static double getProperty(Hashtable props,
String prop,
double dflt)
props - the propsprop - the prop namedflt - the default value if none found
public static Properties readProperties(String filename,
Properties properties,
Class origin)
filename - The property filenameproperties - Where to put the properties.origin - Where to look for the properties file.
public static URL getURL(String name,
Class origin)
name - The resource nameorigin - Where to look.
public static String appendUrlArgs(String base,
String[] args)
base - The base of the url.args - The name/value pairs.
public static String appendUrlArgs(String base,
String[] args,
boolean addQuestionMark)
base - The base of the url.args - The name/value pairs. This may be null.addQuestionMark - Do we start by appending a "?"
public static String makeUrl(String protocol,
String server,
String urlRoot,
String[] args)
protocol - The url protocol.server - The server.urlRoot - The root of the url path.args - Any url arguments. This may be null.
public static void run(Runnable r)
Runnable.
r - Runnable to runrunInABit(long, java.lang.Object, java.lang.String, java.lang.Object)
public static void run(Object object,
String methodName)
object - The objectmethodName - The method
public static void run(Object object,
String methodName,
Object arg)
object - The objectmethodName - The methodarg - The arg
public static void runInABit(long ms,
Object object,
String methodName,
Object arg)
ms - delay (milliseconds)object - The objectmethodName - The methodarg - The arg
public static void runInABit(long ms,
Runnable r)
ms - delay (milliseconds)r - Runnable to run
public static String doPost(String action,
String data)
action - post actiondata - data to post
public static String doPost(String action,
String data,
String[] attrs)
action - post actiondata - data to postattrs - data attributes
public static Object[] doPostAndGetConnection(String action,
String data)
action - post actiondata - data to post
public static Object[] doPostAndGetConnection(String action,
String data,
String[] attrs)
action - post actiondata - data to postattrs - data attributes
public static String getValue(String key,
Hashtable props)
key - key for valueprops - property table to look up
nullpublic static String getUniqueId()
public static List addUnique(List dest,
List src,
Hashtable seen)
dest - The destination list.src - The list of objects to add if they are unique.seen - Keeps track of what objects we have seen.
public static List cloneList(List sourceList)
sourceList - The source list.
public static Hashtable newHashtable(Hashtable ht,
Object[] o)
ht - The hashtable to put the values into. If
null, we create a new one.o - The array of (key,value) objects.
public static Hashtable newHashtable(Object[] o)
o - The array of (key,value) objects.
public static Hashtable newHashtable(Object key1,
Object value1)
key1 - key for tablevalue1 - corresponding value
public static Hashtable newHashtable(Object key1,
Object value1,
Object key2,
Object value2)
key1 - first keyvalue1 - corresponding first valuekey2 - second keyvalue2 - corresponding second value
public static Hashtable newHashtable(Object key1,
Object value1,
Object key2,
Object value2,
Object key3,
Object value3)
key1 - first keyvalue1 - corresponding first valuekey2 - second keyvalue2 - corresponding second valuekey3 - third keyvalue3 - corresponding third value
public static Hashtable newHashtable(Object[] keys,
Object[] values)
keys - set of keysvalues - set of corresponding values
public static Object getLast(List l)
l - The list
public static void removeLast(List l)
l - the listpublic static List newList(Object o1)
o1 - object to add to list
object in it
public static List newList(Object o1,
Object o2)
o1 - first object to addo2 - second object to add
public static List newList(Object o1,
Object o2,
Object o3)
o1 - first object to addo2 - second object to addo3 - third object to add
public static List newList(Object o1,
Object o2,
Object o3,
Object o4)
o1 - first object to addo2 - second object to addo3 - third object to addo4 - fourth object to add
public static List newList(Object o1,
Object o2,
Object o3,
Object o4,
Object o5)
o1 - first object to addo2 - second object to addo3 - third object to addo4 - fourth object to addo5 - fifth object to add
public static boolean isHtml(String s)
s - String to check
public static boolean typesMatch(Class[] formals,
Class[] actuals)
formals - formal classes (types)actuals - actual classes
public static boolean typesMatchx(Class[] formals,
Class[] actuals)
formals - dummyactuals - dummy
public static Method findMethod(Class c,
String methodName,
Class[] paramTypes)
c - class to checkmethodName - name of methodparamTypes - parameter types
null if one doesn't existpublic static String getClassMethod(String path)
path - full path to check
public static List getIndexList(List values,
List allValues)
values - The values we look upallValues - The list that we look into
public static List getValuesFromIndices(List indices,
List allValues)
indices - A list of Integer indexes into the allValues list.allValues - The source of the values
public static Constructor findConstructor(Class c,
Class[] paramTypes)
c - class to checkparamTypes - constructor parameter classes
null if none match
public static String getSystemProperty(String key,
String dflt)
key - key for propertydflt - default value
public static byte[] serialize(Serializable object)
object - object to serialize
public static Object deserialize(byte[] bytes)
bytes - serialized object bytes
public static DecimalFormat getDecimalFormat(double v)
v - valut in question
public static String format(double value)
value - value to format
public static double parseValue(String value)
throws NumberFormatException
parseNumber(String)
value - String representation of a number. Use double since
that is the highest common denominator
NumberFormatException - unable to parse the value
public static double parseNumber(String value)
throws NumberFormatException
value - String representation of a number. Use double since
that is the highest common denominator
NumberFormatException - unable to parse the valuepublic static int hashcode(Object o1)
o1 - object in question
o1-s hashCode or 1 if o1 is null
public static boolean equals(Object o1,
Object o2)
o1 - first Object in questiono2 - second Object in question
public static boolean equalsIgnoreCase(Object o1,
Object o2)
o1 - first object to compareo2 - second object to compare
public static boolean haveSeen(Object o,
Hashtable map)
o - object in questionmap - map of seen objects
public static boolean haveNotSeen(Object o,
Hashtable map)
o - object in questionmap - map of seen objects
public static void printArray(String prefix,
Object[] array)
prefix - prefix to append to outputarray - array to print
public static void printArray(String prefix,
byte[] array)
prefix - prefix stringarray - array to print
public static void printArray(String prefix,
int[] array)
prefix - prefix stringarray - array to print
public static void printArray(String prefix,
float[] array)
prefix - prefix stringarray - array to print
public static void printArray(String prefix,
double[] array)
prefix - prefix stringarray - array to print
public static void printArray(String prefix,
boolean[] array)
prefix - prefix stringarray - array to printpublic static void printMembers(Object o)
o - Object in question
public static void printStack(String msg,
int maxLines,
String onlyIfTraceContainsThisString)
msg - message to printmaxLines - number of lines in the stack to printonlyIfTraceContainsThisString - if true, only print if it
contains this String
public static void printStack(String msg,
int maxLines)
msg - message to printmaxLines - number of lines in the stack to printpublic static void printStack(String msg)
msg - message to printpublic static long usedMemory()
public static long gc()
usedMemory()public static void sleepSeconds(long seconds)
seconds - seconds to pausepublic static void sleep(long ms)
ms - milliseconds to pausepublic static void fatal(Throwable exc)
exc - exception that was thrownpublic static void fatal(String msg)
msg - message to printpublic static float[] toFloat(double[] d)
d - double array
public static double[] toDouble(float[] d)
d - double array
public static double[][] toDouble(int[][] d)
d - input
public static double[] toDouble(int[] d)
d - input
public static double[] arrayToDouble(float[] d)
d - float array
public static float[][] toFloat(double[][] d)
d - input
public static double[][] toDouble(float[][] d)
d - input
public static double parseDouble(String s)
s - parse the String representation of a double, must
conform to the form of a floating point number as
defined in 3.10.2 of the Java Language Specification.
public static float getAverage(float[] values)
values - values to average
public static float parseFloat(String s)
s - parse the String representation of a float, must
conform to the form of a floating point number as
defined in 3.10.2 of the Java Language Specification.
public static double[] parseDoubles(String sourceString)
sourceString - The comma separated list.
public static double[] parseDoubles(String sourceString,
String delimiter)
delimiter separated list
of doubles. This method parses this String, converting it into an
array of doubles.
sourceString - The comma separated list.delimiter - delimiter between values
public static double[] parseLatLons(String sourceString)
sourceString - The comma separated list.
public static double[] parseLatLons(String sourceString,
String delimiter)
delimiter separated list
of lats or lons. This method parses this String, converting it into an
array of doubles.
sourceString - The comma separated list.delimiter - delimiter between values
public static float[] parseFloats(String sourceString)
sourceString - The comma separated list.
public static float[] parseFloats(String sourceString,
String delimiter)
delimiter separated list
of doubles. This method parses this String, converting it into an
array of floats.
sourceString - The comma separated list.delimiter - delimiter between values
public static int[] parseInts(String sourceString,
String delimiter)
delimiter separated list
of doubles. This method parses this String, converting it into an
array of ints.
sourceString - The comma separated list.delimiter - delimiter between values
public static double normalizeLongitude(double lonValue)
lonValue - longitude value to adjust (in degrees)
public static double[] computeTicks(double high,
double low,
double base,
double interval)
high - highest value of rangelow - low value of rangebase - base value for centering ticksinterval - interval between ticks
public static float[] computeTicks(float high,
float low,
float base,
float interval)
high - highest value of rangelow - low value of rangebase - base value for centering ticksinterval - interval between ticks
public static double computeTickSpacing(double min,
double max)
min - minimum value in rangemax - maximum value in range
public static Hashtable createLabelTable(double max,
double min,
double base,
double increment)
max - highest value of rangemin - low value of rangebase - base value for centering ticksincrement - interval between ticks
public static void print(List l)
l - List to print
public static boolean containsString(String string,
List objects,
boolean lowerCase)
string - the string to search forobjects - the list of objectslowerCase - check case insensibly
public static boolean contains(Object object,
Object[] array)
object - THe objectarray - The array
public static int indexOf(Object object,
Object[] array)
object - THe objectarray - The array
public static boolean allStrings(List listToCheck)
listToCheck - List to Check
public static boolean hasSuffix(String fileOrUrl,
String suffix)
fileOrUrl - The name of the file or urlsuffix - The suffix
public static boolean isTextFile(String filename)
filename - The filename to check.
public static boolean isImageFile(String filename)
filename - The filename to check.
public static boolean isHtmlFile(String filenameOrUrl)
filenameOrUrl - The filename to check.
public static InputStream getInputStream(String filename)
throws FileNotFoundException,
IOException
filename - name of file
FileNotFoundException - couldn't find the file
IOException - problem opening stream
public static InputStream getInputStream(String filename,
Class origin)
throws FileNotFoundException,
IOException
filename - name of fileorigin - relative origin point for file location
FileNotFoundException - couldn't find the file
IOException - problem opening stream
public static String readContents(File file)
throws FileNotFoundException,
IOException
file - file to read.
FileNotFoundException - couldn't find the file
IOException - problem opening stream
public static String readContents(String contentName,
String dflt)
contentName - URL or filenamedflt - default to return if a problem
public static String readContents(String contentName)
throws FileNotFoundException,
IOException
contentName - can either be a URL, a filename or a resource.
null if there is a problem.
FileNotFoundException - couldn't find the file
IOException - problem reading contents
public static String readContents(String contentName,
Class origin)
throws FileNotFoundException,
IOException
contentName - can either be a URL, a filename or a resource.origin - relative origin for path to file
null if there is a problem.
FileNotFoundException - couldn't find the file
IOException - problem reading contents
public static String readContents(InputStream is)
throws IOException
is - InputStream to read from
IOException - problem reading contents
public static byte[] readBytes(InputStream is)
throws IOException
is - InputStream to read from
IOException - problem reading contents
public static byte[] readBytes(InputStream is,
Object loadId)
throws IOException
is - InputStream to read fromloadId - loadid
IOException - problem reading contentspublic static File getMostRecentFile(File dir)
dir - The directory to search in.
public static File getMostRecentFile(File dir,
FileFilter filter)
dir - The directory to search in.filter - The FileFilter to be used to limit what files we look at (may be null).
public static File[] sortFilesOnAge(File directory,
FileFilter filter,
boolean youngestFirst)
directory - The directoryfilter - The filteryoungestFirst - Ascending or descending
public static File[] sortFilesOnAge(File[] files,
boolean youngestFirst)
files - The filesyoungestFirst - Ascending or descending
public static File[] toFiles(List files)
files - List of files
public static FileFilter wrapFilter(FileFilter filter)
filter - The filechooser file filter
public static File getMostRecentFile(File dir,
FileFilter filter)
dir - The directory to search in.filter - The filter to be used to limit what files we look at (may be null).
public static String getFileTail(String f)
f - The file path.
public static String getFileRoot(String f)
f - The file path.
public static String stripExtension(String f)
f - The file path.
public static String cleanFileName(String name)
name - The filename to be cleaned up
public static String getFileExtension(String f)
f - The file path.
public static void writeFile(String filename,
String contents)
throws FileNotFoundException,
IOException
filename - filename to write tocontents - file contents
FileNotFoundException - if the file does not exist
IOException - if there is a problem writing
public static void writeFile(File filename,
String contents)
throws FileNotFoundException,
IOException
filename - File to write tocontents - file contents
FileNotFoundException - if the file does not exist
IOException - if there is a problem writing
public static void writeBytes(File filename,
byte[] contents)
throws FileNotFoundException,
IOException
File specified.
filename - File to write tocontents - file contents
FileNotFoundException - if the file does not exist
IOException - if there is a problem writing
public static String readFile(String filename,
Class origin,
String dflt)
filename - file nameorigin - anchor point for relative location of filedflt - default to return
dflt
public static String readFile(String filename,
Class origin)
throws FileNotFoundException,
IOException
filename - file nameorigin - anchor point for relative location of file
FileNotFoundException - if the file does not exist
IOException - if there is a problem writing
public static void moveFile(File from,
File to)
throws FileNotFoundException,
IOException
from - File to moveto - The destination
FileNotFoundException - When we cannot find the file
IOException - When something untoward happens
public static void copyFile(File from,
File to)
throws FileNotFoundException,
IOException
from - File to copyto - The destination
FileNotFoundException - When we cannot find the file
IOException - When something untoward happens
public static String joinDir(String f1,
String f2)
f1 - directory pathf2 - filename
public static String joinDir(File f1,
String filename)
f1 - directory pathfilename - filename
public static String makeDir(String path)
path - directory to make
public static String makeDir(File f)
f - directory as a file
public static List getDirectories(File dir,
boolean recurse)
dir - The directory to look atrecurse - Do we recurse
public static List getDirectories(List dirs,
boolean recurse)
dirs - List of directories to look atrecurse - Do we recurse
public static void pruneEmptyDirectories(File root)
root - Directory to prunepublic static void deleteDirectory(File root)
root - root
public static Object findMatch(String source,
List patternList,
Object dflt)
source - Source String to match on.patternList - List of objects whose toString is the pattern.dflt - The default if nothing matches.
public static Object findMatch(String source,
List patternList,
List results,
Object dflt)
source - Source String to match on.patternList - List of objects whose toString is the pattern.results - The list of return objects.dflt - The default if nothing matches.
public static boolean containsRegExp(String patternString)
patternString - pattern string to check
public static boolean stringMatch(String input,
String patternString)
input - The input source string.patternString - The regular expression pattern.
public static boolean stringMatch(String input,
String patternString,
boolean substring,
boolean caseSensitive)
input - The input source string.patternString - The regular expression pattern.substring - Search for substringscaseSensitive - Is case sensitive
public static boolean startsWithVowel(String value)
value - String to check
public static String breakText(String text,
String insert,
int lineSize)
text - The text to convertinsert - string to insertlineSize - line size to insert at
public static String stripTags(String html)
html - The source html string.
public static String removeWhitespace(String inputString)
inputString - The string to remove the whitespace.
public static String zeroString(int value)
value - The value.
public static String padZero(int value,
int numDigits)
value - The value.numDigits - number of digits
public static String padLeft(String s,
int desiredLength)
s - String to paddesiredLength - ending length
public static String padLeft(String s,
int desiredLength,
String padString)
s - String to paddesiredLength - ending lengthpadString - String to pad with (e.g, " ")
public static String padRight(String s,
int desiredLength)
s - String to paddesiredLength - ending length
public static String padRight(String s,
int desiredLength,
String padString)
s - String to paddesiredLength - ending lengthpadString - String to pad with (e.g, " ")
public static String join(String[] args)
args - An array of Strings to merge.
public static String join(String delimiter,
Object[] args)
delimiter - The delimiter.args - An array of Strings to merge.
public static String join(String delimiter,
Object[] args,
boolean ignoreEmptyStrings)
delimiter - The delimiter.args - An array of Strings to merge.ignoreEmptyStrings - Don't join empty strings
public static String join(String delimiter,
List args)
delimiter - The delimiter.args - A List of objects whose toString value are merged.
public static String join(String delimiter,
List args,
boolean ignoreEmptyStrings)
delimiter - The delimiter.args - A List of objects whose toString value are merged.ignoreEmptyStrings - Should ignore empty strings
public static List split(Object source)
source - The source object string.
public static List parseLineWords(String content,
int[] indices,
int[] lengths,
String lineDelimiter,
String commentString,
boolean trimWords)
content - The String to parseindices - the index in the line which defines the word start.lengths - the length of each word.lineDelimiter - What to split the line content string on (usually "\n").commentString - If non-null defines the comment String in the content.trimWords - Do we trim each word.
public static List split(Object source,
String delimiter)
source - The source object string.delimiter - The delimiter to break up the sourceString on.
public static List split(Object source,
String delimiter,
boolean trim)
source - The source object string.delimiter - The delimiter to break up the sourceString on.trim - Do we string trim the tokens.
public static List split(Object source,
String delimiter,
boolean trim,
boolean excludeZeroLength)
source - The source object string.delimiter - The delimiter to break up the sourceString on.trim - Do we string trim the tokens.excludeZeroLength - If true then don't add in zero length strings.
public static String[] split(String s,
String delimiter,
int cnt)
s - String to splitdelimiter - token delimetercnt - max number of tokens
null if unable to split
the string.public static String[] listToStringArray(List objectList)
objectList - The list of objects.
public static String listToString(List l)
l - list of objects
public static List toString(List l)
l - List of objects
public static String replace(String string,
String pattern,
String value)
string - string to mungepattern - pattern to replacevalue - replacement value
public static String replaceList(String v,
String[] patterns,
String[] values)
v - original Stringpatterns - patterns to matchvalues - replacement values
public static String replaceList(String v,
List patterns,
List values)
v - original Stringpatterns - patterns to matchvalues - replacement values
public static List replaceList(List sourceList,
String[] patterns,
String[] values)
sourceList - original list of Stringspatterns - patterns to replacevalues - replacement values
public static StringBuffer append(StringBuffer sb,
Object s1)
sb - StringBuffer to append to (may be null)s1 - object to append
public static StringBuffer append(StringBuffer sb,
Object s1,
Object s2)
sb - StringBuffer to append to (may be null)s1 - first object to appends2 - second object to append
public static StringBuffer append(StringBuffer sb,
Object s1,
Object s2,
Object s3)
sb - StringBuffer to append to (may be null)s1 - first object to appends2 - second object to appends3 - third object to append
public static StringBuffer append(StringBuffer sb,
Object s1,
Object s2,
Object s3,
Object s4)
sb - StringBuffer to append to (may be null)s1 - first object to appends2 - second object to appends3 - third object to appends4 - fourth object to append
public static StringBuffer append(StringBuffer sb,
Object s1,
Object s2,
Object s3,
Object s4,
Object s5)
sb - StringBuffer to append to (may be null)s1 - first object to appends2 - second object to appends3 - third object to appends4 - fourth object to appends5 - fifth object to append
public static List parseCsv(String s,
boolean skipFirst)
s - String to parseskipFirst - true to skip the first value
public static final String shorten(String s,
int length)
s - String to shortenlength - shortened length where elipses will start
public static String toString(Object[] array)
array - array to print
public static void addClassLoader(ClassLoader cl)
cl - The class loaderpublic static List<ClassLoader> getClassLoaders()
public static Class findClass(String className)
throws ClassNotFoundException
className - The class name
ClassNotFoundException - When the className could not be foundpublic static long getPauseEveryTime(int minutesDelta)
minutesDelta - time to wait for
public static void pauseEvery(int minutesDelta)
minutesDelta - number of minutespublic static float[][] cloneArray(float[][] a)
a - array to clone
public static float[] reverseArray(float[] a)
a - input array
public static float[][] subtractArray(float[][] a,
float[][] b,
float[][] c)
a - the arrayb - the the other arrayc - the return array
public static float[][] addArray(float[][] a,
float[][] b,
float[][] c)
a - the arrayb - the the other arrayc - the return array
public static float[] getRange(float[][] a)
a - arrays of values
public static float[][] getRanges(float[][] a)
a - arrays of values
public static void fillArray(float[][] a,
float value)
a - arrayvalue - valuepublic static double[][] cloneArray(double[][] a)
a - array to clone
public static boolean arraysEquals(double[] a,
double[] b)
a - array 1b - array 2
public static boolean arraysEquals(int[] a,
int[] b)
a - array 1b - array 2
public static boolean arraysEquals(float[] a,
float[] b)
a - array 1b - array 2
public static boolean arraysEquals(String[] a,
String[] b)
a - array 1b - array 2
public static boolean arraysEquals(float[][] a,
float[][] b)
a - array 1b - array 2
public static boolean arraysEquals(double[][] a,
double[][] b)
a - array 1b - array 2
public static boolean arraysEquals(int[][] a,
int[][] b)
a - array 1b - array 2
public static boolean arraysEquals(int[][][] a,
int[][][] b)
a - array 1b - array 2
public static float[] merge(float[] a,
float[] b)
a - array 1b - array 2
public static float[] interpolate(int cnt,
float start,
float end)
cnt - number of pointsstart - start valueend - end value
public static float[][] copy(float[][] pts,
int pointCnt)
pts - the inputpointCnt - the number of points to copy
public static float[][] expand(float[][] pts)
pts - the points
public static Runnable getRunnable()
public static void printBits(int b)
b - the integerpublic static String getStackTrace()
public static String getStackTrace(Throwable exc)
exc - The exception to get the trace from
public static void main(String[] args)
args - ignored
public static int[] find(int value,
int[] array)
value - the value to look forarray - the array
public static int[] find(float value,
float[] array)
value - the value to look forarray - the array
public static int[] find(double value,
double[] array)
value - the value to look forarray - the array
public static boolean isNaN(float[][] values)
values - the array values
public static boolean isNaN(double[][] values)
values - array values
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||