Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.astro.louisville.edu/software/astroimagej/imagej/api/ij/util/Tools.html
Дата изменения: Thu Dec 2 23:03:11 2010 Дата индексирования: Mon Oct 1 21:36:05 2012 Кодировка: Поисковые слова: winter solstice |
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ij.util.Tools
public class Tools
This class contains static utility methods.
Field Summary | |
---|---|
static char[] |
hexDigits
This array contains the 16 hex digits '0'-'F'. |
Constructor Summary | |
---|---|
Tools()
|
Method Summary | |
---|---|
static java.lang.String |
c2hex(java.awt.Color c)
Converts a Color to an 7 byte hex string starting with '#'. |
static java.lang.String |
f2hex(float f)
Converts a float to an 9 byte hex string starting with '#'. |
static java.lang.String |
fixNewLines(java.lang.String s)
Converts carriage returns to line feeds. |
static int |
getDecimalPlaces(double n1,
double n2)
Returns the number of decimal places need to display two numbers. |
static double[] |
getMinMax(double[] a)
|
static double[] |
getMinMax(float[] a)
|
static double |
parseDouble(java.lang.String s)
Returns a double containg the value represented by the specified String . |
static double |
parseDouble(java.lang.String s,
double defaultValue)
Returns a double containg the value represented by the specified String . |
static java.lang.String[] |
split(java.lang.String str)
Splits a string into substrings using the default delimiter set, which is " \t\n\r" (space, tab, newline and carriage-return). |
static java.lang.String[] |
split(java.lang.String str,
java.lang.String delim)
Splits a string into substring using the characters contained in the second argument as the delimiter set. |
static double[] |
toDouble(float[] a)
Converts the float array 'a' to a double array. |
static float[] |
toFloat(double[] a)
Converts the double array 'a' to a float array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char[] hexDigits
Constructor Detail |
---|
public Tools()
Method Detail |
---|
public static java.lang.String c2hex(java.awt.Color c)
public static java.lang.String f2hex(float f)
public static double[] getMinMax(double[] a)
public static double[] getMinMax(float[] a)
public static double[] toDouble(float[] a)
public static float[] toFloat(double[] a)
public static java.lang.String fixNewLines(java.lang.String s)
public static double parseDouble(java.lang.String s, double defaultValue)
String
.
s
- the string to be parsed.defaultValue
- the value returned if s
does not contain a parsable double
defaultValue
if the string does not contain a parsable doublepublic static double parseDouble(java.lang.String s)
String
.
s
- the string to be parsed.
public static int getDecimalPlaces(double n1, double n2)
public static java.lang.String[] split(java.lang.String str)
public static java.lang.String[] split(java.lang.String str, java.lang.String delim)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |