|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJava.misc.Misc
public class Misc
Constructor Summary | |
---|---|
Misc()
|
Method Summary | |
---|---|
static double |
getDouble(java.lang.String s,
int line_no)
Reads a real number from a String in an input file on line line_no |
static int |
getInteger(java.lang.String s,
int line_no)
returns index after underscore in string s if s ends with underscore, return -1 |
static int[] |
getIntegers(java.lang.String s,
int line_no)
returns 2 integer indeces after underscore in string s |
static double |
Round(double d,
int Ndec)
Round to a double to Ndec decimals |
static java.lang.String[] |
split(java.lang.String s,
int line_no,
int debug)
Split an input String at spaces, return array of Strings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Misc()
Method Detail |
---|
public static double Round(double d, int Ndec)
d
- the input real valueNdec
- number of decimals
public static java.lang.String[] split(java.lang.String s, int line_no, int debug)
s
- the input Stringline_no
- row number in input filedebug
- debug level, 0=no output, 1=average, 2=much
public static int getInteger(java.lang.String s, int line_no)
public static int[] getIntegers(java.lang.String s, int line_no)
public static double getDouble(java.lang.String s, int line_no)
s
- input String representing a double valueline_no
- current row in input file
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |