public class Utils
extends java.lang.Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getIndex(java.lang.String[] strings,
java.lang.String string)
Get the position (index) of a particular string in a Strings array.
|
static float |
round(float value,
int digits)
Rounds a float number to the specified number of decimal digits
|
static int |
search(java.util.ArrayList<java.lang.String> src,
java.util.ArrayList<java.lang.String> pattern,
int start)
Searches an ArrayList of Strings starting from a specific position for a pattern
|
static java.util.ArrayList<java.lang.String> |
split_string(java.lang.String input,
java.lang.String delim)
Splits a string into an ArrayList of Strings based on a text delimiter
|
static java.lang.String[] |
toStringArray(java.util.HashMap<java.lang.String,java.lang.Integer> syms)
Convert a HashMap
|
public static java.util.ArrayList<java.lang.String> split_string(java.lang.String input,
java.lang.String delim)
input - the string to splitdelim - the text delimiterpublic static int search(java.util.ArrayList<java.lang.String> src,
java.util.ArrayList<java.lang.String> pattern,
int start)
src - the input ArrayList of Stringspattern - the pattern to search forstart - the starting positionpublic static float round(float value,
int digits)
value - the float numbe to rounddigits - the number of digitspublic static int getIndex(java.lang.String[] strings,
java.lang.String string)
strings - the Strings arraystring - the string to searchpublic static java.lang.String[] toStringArray(java.util.HashMap<java.lang.String,java.lang.Integer> syms)
syms - the input HashMap