com.planet_ink.coffee_mud.core
Class CMParms

java.lang.Object
  extended by com.planet_ink.coffee_mud.core.CMParms

public class CMParms
extends java.lang.Object

This singleton contains methods for parsing user input and arguments to behaviors and properties. This library also has methods for reconstructing parseable user input from previously parsed input. It is: the Parameter Parsing Library for CoffeeMud.


Nested Class Summary
static class CMParms.DelimiterChecker
          An overrideable class for supplying a delimiter determination tool
 
Field Summary
static java.lang.String FORMAT_EMPTY
          constant value representing an always empty miscText/parms format.
static java.lang.String FORMAT_UNDEFINED
          constant value representing an undefined/unimplemented miscText/parms format.
static boolean[] PUNCTUATION_TABLE
           
static CMParms.DelimiterChecker spaceDelimiter
          Example delimeter checker for spaces
 
Method Summary
static java.lang.String[] appendToArray(java.lang.String[] front, java.lang.String[] back)
          Appends the given two arrays together.
static java.lang.String cleanBit(java.lang.String s)
          This method removes any surrounding single quotes or spaces, and replaces any remaining single quotes with input-friendly fake single quotes (`).
static java.util.List<java.lang.String> cleanParameterList(java.lang.String str)
          Parses the given string space-delimited, with respect for quoted strings.
static boolean[] combine(boolean[] strs1, boolean[] strs2)
          Combine two boolean arrays into a single one.
static int[] combine(int[] strs1, int[] strs2)
          Combine two int arrays into a single one.
static java.lang.String combine(java.util.List<?> commands)
          Returns a string containing the given objects, with toString() called, and now space delimited.
static java.lang.String combine(java.util.List<?> commands, int startAt)
          Returns a string containing the given objects, with toString() called, and now space delimited.
static java.lang.String combine(java.util.List<?> commands, int startAt, int endAt)
          Returns a string containing the given objects, with toString() called, and now space delimited.
static java.lang.Object[] combine(java.lang.Object[]... objs)
          Combine object arrays into a single one.
static java.lang.String combine(java.util.Set<?> flags)
          Returns a string containing the given objects, with toString() called, and now space delimited.
static java.lang.String[] combine(java.lang.String[] strs1, java.lang.String[] strs2)
          Combine two string arrays into a single one.
static java.lang.String combineEQParms(java.util.Map<java.lang.String,?> parms, char delimiter)
          Given a key/value parameter map, returns a string that is reparseable in a given delimited way as KEY=VLUE, adding double quotes if any value has the delimiter.
static java.lang.String combineQuoted(java.util.List<?> commands, int startAt)
          Returns a string containing the given objects, with toString() called, and now delimited by spaces.
static java.lang.String combineQuoted(java.util.List<?> commands, int startAt, int endAt)
          Returns a string containing the given objects, with toString() called, and now space delimited.
static java.lang.String combineWith(java.util.List<?> commands, char withChar)
          Returns a string containing the given objects, with toString() called, and now delimited by the character given.
static java.lang.String combineWith(java.util.List<?> commands, char withChar, int startAt, int endAt)
          Returns a string containing the given objects, with toString() called, and now delimited by the character given.
static java.lang.String combineWith(java.util.List<?> commands, java.lang.String withSeparator)
          Returns a string containing the given objects, with toString() called, and now delimited by the string given.
static java.lang.String combineWith(java.util.Set<?> commands, char withChar)
          Returns a string containing the given objects, with toString() called, and now delimited by the character given.
static java.lang.String combineWith(java.util.Set<?> commands, java.lang.String withSeparator)
          Returns a string containing the given objects, with toString() called, and now delimited by the string given.
static java.lang.String combineWithTabs(java.util.List<?> commands, int startAt)
          Returns a string containing the given objects, with toString() called, and now delimited by tab characters.
static java.lang.String combineWithX(java.util.List<?> commands, char delimiter, int startAt)
          Returns a string containing the given objects, with toString() called, and now delimited by the given X character.
static java.lang.String combineWithX(java.util.List<?> commands, java.lang.String delimiter, int startAt)
          Returns a string containing the given objects, with toString() called, and now delimited by the given X string.
static java.lang.String combineWSpaces(java.lang.Object[] commands)
          Returns a string containing the given object, with toString() called, and now space delimited.
static boolean compareRange(java.nio.ByteBuffer buf, byte[] bytes, int pos)
          Returns true if the given bytebuffer, starting at the given pos, is the same as the given byte array.
static int containIndex(java.nio.ByteBuffer buf, byte[][] bytes, int pos)
          Compares the given bytebuffer, starting at the given pos, with each byte array in the given byte array array, and returns the top level index of which byte array matches the bytebuffer at that position.
static boolean contains(byte[] theList, byte b)
          Returns whether the given byte appears in the given list.
static boolean contains(char[] theList, char c)
          Returns whether the given char appears in the given list.
static boolean contains(java.util.Enumeration<java.lang.String> e, java.lang.String str)
          Returns whether the given string appears in the given enumeration of strings.
static boolean contains(int[] theList, int x)
          Returns whether the given int appears in the given list.
static boolean contains(int[] theList, int[] xs)
          Returns whether any of the given ints appears in the given list.
static boolean contains(java.lang.Object[] theList, java.lang.Object obj)
          Returns whether the given Object appears in the given list.
static boolean contains(java.lang.Object[] theList, java.lang.Object[] objs)
          Returns whether any of the given given Objects appears in the given list.
static boolean contains(java.lang.String[] theList, java.lang.String str)
          Returns whether the given string appears in the given list.
static boolean containsAsString(java.lang.Object[] theList, java.lang.Object obj)
          Returns whether the given Object appears in the given list, after calling toString on both the list object and the given object
static boolean containsIgnoreCase(java.util.List<?> theList, java.lang.String str)
          Returns whether the given string appears in the given list.
static boolean containsIgnoreCase(java.lang.String[] theList, java.lang.String str)
          Returns whether the given string appears in the given list.
static java.util.List<java.lang.Object> copyFlattenList(java.util.List<?> V)
          Flattens the given list by returning a new list will all of the objects in it.
static CMParms.DelimiterChecker createDelimiter(char[] chars)
          Create a DelimiterChecker from the given set of characters that will be the delimiters.
static java.lang.String delParmLong(java.lang.String text, java.lang.String key)
          This method is a sloppy, forgiving method removing KEY=VALUE value pair from a string.
static java.lang.String delParmStr(java.lang.String text, java.lang.String key)
          This method is a sloppy, forgiving method removing KEY=VALUE value pair from a string.
static boolean endsAnyWith(java.lang.String[] theList, java.lang.String str)
          Returns true if any string in string array ends with the given string.
static boolean endsAnyWithIgnoreCase(java.lang.String[] theList, java.lang.String str)
          Returns true if any string in string array ends with the given string.
static int endsWith(java.lang.String[] theList, java.lang.String str)
          Returns the index of the string in the string array that ends with the given string.
static int endsWithIgnoreCase(java.lang.String[] theList, java.lang.String str)
          Returns the index of the string in the string array that ends with the given string.
static boolean equals(byte[] x, int i, byte[] y)
          Returns whether given bytes in the given array at the given index are the same as the bytes in the other given array
static java.lang.String getBit(java.lang.String s, int which)
          Returns the string bit at the given 0-based index, which may still have its single quotes surrounding it.
static java.lang.String getCleanBit(java.lang.String s, int which)
          Returns the string bit at the given 0-based index, cleaned of quotes.
static boolean getParmBool(java.lang.String text, java.lang.String key, boolean defaultValue)
          This method is a sloppy, forgiving method doing KEY=VALUE value searches in a string.
static boolean getParmCompare(java.lang.String text, java.lang.String key, int value, char[] comparatorFound)
          This method is a sloppy, forgiving method doing KEY>=[VALUE] value searches in a string.
static double getParmDouble(java.lang.String text, java.lang.String key, double defaultValue)
          This method is a sloppy, forgiving method doing KEY=VALUE value searches in a string.
static double getParmDoublePlus(java.lang.String text, java.lang.String key)
          This method is a sloppy, forgiving method doing KEY+[DBL] or KEY-[DBL] value searches in a string.
static int getParmInt(java.lang.String text, java.lang.String key, int defaultValue)
          This method is a sloppy, forgiving method doing KEY=VALUE value searches in a string.
static long getParmLong(java.lang.String text, java.lang.String key, long defaultValue)
          This method is a sloppy, forgiving method doing KEY=VALUE value searches in a string.
static int getParmPlus(java.lang.String text, java.lang.String key)
          This method is a sloppy, forgiving method doing KEY+[INT] or KEY-[INT] value searches in a string.
static java.lang.String getParmStr(java.lang.String text, java.lang.String key, java.lang.String defaultVal)
          This method is a sloppy, forgiving method doing KEY=VALUE value searches in a string.
static java.lang.String getPastBit(java.lang.String s, int which)
          Returns the remainder of the string after the string bit at the given 0-based index, which may still have single quotes.
static java.lang.String getPastBitClean(java.lang.String s, int which)
          Returns the remainder of the string after the string bit at the given 0-based index, cleaned of quotes.
static int indexOf(byte[] theList, byte x)
          Returns the index of the given byte in the given array.
static int indexOf(byte[] theList, byte[] x)
          Returns the index of the given bytes in the given array.
static int indexOf(byte[] theList, byte[] x, int startIndex)
          Returns the index of the given bytes in the given array.
static int indexOf(byte[] theList, byte x, int startIndex)
          Returns the index of the given byte in the given array.
static int indexOf(java.util.Enumeration<?> e, java.lang.Object key)
          Iterates through the given enumeration, returning which the number of times it must be iterated through before the given object is found
static int indexOf(int[] theList, int x)
          Returns the index of the given number in the given array.
static int indexOf(int[] theList, int x, int startIndex)
          Returns the index of the given number in the given array.
static int indexOf(java.util.Iterator<?> i, java.lang.Object key)
          Iterates through the given Iterator, returning which the number of times it must be iterated through before the given object is found
static int indexOf(java.util.List<?> theList, java.lang.Object obj, int startIndex)
          Returns the index of the given Object appears in the given list.
static int indexOf(long[] theList, long x)
          Returns the index of the given number in the given array.
static int indexOf(long[] theList, long x, int startIndex)
          Returns the index of the given number in the given array.
static int indexOf(java.lang.Object[] theList, java.lang.Object obj)
          Returns the index of the given Object appears in the given list.
static int indexOf(java.lang.Object[] theList, java.lang.Object obj, int startIndex)
          Returns the index of the given Object appears in the given list.
static int indexOf(java.lang.String[] stringList, java.lang.String str)
          Returns the index of the given string in the given string array.
static int indexOf(java.lang.String[] stringList, java.lang.String str, int startIndex)
          Returns the index of the given string in the given string array.
static int indexOfAsString(java.lang.Object[] theList, java.lang.Object obj)
          Returns the index of the given Object appears in the given list, after calling toString on both the obj given and the list Object.
static int indexOfEndsWith(java.lang.String[] stringList, java.lang.String str)
          Returns the index of the string in the given string array that ends with the given one.
static int indexOfFirst(int[] theList, int[] xs)
          Returns the index of the first of the given numbers in the given array.
static int indexOfFirst(java.lang.Object[] theList, java.lang.Object[] objs)
          Returns the index of the first of the given Objects in the given array.
static int indexOfIgnoreCase(java.util.Enumeration<?> e, java.lang.String str)
          Iterates through the given enumeration, returning which the number of times it must be iterated through before the given string is found by calling toString() on each object, and comparing their case insensitive values.
static int indexOfIgnoreCase(java.util.Iterator<?> i, java.lang.String str)
          Iterates through the given Iterator, returning which the number of times it must be iterated through before the given string is found by calling toString() on each object, and comparing their case insensitive values.
static int indexOfIgnoreCase(java.util.List<?> theList, java.lang.String str)
          Returns the index of the given string in the list by calling toString() and comparing their case insensitive values.
static int indexOfIgnoreCase(java.lang.Object[] stringList, java.lang.String str)
          Returns the index of the given string in the given string array.
static int indexOfIgnoreCase(java.lang.String[] stringList, java.lang.String str)
          Returns the index of the given string in the given string array.
static int indexOfStartsWith(java.lang.String[] stringList, java.lang.String str)
          Returns the index of the string in the given string array that starts with the given one.
static CMParms instance()
           
static int numBits(java.lang.String s)
          Returns the number of MOBPROG 'Bits' in this string.
static int numContains(byte[] theList, byte x)
          Returns the number of the given items in the given array It is case sensitive.
static int numContains(int[] theList, int x)
          Returns the number of the given items in the given array It is case sensitive.
static int numContains(java.util.List<?> theList, java.lang.Object obj)
          Returns the number of the given items in the given array It is case sensitive.
static int numContains(long[] theList, long x)
          Returns the number of the given items in the given array It is case sensitive.
static int numContains(java.lang.Object[] theList, java.lang.Object obj)
          Returns the number of the given items in the given array It is case sensitive.
static int numContains(java.lang.String[] theList, java.lang.String str)
          Returns the number of the given items in the given array It is case sensitive.
static java.util.Vector<java.lang.String> parse(java.lang.String str)
          Parses the given string space-delimited, with respect for quoted strings.
static java.util.List<java.lang.String> parseAny(java.lang.String s, char delimiter, boolean ignoreNulls)
          Parses the given string by the given delimiter.
static java.util.List<java.lang.String> parseAny(java.lang.String s, java.lang.String delimeter, boolean ignoreNulls)
          Parses the given string by the given delimiter.
static java.util.List<java.lang.String> parseAnyIgnoreCase(java.lang.String s, java.lang.String delimeter, boolean ignoreNulls)
          Parses the given string by the given delimiter, ignoring the delimeter case.
static java.util.List<java.lang.String> parseCommandFlags(java.lang.String s, java.lang.String[] flags)
          Returns a list of those flag strings that appear in the given string.
static java.util.List<java.lang.String> parseCommas(java.lang.String s, boolean ignoreNulls)
          Parses the given string comma-delimited.
static java.util.List<java.util.List<java.lang.String>> parseDoubleDelimited(java.lang.String text, char delim1, char delim2)
          Parses the given string into a two-dimensional list, using the two given delimiters
static java.util.List<java.lang.Enum<? extends java.lang.Enum>> parseEnumList(java.lang.Class<? extends java.lang.Enum> c, java.lang.String s, char delim)
          Parses the given string comma-delimited for the given enum obj names.
static java.util.Map<java.lang.String,java.lang.String> parseEQParms(java.util.List<java.lang.String> parms, int start, int end)
          Parses the given strings in the given string list for [PARAM]=[VALUE] or [PARAM]="[VALUE]" formatted key/pairv values in space-delimited fashion, respecting quotes value.
static java.util.Map<java.lang.String,java.lang.String> parseEQParms(java.lang.String parms)
          Parses the given string for [PARAM]=[VALUE] or [PARAM]="[VALUE]" formatted key/pair values in space-delimited fashion, respecting quotes value.
static java.util.Map<java.lang.String,java.lang.String> parseEQParms(java.lang.String parms, CMParms.DelimiterChecker delimiterCheck, boolean upperCase)
          Parses the given string for [PARAM]=[VALUE] or [PARAM]="[VALUE]" formatted key/pair values in given-delimited fashion, respecting quotes value.
static java.util.Map<java.lang.String,java.lang.String> parseEQParms(java.lang.String str, java.lang.String[] parmList)
          Parses the given string for [PARAM]=[VALUE] or [PARAM]="[VALUE]" formatted key/pair values, relying on the given parmList to provide possible [PARAM] values.
static int[] parseIntList(java.lang.String s, char delim)
          Parses the given string comma-delimited for an int array
static java.util.Map<java.lang.String,java.lang.String> parseKeyValueSlashListString(java.lang.String s)
          Parses the given string of the form KEY=VALUE/KEY=VALUE/etc into a new String key/value map.
static java.util.List<java.lang.String> parseSafeSemicolonList(java.lang.String list, boolean ignoreNulls)
          Parses the given semicolon-delimited list of strings and returns the list as a list.
static byte[] parseSemicolonByteList(java.lang.String str)
          Returns a byte array made from the semicolon-delimited list of numeric values in the given string.
static java.util.List<java.lang.String> parseSemicolons(java.lang.String s, boolean ignoreNulls)
          Parses the given string semicolon-delimited.
static java.util.List<java.lang.String> parseSentences(java.lang.String s)
          Parses the given string period-delimited.
static java.util.List<Pair<java.lang.String,java.lang.String>> parseSpaceParenList(java.lang.String list)
          This method is for parsing space-delimited lists of ids, with optional parameters in parenthis after the id.
static java.util.List<java.lang.String> parseSpaces(java.lang.String s, boolean ignoreNulls)
          Parses the given string space-delimited.
static java.util.List<java.lang.String> parseSquiggleDelimited(java.lang.String s, boolean ignoreNulls)
          Parses the given string squiggle-delimited.
static java.util.List<java.lang.String> parseSquiggles(java.lang.String s)
          Parses the given string squiggle-delimited.
static java.util.Map<java.lang.String,java.lang.String> parseStrictEQParms(java.lang.String str)
          Parses the given string for[PAREM1] [PARAM2]=[VALUE] or [PARAM]="[VALUE]" formatted key/pair values.
static java.util.List<java.lang.String> parseTabs(java.lang.String s, boolean ignoreNulls)
          Parses the given string tab-delimited.
static java.lang.String quoteIfNecessary(java.lang.String str)
          Returns the given string, unless it contains a space, in which case it returns the string with double-quotes around it.
static boolean startsAnyWith(java.lang.String[] theList, java.lang.String str)
          Returns true if any string in string array starts with the given string.
static boolean startsAnyWithIgnoreCase(java.lang.String[] theList, java.lang.String str)
          Returns true if any string in string array starts with the given string.
static int startsWith(java.lang.String[] theList, java.lang.String str)
          Returns the index of the string in the string array that starts with the given string.
static int startsWithIgnoreCase(java.lang.String[] theList, java.lang.String str)
          Returns the index of the string in the string array that starts with the given string.
static java.lang.String toCMObjectListString(CMObject[] e)
          Converts the given Array of CMObjects to a comma-delimited list, with spaces after each comma by calling ID() on each object.
static java.lang.String toCMObjectListString(java.util.Enumeration<? extends CMObject> e)
          Converts the given Enumeration CMObject to a comma-delimited list, with spaces after each comma by calling ID() on each object.
static java.lang.String toCMObjectListString(java.util.Iterator<? extends CMObject> e)
          Converts the given Iterator CMObject to a comma-delimited list, with spaces after each comma by calling ID() on each object.
static double[] toDoubleArray(java.util.List<?> V)
          Converts the given object list to a double array by calling "toString()" on all the objects and then converting those to doubles.
static java.lang.String toEnvironmentalListString(java.util.Enumeration<? extends Environmental> e)
          Converts the given Enumeration objects to a comma-delimited list, with spaces after each comma by calling name() on each object.
static java.lang.String toEqListString(java.util.Map<?,?> V)
          Returns the key/value pairs in the given map as a single string of the form KEY=VALUE KEY="VALUE" etc...
static java.util.List<java.lang.String> toIDList(java.util.Collection<? extends CMObject> V)
          Converts the cmobject objects in the given Collection to a String List by calling ID() on each object.
static java.util.List<java.lang.String> toIDList(java.util.Set<? extends CMObject> V)
          Converts the cmobject objects in the given Set to a String List by calling ID() on each object.
static int[] toIntArray(java.util.List<?> V)
          Converts the given object list to a int array by calling "toString()" on all the objects and then converting those to ints.
static java.lang.String toKeyValueSlashListString(java.util.Map<java.lang.String,?> V)
          Returns the keys and values in the given may in the form KEY=VALUE/KEY=VALUE/etc..
static java.lang.String toListString(boolean[] V)
          Converts the given array to a comma-delimited list string, with spaces after each comma.
static java.lang.String toListString(byte[] V)
          Converts the given array to a comma-delimited list string, with spaces after each comma.
static java.lang.String toListString(char[] V)
          Converts the given array to a comma-delimited list string, with spaces after each comma, casting the characters as numbers.
static java.lang.String toListString(double[] V)
          Converts the given array to a comma-delimited list string, with spaces after each comma.
static java.lang.String toListString(java.util.Enumeration<?> e)
          Converts the given Enumeration objects to a comma-delimited list, with spaces after each comma by calling toString() on each object.
static java.lang.String toListString(int[] V)
          Converts the given array to a comma-delimited list string, with spaces after each comma.
static java.lang.String toListString(java.util.Iterator<?> e)
          Converts the given Iterator objects to a comma-delimited list, with spaces after each comma by calling toString() on each object.
static java.lang.String toListString(java.util.List<?> V)
          Converts the given List to a comma-delimited list string, with spaces after each comma, by calling toString() on each object.
static java.lang.String toListString(long[] V)
          Converts the given array to a comma-delimited list string, with spaces after each comma.
static java.lang.String toListString(java.lang.Object[] V)
          Converts the given Array to a comma-delimited list, with spaces after each comma by calling toString() on each object.
static java.lang.String toListString(java.util.Set<?> V)
          Converts the given Set to a comma-delimited list string, with spaces after each comma, by calling toString() on each object.
static java.lang.String toListString(short[] V)
          Converts the given array to a comma-delimited list string, with spaces after each comma.
static java.lang.String toListString(java.lang.String[] V)
          Converts the given Array to a comma-delimited list, with spaces after each comma.
static long[] toLongArray(java.util.List<?> V)
          Converts the given object list to a long array by calling "toString()" on all the objects and then converting those to longs.
static java.util.List<java.lang.String> toNameList(java.util.Enumeration<? extends Environmental> V)
          Converts the environmental objects in the given Enumeration to a String List by calling name() on each object.
static java.util.List<java.lang.String> toNameList(java.util.Set<? extends Environmental> V)
          Converts the environmental objects in the given Set to a String List by calling name() on each object.
static java.util.Map<java.lang.String,java.lang.Object> toObjectStringMap(java.lang.Object[] c)
          Maps all the objects by to a name/value map, by calling toString() on each object.
static java.lang.String toSafeSemicolonListString(java.util.List<?> list)
          Converts the given objects to their string values and returns them, semicolon delimited.
static java.lang.String toSafeSemicolonListString(java.lang.Object[] list)
          Converts the given objects to their string values and returns them, semicolon delimited.
static java.lang.String toSemicolonListString(byte[] bytes)
          Converts the given bytes to their numeric string values and returns them, semicolon delimited.
static java.lang.String toSemicolonListString(java.util.Enumeration<?> bytes)
          Converts the given objects to their string values and returns them, semicolon delimited.
static java.lang.String toSemicolonListString(java.util.List<?> bytes)
          Converts the given objects to their string values and returns them, semicolon delimited.
static java.lang.String toSemicolonListString(java.lang.Object[] bytes)
          Converts the given objects to their string values and returns them, semicolon delimited.
static java.lang.String toSemicolonListString(java.lang.String[] bytes)
          Returns the given strings combined, semicolon delimited.
static java.lang.String toString(java.lang.Object o)
          Converts the given object to a string.
static java.lang.String[] toStringArray(int[] O)
          Converts the given int array to a string array by calling Integer.toString on all the long
static java.lang.String[] toStringArray(java.util.List<?> V)
          Converts the given object list to a string array by calling "toString()" on all the objects
static java.lang.String[] toStringArray(long[] O)
          Converts the given long array to a string array by calling Long.toString on all the long
static java.lang.String[] toStringArray(java.lang.Object[] O)
          Converts the given object array to a string array by calling "toString()" on all the objects
static java.lang.String[] toStringArray(java.util.Set<?> V)
          Converts the objects in the given Set to a String array by calling toString() on each object.
static java.util.Set<java.lang.String> toStringSet(java.util.List<?> V, java.util.Set<java.lang.String> S)
          Copies the objects in the given list into the given string set by calling toString() on all the object
static java.lang.String toTightListString(boolean[] V)
          Converts the given array to a comma-delimited list string.
static java.lang.String toTightListString(byte[] V)
          Converts the given array to a comma-delimited list string.
static java.lang.String toTightListString(char[] V)
          Converts the given array to a comma-delimited list string, casting the characters as numbers.
static java.lang.String toTightListString(double[] V)
          Converts the given array to a comma-delimited list string.
static java.lang.String toTightListString(int[] V)
          Converts the given array to a comma-delimited list string.
static java.lang.String toTightListString(java.util.List<?> V)
          Converts the given List to a comma-delimited list string, by calling toString() on each object.
static java.lang.String toTightListString(long[] V)
          Converts the given array to a comma-delimited list string.
static java.lang.String toTightListString(java.util.Set<?> V)
          Converts the given Set to a comma-delimited list string, by calling toString() on each object.
static java.lang.String toTightListString(short[] V)
          Converts the given array to a comma-delimited list string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PUNCTUATION_TABLE

public static boolean[] PUNCTUATION_TABLE

spaceDelimiter

public static final CMParms.DelimiterChecker spaceDelimiter
Example delimeter checker for spaces


FORMAT_UNDEFINED

public static final java.lang.String FORMAT_UNDEFINED
constant value representing an undefined/unimplemented miscText/parms format.

See Also:
Constant Field Values

FORMAT_EMPTY

public static final java.lang.String FORMAT_EMPTY
constant value representing an always empty miscText/parms format.

See Also:
Constant Field Values
Method Detail

instance

public static final CMParms instance()

createDelimiter

public static final CMParms.DelimiterChecker createDelimiter(char[] chars)
Create a DelimiterChecker from the given set of characters that will be the delimiters.

Parameters:
chars - the delimiters as a char array
Returns:
the class you can use to check for them fast
See Also:
CMParms.DelimiterChecker, parseEQParms(String, DelimiterChecker, boolean)

combine

public static final java.lang.String[] combine(java.lang.String[] strs1,
                                               java.lang.String[] strs2)
Combine two string arrays into a single one.

Parameters:
strs1 - the first array
strs2 - the second array
Returns:
the combined array

combine

public static final java.lang.Object[] combine(java.lang.Object[]... objs)
Combine object arrays into a single one.

Parameters:
objs - the arrays
Returns:
the combined array

combine

public static final int[] combine(int[] strs1,
                                  int[] strs2)
Combine two int arrays into a single one.

Parameters:
strs1 - the first array
strs2 - the second array
Returns:
the combined array

combine

public static final boolean[] combine(boolean[] strs1,
                                      boolean[] strs2)
Combine two boolean arrays into a single one.

Parameters:
strs1 - the first array
strs2 - the second array
Returns:
the combined array

quoteIfNecessary

public static final java.lang.String quoteIfNecessary(java.lang.String str)
Returns the given string, unless it contains a space, in which case it returns the string with double-quotes around it.

Parameters:
str - the string to check and return
Returns:
the string, quoted it necessary

combine

public static final java.lang.String combine(java.util.List<?> commands)
Returns a string containing the given objects, with toString() called, and now space delimited.

Parameters:
commands - the objects to combine into a single string
Returns:
the single string

combineWSpaces

public static final java.lang.String combineWSpaces(java.lang.Object[] commands)
Returns a string containing the given object, with toString() called, and now space delimited.

Parameters:
commands - the objects to combine into a single string
Returns:
the single string

combine

public static final java.lang.String combine(java.util.List<?> commands,
                                             int startAt)
Returns a string containing the given objects, with toString() called, and now space delimited.

Parameters:
commands - the objects to combine into a single string
startAt - the index in the list to start at.
Returns:
the single string

combine

public static final java.lang.String combine(java.util.List<?> commands,
                                             int startAt,
                                             int endAt)
Returns a string containing the given objects, with toString() called, and now space delimited.

Parameters:
commands - the objects to combine into a single string
startAt - the index in the list to start at.
endAt - the index in the list to end with
Returns:
the single string

combineWith

public static final java.lang.String combineWith(java.util.List<?> commands,
                                                 char withChar,
                                                 int startAt,
                                                 int endAt)
Returns a string containing the given objects, with toString() called, and now delimited by the character given.

Parameters:
commands - the objects to combine into a single string
withChar - the character to use as a delimiter
startAt - the index in the list to start at.
endAt - the index in the list to end with
Returns:
the single string

combineWith

public static final java.lang.String combineWith(java.util.List<?> commands,
                                                 char withChar)
Returns a string containing the given objects, with toString() called, and now delimited by the character given.

Parameters:
commands - the objects to combine into a single string
withChar - the character to use as a delimiter
Returns:
the single string

combineWith

public static final java.lang.String combineWith(java.util.Set<?> commands,
                                                 char withChar)
Returns a string containing the given objects, with toString() called, and now delimited by the character given.

Parameters:
commands - the objects to combine into a single string
withChar - the character to use as a delimiter
Returns:
the single string

combineQuoted

public static final java.lang.String combineQuoted(java.util.List<?> commands,
                                                   int startAt,
                                                   int endAt)
Returns a string containing the given objects, with toString() called, and now space delimited. If any toString() calls result in a string that contains spaces, then the string will be surrounded by double-quotes (")

Parameters:
commands - the objects to combine into a single string
startAt - the index in the list to start at.
endAt - the index in the list to end with
Returns:
the single string

combineWith

public static final java.lang.String combineWith(java.util.List<?> commands,
                                                 java.lang.String withSeparator)
Returns a string containing the given objects, with toString() called, and now delimited by the string given.

Parameters:
commands - the objects to combine into a single string
withSeparator - the string to use as a delimiter
Returns:
the single string

combineWith

public static final java.lang.String combineWith(java.util.Set<?> commands,
                                                 java.lang.String withSeparator)
Returns a string containing the given objects, with toString() called, and now delimited by the string given.

Parameters:
commands - the objects to combine into a single string
withSeparator - the string to use as a delimiter
Returns:
the single string

combineQuoted

public static final java.lang.String combineQuoted(java.util.List<?> commands,
                                                   int startAt)
Returns a string containing the given objects, with toString() called, and now delimited by spaces. If any of the objects evaluate to strings with spaces, then they will be surrounded by double-quotes.

Parameters:
commands - the objects to combine into a single string
startAt - the first object in the list to use
Returns:
the single string

combineWithTabs

public static final java.lang.String combineWithTabs(java.util.List<?> commands,
                                                     int startAt)
Returns a string containing the given objects, with toString() called, and now delimited by tab characters.

Parameters:
commands - the objects to combine into a single string
startAt - the first object in the list to use
Returns:
the single string

combineWithX

public static final java.lang.String combineWithX(java.util.List<?> commands,
                                                  java.lang.String delimiter,
                                                  int startAt)
Returns a string containing the given objects, with toString() called, and now delimited by the given X string.

Parameters:
commands - the objects to combine into a single string
delimiter - the delimiter to use
startAt - the first object in the list to use
Returns:
the single string

combineWithX

public static final java.lang.String combineWithX(java.util.List<?> commands,
                                                  char delimiter,
                                                  int startAt)
Returns a string containing the given objects, with toString() called, and now delimited by the given X character.

Parameters:
commands - the objects to combine into a single string
delimiter - the delimiter to use
startAt - the first object in the list to use
Returns:
the single string

combine

public static final java.lang.String combine(java.util.Set<?> flags)
Returns a string containing the given objects, with toString() called, and now space delimited.

Parameters:
flags - the objects to combine into a single string
Returns:
the single string

cleanParameterList

public static final java.util.List<java.lang.String> cleanParameterList(java.lang.String str)
Parses the given string space-delimited, with respect for quoted strings. It then returns them as a simple list in the form PARAM=VALUE, one to each entry in the returned list. Quotes will have been removed if present, though the values intact.

Parameters:
str - the string to parse
Returns:
the list of strings, with PARAM=VALUE unsplit.

parse

public static final java.util.Vector<java.lang.String> parse(java.lang.String str)
Parses the given string space-delimited, with respect for quoted strings.

Parameters:
str - the string to parse
Returns:
the list of parsed strings

parseCommas

public static final java.util.List<java.lang.String> parseCommas(java.lang.String s,
                                                                 boolean ignoreNulls)
Parses the given string comma-delimited.

Parameters:
s - the string to parse
ignoreNulls - don't include any of the empty entries (,,)
Returns:
the list of parsed strings

parseCommandFlags

public static final java.util.List<java.lang.String> parseCommandFlags(java.lang.String s,
                                                                       java.lang.String[] flags)
Returns a list of those flag strings that appear in the given string.

Parameters:
s - the string to search
flags - the set of flags to look for
Returns:
the list of found flag strings

parseTabs

public static final java.util.List<java.lang.String> parseTabs(java.lang.String s,
                                                               boolean ignoreNulls)
Parses the given string tab-delimited.

Parameters:
s - the string to parse
ignoreNulls - don't include any of the empty entries (-tab-tab)
Returns:
the list of parsed strings

parseAny

public static final java.util.List<java.lang.String> parseAny(java.lang.String s,
                                                              java.lang.String delimeter,
                                                              boolean ignoreNulls)
Parses the given string by the given delimiter.

Parameters:
s - the string to parse
delimeter - the delimeter to use
ignoreNulls - don't include any of the empty entries (-delim-delim)
Returns:
the list of parsed strings

parseAnyIgnoreCase

public static final java.util.List<java.lang.String> parseAnyIgnoreCase(java.lang.String s,
                                                                        java.lang.String delimeter,
                                                                        boolean ignoreNulls)
Parses the given string by the given delimiter, ignoring the delimeter case.

Parameters:
s - the string to parse
delimeter - the delimeter to use
ignoreNulls - don't include any of the empty entries (-delim-delim)
Returns:
the list of parsed strings

parseAny

public static final java.util.List<java.lang.String> parseAny(java.lang.String s,
                                                              char delimiter,
                                                              boolean ignoreNulls)
Parses the given string by the given delimiter.

Parameters:
s - the string to parse
delimiter - the delimiter to use
ignoreNulls - don't include any of the empty entries (-delim-delim)
Returns:
the list of parsed strings

parseSquiggles

public static final java.util.List<java.lang.String> parseSquiggles(java.lang.String s)
Parses the given string squiggle-delimited.

Parameters:
s - the string to parse
Returns:
the list of parsed strings

parseEnumList

public static final java.util.List<java.lang.Enum<? extends java.lang.Enum>> parseEnumList(java.lang.Class<? extends java.lang.Enum> c,
                                                                                           java.lang.String s,
                                                                                           char delim)
Parses the given string comma-delimited for the given enum obj names.

Parameters:
c - the enum class
s - the string to parse
delim - the delimiter to use
Returns:
the list of parsed enums

parseIntList

public static final int[] parseIntList(java.lang.String s,
                                       char delim)
Parses the given string comma-delimited for an int array

Parameters:
s - the string to parse
delim - the delimiter to use
Returns:
the list of parsed ints

parseSentences

public static final java.util.List<java.lang.String> parseSentences(java.lang.String s)
Parses the given string period-delimited.

Parameters:
s - the string to parse
Returns:
the list of parsed strings

parseSquiggleDelimited

public static final java.util.List<java.lang.String> parseSquiggleDelimited(java.lang.String s,
                                                                            boolean ignoreNulls)
Parses the given string squiggle-delimited.

Parameters:
s - the string to parse
ignoreNulls - don't include any of the empty entries (~~)
Returns:
the list of parsed strings

parseSemicolons

public static final java.util.List<java.lang.String> parseSemicolons(java.lang.String s,
                                                                     boolean ignoreNulls)
Parses the given string semicolon-delimited.

Parameters:
s - the string to parse
ignoreNulls - don't include any of the empty entries (;;)
Returns:
the list of parsed strings

parseSpaces

public static final java.util.List<java.lang.String> parseSpaces(java.lang.String s,
                                                                 boolean ignoreNulls)
Parses the given string space-delimited.

Parameters:
s - the string to parse
ignoreNulls - don't include any of the empty entries (-space-space)
Returns:
the list of parsed strings

numBits

public static final int numBits(java.lang.String s)
Returns the number of MOBPROG 'Bits' in this string. Bits are space-delimited strings, which use single quotes for grouping words with spaces

Parameters:
s - the string to check
Returns:
the numbre of bits

cleanBit

public static final java.lang.String cleanBit(java.lang.String s)
This method removes any surrounding single quotes or spaces, and replaces any remaining single quotes with input-friendly fake single quotes (`).

Parameters:
s - the string to clean
Returns:
the cleaned string

getCleanBit

public static final java.lang.String getCleanBit(java.lang.String s,
                                                 int which)
Returns the string bit at the given 0-based index, cleaned of quotes. Bits are space-delimited strings, which use single quotes for grouping words with spaces

Parameters:
s - the string to parse
which - the bit index to return
Returns:
the string representing the given bit, or empty

getPastBitClean

public static final java.lang.String getPastBitClean(java.lang.String s,
                                                     int which)
Returns the remainder of the string after the string bit at the given 0-based index, cleaned of quotes. Bits are space-delimited strings, which use single quotes for grouping words with spaces

Parameters:
s - the string to parse
which - the bit index to return
Returns:
the string representing the given bit, or empty

getPastBit

public static final java.lang.String getPastBit(java.lang.String s,
                                                int which)
Returns the remainder of the string after the string bit at the given 0-based index, which may still have single quotes. Bits are space-delimited strings, which use single quotes for grouping words with spaces

Parameters:
s - the string to parse
which - the bit index to return
Returns:
the string representing the given bit, or empty

getBit

public static final java.lang.String getBit(java.lang.String s,
                                            int which)
Returns the string bit at the given 0-based index, which may still have its single quotes surrounding it. Bits are space-delimited strings, which use single quotes for grouping words with spaces

Parameters:
s - the string to parse
which - the bit index to return
Returns:
the string representing the given bit, or empty

getParmStr

public static final java.lang.String getParmStr(java.lang.String text,
                                                java.lang.String key,
                                                java.lang.String defaultVal)
This method is a sloppy, forgiving method doing KEY=VALUE value searches in a string. Returns the value of the given key when the parameter is formatted in the given text in the format [KEY]=[VALUE] or [KEY]="[VALUE]". If the key is not found, it will return the given defaultVal. The key is case insensitive, and start-partial. For example, a key of NAME will match NAMEY or NAME12. No assumptions are made about the given text. It could have other garbage data of any format around it. For example, if BOB is the key, then a text string like: 'joe larry bibob=hoo moe="uiuiui bob=goo lou", bob="yoo"' will still return "goo". If the key is found, but followed by a + or -, the default value is always returned. The value ends when either an end quote is encountered, or a whitespace, semicolon, or comma.

Parameters:
text - the string to search
key - the key to search for, case insensitive
defaultVal - the value to return if the key is not found
Returns:
the value

delParmStr

public static final java.lang.String delParmStr(java.lang.String text,
                                                java.lang.String key)
This method is a sloppy, forgiving method removing KEY=VALUE value pair from a string.

Parameters:
text - the string to search
key - the key to search for, case insensitive
Returns:
the string without the pair, if found

getParmCompare

public static final boolean getParmCompare(java.lang.String text,
                                           java.lang.String key,
                                           int value,
                                           char[] comparatorFound)
This method is a sloppy, forgiving method doing KEY>=[VALUE] value searches in a string. Searches and finds the numeric value of the given key when the parameter is formatted in the given text in the format [KEY]=[VALUE] where = may be ==,=,!=,>,>=,<,or <=. The key is case insensitive, and start-partial. For example, a key of NAME will match NAMEY or NAME12. It will then do the given comparison against the value passed in, populate the comparator found array with the comparator found, and the method returns the result of the compare. No assumptions are made about the given text. It could have other garbage data of any format around it. For example, if BOB is the key, and the value is 3, then a text string like: 'joe larry bibob=2 moe="uiuiui bob>7 lou", bob=5' will return a comparator of > and the compare result of false.

Parameters:
text - the string to search
key - the key to search for, case insensitive
value - the value to compare the found value against
comparatorFound - a one-dimensional array to contain the found comparator
Returns:
the result of comparing the found value with the given value

parseEQParms

public static final java.util.Map<java.lang.String,java.lang.String> parseEQParms(java.lang.String str,
                                                                                  java.lang.String[] parmList)
Parses the given string for [PARAM]=[VALUE] or [PARAM]="[VALUE]" formatted key/pair values, relying on the given parmList to provide possible [PARAM] values. Returns a map of the found parameters and their values. This method is a sloppy, forgiving method doing KEY=VALUE value searches in a string. The key is case insensitive, and start-partial. For example, a key of NAME will match NAMEY or NAME12. The value ends when the next parameter is encountered. If it's not on the parmList, it is a value.

Parameters:
str - the unparsed string
parmList - exhaustive list of all parameters
Returns:
the map of parameters

parseStrictEQParms

public static final java.util.Map<java.lang.String,java.lang.String> parseStrictEQParms(java.lang.String str)
Parses the given string for[PAREM1] [PARAM2]=[VALUE] or [PARAM]="[VALUE]" formatted key/pair values. Returns a map of the found parameters and their values. This method is a strict, unforgiving method doing KEY=VALUE value searches in a string. The key is case insensitive, returned as uppercase. Values may be put in quotes, with escapped quotes and escapped escapes.

Parameters:
str - the unparsed string
Returns:
the map of parameters

combineEQParms

public static final java.lang.String combineEQParms(java.util.Map<java.lang.String,?> parms,
                                                    char delimiter)
Given a key/value parameter map, returns a string that is reparseable in a given delimited way as KEY=VLUE, adding double quotes if any value has the delimiter.

Parameters:
parms - the key/value pairs
delimiter - the delimieter to use between key/pairs
Returns:
the combined string

parseEQParms

public static final java.util.Map<java.lang.String,java.lang.String> parseEQParms(java.lang.String parms)
Parses the given string for [PARAM]=[VALUE] or [PARAM]="[VALUE]" formatted key/pair values in space-delimited fashion, respecting quotes value. Returns a map of the found parameters and their values, with keys normalized to uppercase.

Parameters:
parms - the string to parse
Returns:
the map of key/value pairs found.

parseEQParms

public static final java.util.Map<java.lang.String,java.lang.String> parseEQParms(java.lang.String parms,
                                                                                  CMParms.DelimiterChecker delimiterCheck,
                                                                                  boolean upperCase)
Parses the given string for [PARAM]=[VALUE] or [PARAM]="[VALUE]" formatted key/pair values in given-delimited fashion, respecting quotes value. Returns a map of the found parameters and their values, with keys normalized to uppercase.

Parameters:
parms - the string to parse
delimiterCheck - the checker to determine if a character is the given delimiter
upperCase - make the keys uppercase
Returns:
the map of key/value pairs found.

parseEQParms

public static final java.util.Map<java.lang.String,java.lang.String> parseEQParms(java.util.List<java.lang.String> parms,
                                                                                  int start,
                                                                                  int end)
Parses the given strings in the given string list for [PARAM]=[VALUE] or [PARAM]="[VALUE]" formatted key/pairv values in space-delimited fashion, respecting quotes value. Returns a map of the found parameters and their values, with keys normalized to uppercase. The map is a combine of all the strings in the given list

Parameters:
parms - the string list of parseable strings with key=value pairs
start - the starting index in the list to use
end - the last index in the list to use
Returns:
the key/value mapping pairs combines

parseDoubleDelimited

public static final java.util.List<java.util.List<java.lang.String>> parseDoubleDelimited(java.lang.String text,
                                                                                          char delim1,
                                                                                          char delim2)
Parses the given string into a two-dimensional list, using the two given delimiters

Parameters:
text - the string to parse
delim1 - the 'outer' delimiter
delim2 - the 'inner' delimiter
Returns:
the two-dimensional string list

parseSpaceParenList

public static final java.util.List<Pair<java.lang.String,java.lang.String>> parseSpaceParenList(java.lang.String list)
This method is for parsing space-delimited lists of ids, with optional parameters in parenthis after the id. For example ID1(parm1) ID2 ID3 ID4(parm2)

Parameters:
list - the list of things to parse
Returns:
the parsed list.

getParmPlus

public static final int getParmPlus(java.lang.String text,
                                    java.lang.String key)
This method is a sloppy, forgiving method doing KEY+[INT] or KEY-[INT] value searches in a string. Returns the value of the given key. If the key is not found, it will return 0. The key is case insensitive, and start-partial. For example, a key of NAME will match NAMEY or NAME12. No assumptions are made about the given text. It could have other garbage data of any format around it. For example, if BOB is the key, then a text string like: 'joe larry bibob+5 moe="uiuiui bob-2 lou", bob+2' will still return -2. If the key is found, but followed by a =, 0 is returned.

Parameters:
text - the string to search
key - the key to search for, case insensitive
Returns:
the value

getParmDoublePlus

public static final double getParmDoublePlus(java.lang.String text,
                                             java.lang.String key)
This method is a sloppy, forgiving method doing KEY+[DBL] or KEY-[DBL] value searches in a string. Returns the double value of the given key. If the key is not found, it will return 0. The key is case insensitive, and start-partial. For example, a key of NAME will match NAMEY or NAME12. No assumptions are made about the given text. It could have other garbage data of any format around it. For example, if BOB is the key, then a text string like: 'joe larry bibob+5.2 moe="uiuiui bob-2.1 lou", bob+3.9' will still return -2.1 If the key is found, but followed by a =, 0.0 is returned.

Parameters:
text - the string to search
key - the key to search for, case insensitive
Returns:
the value

getParmDouble

public static final double getParmDouble(java.lang.String text,
                                         java.lang.String key,
                                         double defaultValue)
This method is a sloppy, forgiving method doing KEY=VALUE value searches in a string. Returns the value of the given key when the parameter is formatted in the given text in the format [KEY]=[VALUE]. If the key is not found, it will return the given defaultVal. The key is case insensitive, and start-partial. For example, a key of NAME will match NAMEY or NAME12. No assumptions are made about the given text. It could have other garbage data of any format around it. For example, if BOB is the key, then a text string like: 'joe larry bibob=1.5 moe="uiuiui bob=2.1 lou", bob=3.7' will still return 2.1. If the key is found, but followed by a + or -, the default value is always returned. The value ends when either an end quote is encountered, or a whitespace, semicolon, or comma.

Parameters:
text - the string to search
key - the key to search for, case insensitive
defaultValue - the value to return if the key is not found
Returns:
the value

getParmInt

public static final int getParmInt(java.lang.String text,
                                   java.lang.String key,
                                   int defaultValue)
This method is a sloppy, forgiving method doing KEY=VALUE value searches in a string. Returns the value of the given key when the parameter is formatted in the given text in the format [KEY]=[VALUE]. If the key is not found, it will return the given defaultVal. The key is case insensitive, and start-partial. For example, a key of NAME will match NAMEY or NAME12. No assumptions are made about the given text. It could have other garbage data of any format around it. For example, if BOB is the key, then a text string like: 'joe larry bibob=1 moe="uiuiui bob=2 lou", bob=3' will still return 2. If the key is found, but followed by a + or -, the default value is always returned. The value ends when either an end quote is encountered, or a whitespace, semicolon, or comma.

Parameters:
text - the string to search
key - the key to search for, case insensitive
defaultValue - the value to return if the key is not found
Returns:
the value

getParmLong

public static final long getParmLong(java.lang.String text,
                                     java.lang.String key,
                                     long defaultValue)
This method is a sloppy, forgiving method doing KEY=VALUE value searches in a string. Returns the value of the given key when the parameter is formatted in the given text in the format [KEY]=[VALUE]. If the key is not found, it will return the given defaultVal. The key is case insensitive, and start-partial. For example, a key of NAME will match NAMEY or NAME12. No assumptions are made about the given text. It could have other garbage data of any format around it. For example, if BOB is the key, then a text string like: 'joe larry bibob=1 moe="uiuiui bob=2 lou", bob=3' will still return 2. If the key is found, but followed by a + or -, the default value is always returned. The value ends when either an end quote is encountered, or a whitespace, semicolon, or comma.

Parameters:
text - the string to search
key - the key to search for, case insensitive
defaultValue - the value to return if the key is not found
Returns:
the value

delParmLong

public static final java.lang.String delParmLong(java.lang.String text,
                                                 java.lang.String key)
This method is a sloppy, forgiving method removing KEY=VALUE value pair from a string.

Parameters:
text - the string to search
key - the key to search for, case insensitive
Returns:
the string without the key and value, if found.

getParmBool

public static final boolean getParmBool(java.lang.String text,
                                        java.lang.String key,
                                        boolean defaultValue)
This method is a sloppy, forgiving method doing KEY=VALUE value searches in a string. Returns the boolean value of the given key when the parameter is formatted in the given text in the format [KEY]=[VALUE]. If the key is not found, it will return the given defaultVal. The key is case insensitive, and start-partial. For example, a key of NAME will match NAMEY or NAME12. No assumptions are made about the given text. It could have other garbage data of any format around it. For example, if BOB is the key, then a text string like: 'joe larry bibob=False moe="uiuiui bob=True lou", bob=False' will still return True. If the key is found, but followed by a + or -, the default value is always returned. The value ends when either an end quote is encountered, or a whitespace, semicolon, or comma.

Parameters:
text - the string to search
key - the key to search for, case insensitive
defaultValue - the value to return if the key is not found
Returns:
the value

toStringArray

public static final java.lang.String[] toStringArray(java.util.List<?> V)
Converts the given object list to a string array by calling "toString()" on all the objects

Parameters:
V - the list to turn into a string array
Returns:
the string array

toStringSet

public static final java.util.Set<java.lang.String> toStringSet(java.util.List<?> V,
                                                                java.util.Set<java.lang.String> S)
Copies the objects in the given list into the given string set by calling toString() on all the object

Parameters:
V - the list
S - the set
Returns:
the set, again

toStringArray

public static final java.lang.String[] toStringArray(java.lang.Object[] O)
Converts the given object array to a string array by calling "toString()" on all the objects

Parameters:
O - the objects to turn into a string array
Returns:
the string array

toStringArray

public static final java.lang.String[] toStringArray(long[] O)
Converts the given long array to a string array by calling Long.toString on all the long

Parameters:
O - the longs to turn into a string array
Returns:
the string array

toStringArray

public static final java.lang.String[] toStringArray(int[] O)
Converts the given int array to a string array by calling Integer.toString on all the long

Parameters:
O - the ints to turn into a string array
Returns:
the string array

toLongArray

public static final long[] toLongArray(java.util.List<?> V)
Converts the given object list to a long array by calling "toString()" on all the objects and then converting those to longs.

Parameters:
V - the list to turn into a long array
Returns:
the long array

toDoubleArray

public static final double[] toDoubleArray(java.util.List<?> V)
Converts the given object list to a double array by calling "toString()" on all the objects and then converting those to doubles.

Parameters:
V - the list to turn into a double array
Returns:
the double array

toIntArray

public static final int[] toIntArray(java.util.List<?> V)
Converts the given object list to a int array by calling "toString()" on all the objects and then converting those to ints.

Parameters:
V - the list to turn into a int array
Returns:
the int array

toSemicolonListString

public static final java.lang.String toSemicolonListString(byte[] bytes)
Converts the given bytes to their numeric string values and returns them, semicolon delimited.

Parameters:
bytes - the bytes to return
Returns:
the semicolon delimited list

toSemicolonListString

public static final java.lang.String toSemicolonListString(java.lang.String[] bytes)
Returns the given strings combined, semicolon delimited.

Parameters:
bytes - the strings to return
Returns:
the semicolon delimited list

toSemicolonListString

public static final java.lang.String toSemicolonListString(java.lang.Object[] bytes)
Converts the given objects to their string values and returns them, semicolon delimited.

Parameters:
bytes - the objects as strings to return
Returns:
the semicolon delimited list

toSemicolonListString

public static final java.lang.String toSemicolonListString(java.util.Enumeration<?> bytes)
Converts the given objects to their string values and returns them, semicolon delimited.

Parameters:
bytes - the objects as strings to return
Returns:
the semicolon delimited list

toSemicolonListString

public static final java.lang.String toSemicolonListString(java.util.List<?> bytes)
Converts the given objects to their string values and returns them, semicolon delimited.

Parameters:
bytes - the objects as strings to return
Returns:
the semicolon delimited list

toSafeSemicolonListString

public static final java.lang.String toSafeSemicolonListString(java.util.List<?> list)
Converts the given objects to their string values and returns them, semicolon delimited. If any values contains a semicolon, the semicolon is escaped.

Parameters:
list - the objects as strings to return
Returns:
the semicolon delimited list

toSafeSemicolonListString

public static final java.lang.String toSafeSemicolonListString(java.lang.Object[] list)
Converts the given objects to their string values and returns them, semicolon delimited. If any values contains a semicolon, the semicolon is escaped.

Parameters:
list - the objects as strings to return
Returns:
the semicolon delimited list

parseSafeSemicolonList

public static final java.util.List<java.lang.String> parseSafeSemicolonList(java.lang.String list,
                                                                            boolean ignoreNulls)
Parses the given semicolon-delimited list of strings and returns the list as a list. If any of the values contained escaped-semicolons, the values are unesccaped.

Parameters:
list - semicolon-delimited list
ignoreNulls - true to not return empty strings, false otherwise
Returns:
the list of unescaped values

parseSemicolonByteList

public static final byte[] parseSemicolonByteList(java.lang.String str)
Returns a byte array made from the semicolon-delimited list of numeric values in the given string.

Parameters:
str - the semicolon-delimited decimal byte list
Returns:
the byte array.

toStringArray

public static final java.lang.String[] toStringArray(java.util.Set<?> V)
Converts the objects in the given Set to a String array by calling toString() on each object.

Parameters:
V - the set to convert
Returns:
a string array of the set

toIDList

public static final java.util.List<java.lang.String> toIDList(java.util.Set<? extends CMObject> V)
Converts the cmobject objects in the given Set to a String List by calling ID() on each object.

Parameters:
V - the set to convert
Returns:
a string list of the set

toIDList

public static final java.util.List<java.lang.String> toIDList(java.util.Collection<? extends CMObject> V)
Converts the cmobject objects in the given Collection to a String List by calling ID() on each object.

Parameters:
V - the Collection to convert
Returns:
a string list of the Collection

toNameList

public static final java.util.List<java.lang.String> toNameList(java.util.Set<? extends Environmental> V)
Converts the environmental objects in the given Set to a String List by calling name() on each object.

Parameters:
V - the set to convert
Returns:
a string list of the set

toNameList

public static final java.util.List<java.lang.String> toNameList(java.util.Enumeration<? extends Environmental> V)
Converts the environmental objects in the given Enumeration to a String List by calling name() on each object.

Parameters:
V - the enumeration to convert
Returns:
a string list of the set

toString

public static final java.lang.String toString(java.lang.Object o)
Converts the given object to a string. If the object is null, returns "null". If the object is a List, Array, Iterator, or Enumeration, it converts it to a comma-delimited list. Returns toString() on the object.

Parameters:
o - the object to convert to something stringy
Returns:
the string representation of the object

toListString

public static final java.lang.String toListString(java.lang.String[] V)
Converts the given Array to a comma-delimited list, with spaces after each comma.

Parameters:
V - the array to convert to a string
Returns:
the array as a comma-delimited list

toListString

public static final java.lang.String toListString(java.lang.Object[] V)
Converts the given Array to a comma-delimited list, with spaces after each comma by calling toString() on each object.

Parameters:
V - the array to convert to a string
Returns:
the array as a comma-delimited list

toListString

public static final java.lang.String toListString(java.util.Iterator<?> e)
Converts the given Iterator objects to a comma-delimited list, with spaces after each comma by calling toString() on each object.

Parameters:
e - the Iterator to convert objects in to a string
Returns:
the objects as a comma-delimited list

toListString

public static final java.lang.String toListString(java.util.Enumeration<?> e)
Converts the given Enumeration objects to a comma-delimited list, with spaces after each comma by calling toString() on each object.

Parameters:
e - the Enumeration to convert objects in to a string
Returns:
the objects as a comma-delimited list

toEnvironmentalListString

public static final java.lang.String toEnvironmentalListString(java.util.Enumeration<? extends Environmental> e)
Converts the given Enumeration objects to a comma-delimited list, with spaces after each comma by calling name() on each object.

Parameters:
e - the Enumeration to convert environmentals in to a string
Returns:
the environmentals as a comma-delimited list

toCMObjectListString

public static final java.lang.String toCMObjectListString(java.util.Enumeration<? extends CMObject> e)
Converts the given Enumeration CMObject to a comma-delimited list, with spaces after each comma by calling ID() on each object.

Parameters:
e - the Enumeration to convert CMObjects in to a string
Returns:
the CMObjects as a comma-delimited list

toObjectStringMap

public static final java.util.Map<java.lang.String,java.lang.Object> toObjectStringMap(java.lang.Object[] c)
Maps all the objects by to a name/value map, by calling toString() on each object.

Parameters:
c - the list of objects
Returns:
the map of object toString()s to ojects.

toCMObjectListString

public static final java.lang.String toCMObjectListString(CMObject[] e)
Converts the given Array of CMObjects to a comma-delimited list, with spaces after each comma by calling ID() on each object.

Parameters:
e - the Array to convert CMObjects in to a string
Returns:
the CMObjects as a comma-delimited list

toCMObjectListString

public static final java.lang.String toCMObjectListString(java.util.Iterator<? extends CMObject> e)
Converts the given Iterator CMObject to a comma-delimited list, with spaces after each comma by calling ID() on each object.

Parameters:
e - the Iterator to convert CMObjects in to a string
Returns:
the CMObjects as a comma-delimited list

toListString

public static final java.lang.String toListString(long[] V)
Converts the given array to a comma-delimited list string, with spaces after each comma.

Parameters:
V - the array to convert into a list string
Returns:
the numbers in a comma-delimited list

toListString

public static final java.lang.String toListString(short[] V)
Converts the given array to a comma-delimited list string, with spaces after each comma.

Parameters:
V - the array to convert into a list string
Returns:
the numbers in a comma-delimited list

toListString

public static final java.lang.String toListString(boolean[] V)
Converts the given array to a comma-delimited list string, with spaces after each comma.

Parameters:
V - the array to convert into a list string
Returns:
the boolean values in a comma-delimited list

toListString

public static final java.lang.String toListString(byte[] V)
Converts the given array to a comma-delimited list string, with spaces after each comma.

Parameters:
V - the array to convert into a list string
Returns:
the numbers in a comma-delimited list

toListString

public static final java.lang.String toListString(char[] V)
Converts the given array to a comma-delimited list string, with spaces after each comma, casting the characters as numbers.

Parameters:
V - the array to convert into a list string
Returns:
the numbers in a comma-delimited list

toListString

public static final java.lang.String toListString(int[] V)
Converts the given array to a comma-delimited list string, with spaces after each comma.

Parameters:
V - the array to convert into a list string
Returns:
the numbers in a comma-delimited list

toListString

public static final java.lang.String toListString(double[] V)
Converts the given array to a comma-delimited list string, with spaces after each comma.

Parameters:
V - the array to convert into a list string
Returns:
the numbers in a comma-delimited list

toListString

public static final java.lang.String toListString(java.util.List<?> V)
Converts the given List to a comma-delimited list string, with spaces after each comma, by calling toString() on each object.

Parameters:
V - the List to convert into a list string
Returns:
the objects in a comma-delimited list

toListString

public static final java.lang.String toListString(java.util.Set<?> V)
Converts the given Set to a comma-delimited list string, with spaces after each comma, by calling toString() on each object.

Parameters:
V - the Set to convert into a list string
Returns:
the objects in a comma-delimited list

toTightListString

public static final java.lang.String toTightListString(long[] V)
Converts the given array to a comma-delimited list string.

Parameters:
V - the array to convert into a list string
Returns:
the numbers in a comma-delimited list

toTightListString

public static final java.lang.String toTightListString(short[] V)
Converts the given array to a comma-delimited list string.

Parameters:
V - the array to convert into a list string
Returns:
the numbers in a comma-delimited list

toTightListString

public static final java.lang.String toTightListString(boolean[] V)
Converts the given array to a comma-delimited list string.

Parameters:
V - the array to convert into a list string
Returns:
the boolean values in a comma-delimited list

toTightListString

public static final java.lang.String toTightListString(byte[] V)
Converts the given array to a comma-delimited list string.

Parameters:
V - the array to convert into a list string
Returns:
the numbers in a comma-delimited list

toTightListString

public static final java.lang.String toTightListString(char[] V)
Converts the given array to a comma-delimited list string, casting the characters as numbers.

Parameters:
V - the array to convert into a list string
Returns:
the numbers in a comma-delimited list

toTightListString

public static final java.lang.String toTightListString(int[] V)
Converts the given array to a comma-delimited list string.

Parameters:
V - the array to convert into a list string
Returns:
the numbers in a comma-delimited list

toTightListString

public static final java.lang.String toTightListString(double[] V)
Converts the given array to a comma-delimited list string.

Parameters:
V - the array to convert into a list string
Returns:
the numbers in a comma-delimited list

toTightListString

public static final java.lang.String toTightListString(java.util.List<?> V)
Converts the given List to a comma-delimited list string, by calling toString() on each object.

Parameters:
V - the List to convert into a list string
Returns:
the objects in a comma-delimited list

toTightListString

public static final java.lang.String toTightListString(java.util.Set<?> V)
Converts the given Set to a comma-delimited list string, by calling toString() on each object.

Parameters:
V - the Set to convert into a list string
Returns:
the objects in a comma-delimited list

toKeyValueSlashListString

public static final java.lang.String toKeyValueSlashListString(java.util.Map<java.lang.String,?> V)
Returns the keys and values in the given may in the form KEY=VALUE/KEY=VALUE/etc.. by calling toString() on each value.

Parameters:
V - the map to convert
Returns:
the key=value slash string

appendToArray

public static final java.lang.String[] appendToArray(java.lang.String[] front,
                                                     java.lang.String[] back)
Appends the given two arrays together.

Parameters:
front - the front array
back - the back array
Returns:
the combined array

parseKeyValueSlashListString

public static final java.util.Map<java.lang.String,java.lang.String> parseKeyValueSlashListString(java.lang.String s)
Parses the given string of the form KEY=VALUE/KEY=VALUE/etc into a new String key/value map.

Parameters:
s - the slash-keyvalue pairs
Returns:
the map of the keys and values.

toEqListString

public static final java.lang.String toEqListString(java.util.Map<?,?> V)
Returns the key/value pairs in the given map as a single string of the form KEY=VALUE KEY="VALUE" etc... by calling toString() on the objects.

Parameters:
V - the map of key/value pairs
Returns:
a single string list of all the key=value pairs

copyFlattenList

public static final java.util.List<java.lang.Object> copyFlattenList(java.util.List<?> V)
Flattens the given list by returning a new list will all of the objects in it. If the original list contained any lists, then the objects in those lists would be added, and not the list itself.

Parameters:
V - the list to flatten
Returns:
a new flattened list

indexOf

public static final int indexOf(java.lang.String[] stringList,
                                java.lang.String str)
Returns the index of the given string in the given string array. The search is case sensitive.

Parameters:
stringList - the string array
str - the string to search for
Returns:
the index of the string in the list, or -1 if not found

indexOf

public static final int indexOf(java.lang.String[] stringList,
                                java.lang.String str,
                                int startIndex)
Returns the index of the given string in the given string array. The search is case sensitive.

Parameters:
stringList - the string array
str - the string to search for
startIndex - the index to start from
Returns:
the index of the string in the list, or -1 if not found

numContains

public static final int numContains(java.lang.String[] theList,
                                    java.lang.String str)
Returns the number of the given items in the given array It is case sensitive.

Parameters:
theList - the list
str - the string to search for
Returns:
the number of times the item appears in the list

indexOfStartsWith

public static final int indexOfStartsWith(java.lang.String[] stringList,
                                          java.lang.String str)
Returns the index of the string in the given string array that starts with the given one. The search is case sensitive.

Parameters:
stringList - the string array
str - the string to search for a starter of
Returns:
the index of the string in the list that starts, or -1 if not found

indexOfEndsWith

public static final int indexOfEndsWith(java.lang.String[] stringList,
                                        java.lang.String str)
Returns the index of the string in the given string array that ends with the given one. The search is case sensitive.

Parameters:
stringList - the string array
str - the string to search for a ender of
Returns:
the index of the string in the list that ends, or -1 if not found

indexOfIgnoreCase

public static final int indexOfIgnoreCase(java.lang.String[] stringList,
                                          java.lang.String str)
Returns the index of the given string in the given string array. The search is case insensitive.

Parameters:
stringList - the string array
str - the string to search for
Returns:
the index of the string in the list, or -1 if not found

indexOfIgnoreCase

public static final int indexOfIgnoreCase(java.lang.Object[] stringList,
                                          java.lang.String str)
Returns the index of the given string in the given string array. The search is case insensitive.

Parameters:
stringList - the string array
str - the string to search for
Returns:
the index of the string in the list, or -1 if not found

indexOf

public static final int indexOf(int[] theList,
                                int x)
Returns the index of the given number in the given array.

Parameters:
theList - the int array
x - the number to search for
Returns:
the index of the number in the list, or -1 if not found

indexOf

public static final int indexOf(int[] theList,
                                int x,
                                int startIndex)
Returns the index of the given number in the given array.

Parameters:
theList - the int array
x - the number to search for
startIndex - the index to start the search from
Returns:
the index of the number in the list, or -1 if not found

numContains

public static final int numContains(int[] theList,
                                    int x)
Returns the number of the given items in the given array It is case sensitive.

Parameters:
theList - the list
x - the int to search for
Returns:
the number of times the item appears in the list

indexOfFirst

public static final int indexOfFirst(int[] theList,
                                     int[] xs)
Returns the index of the first of the given numbers in the given array.

Parameters:
theList - the int array
xs - the numbers to search for
Returns:
the index of the number in the list, or -1 if not found

indexOf

public static final int indexOf(byte[] theList,
                                byte x)
Returns the index of the given byte in the given array.

Parameters:
theList - the byte array
x - the byte to search for
Returns:
the index of the byte in the list, or -1 if not found

indexOf

public static final int indexOf(byte[] theList,
                                byte x,
                                int startIndex)
Returns the index of the given byte in the given array.

Parameters:
theList - the byte array
x - the byte to search for
startIndex - the index to start from
Returns:
the index of the byte in the list, or -1 if not found

numContains

public static final int numContains(byte[] theList,
                                    byte x)
Returns the number of the given items in the given array It is case sensitive.

Parameters:
theList - the list
x - the byte to search for
Returns:
the number of times the item appears in the list

equals

public static final boolean equals(byte[] x,
                                   int i,
                                   byte[] y)
Returns whether given bytes in the given array at the given index are the same as the bytes in the other given array

Parameters:
x - the first byte array
i - the starting index in the first byte array
y - the bytes to compare to
Returns:
true if there was a match, false otherwise

indexOf

public static final int indexOf(byte[] theList,
                                byte[] x)
Returns the index of the given bytes in the given array.

Parameters:
theList - the byte array
x - the bytes to search for
Returns:
the index of the bytes in the list, or -1 if not found

indexOf

public static final int indexOf(byte[] theList,
                                byte[] x,
                                int startIndex)
Returns the index of the given bytes in the given array.

Parameters:
theList - the byte array
x - the bytes to search for
startIndex - the index to start from
Returns:
the index of the bytes in the list, or -1 if not found

indexOf

public static final int indexOf(long[] theList,
                                long x)
Returns the index of the given number in the given array.

Parameters:
theList - the string array
x - the number to search for
Returns:
the index of the number in the list, or -1 if not found

indexOf

public static final int indexOf(long[] theList,
                                long x,
                                int startIndex)
Returns the index of the given number in the given array.

Parameters:
theList - the string array
x - the number to search for
startIndex - the index to start from
Returns:
the index of the number in the list, or -1 if not found

numContains

public static final int numContains(long[] theList,
                                    long x)
Returns the number of the given items in the given array It is case sensitive.

Parameters:
theList - the list
x - the long to search for
Returns:
the number of times the item appears in the list

indexOf

public static final int indexOf(java.util.Enumeration<?> e,
                                java.lang.Object key)
Iterates through the given enumeration, returning which the number of times it must be iterated through before the given object is found

Parameters:
e - the enumeration of objects
key - the object to look for
Returns:
the index of the object in the enumeration

indexOfIgnoreCase

public static final int indexOfIgnoreCase(java.util.Enumeration<?> e,
                                          java.lang.String str)
Iterates through the given enumeration, returning which the number of times it must be iterated through before the given string is found by calling toString() on each object, and comparing their case insensitive values.

Parameters:
e - the enumeration of objects
str - the String to look for
Returns:
the index of the String in the enumeration

indexOfFirst

public static final int indexOfFirst(java.lang.Object[] theList,
                                     java.lang.Object[] objs)
Returns the index of the first of the given Objects in the given array.

Parameters:
theList - the Object array
objs - the Objects to search for
Returns:
the index of the Object in the list, or -1 if not found

indexOf

public static final int indexOf(java.lang.Object[] theList,
                                java.lang.Object obj)
Returns the index of the given Object appears in the given list.

Parameters:
theList - the list
obj - the Object to search for
Returns:
the index of the object in the list, or -1 if not found

indexOf

public static final int indexOf(java.lang.Object[] theList,
                                java.lang.Object obj,
                                int startIndex)
Returns the index of the given Object appears in the given list.

Parameters:
theList - the list
obj - the Object to search for
startIndex - the index to start from
Returns:
the index of the object in the list, or -1 if not found

numContains

public static final int numContains(java.lang.Object[] theList,
                                    java.lang.Object obj)
Returns the number of the given items in the given array It is case sensitive.

Parameters:
theList - the list
obj - the obj to search for
Returns:
the number of times the item appears in the list

indexOf

public static final int indexOf(java.util.List<?> theList,
                                java.lang.Object obj,
                                int startIndex)
Returns the index of the given Object appears in the given list.

Parameters:
theList - the list
obj - the Object to search for
startIndex - the index to start from
Returns:
the index of the object in the list, or -1 if not found

numContains

public static final int numContains(java.util.List<?> theList,
                                    java.lang.Object obj)
Returns the number of the given items in the given array It is case sensitive.

Parameters:
theList - the list
obj - the Object to search for
Returns:
the number of times the item appears in the list

indexOfAsString

public static final int indexOfAsString(java.lang.Object[] theList,
                                        java.lang.Object obj)
Returns the index of the given Object appears in the given list, after calling toString on both the obj given and the list Object.

Parameters:
theList - the list of Objects to call toString ob
obj - the Object to search for, after calling toString
Returns:
the index of the object in the list, or -1 if not found

indexOf

public static final int indexOf(java.util.Iterator<?> i,
                                java.lang.Object key)
Iterates through the given Iterator, returning which the number of times it must be iterated through before the given object is found

Parameters:
i - the Iterator of objects
key - the object to look for
Returns:
the index of the object in the Iterator

indexOfIgnoreCase

public static final int indexOfIgnoreCase(java.util.Iterator<?> i,
                                          java.lang.String str)
Iterates through the given Iterator, returning which the number of times it must be iterated through before the given string is found by calling toString() on each object, and comparing their case insensitive values.

Parameters:
i - the Iterator of objects
str - the String to look for
Returns:
the index of the String in the Iterator

indexOfIgnoreCase

public static final int indexOfIgnoreCase(java.util.List<?> theList,
                                          java.lang.String str)
Returns the index of the given string in the list by calling toString() and comparing their case insensitive values.

Parameters:
theList - the List of objects
str - the String to look for
Returns:
the index of the String in the List

contains

public static final boolean contains(java.lang.String[] theList,
                                     java.lang.String str)
Returns whether the given string appears in the given list. It is case sensitive.

Parameters:
theList - the list
str - the string to search for
Returns:
true if the string is in the list, false otherwise

contains

public static final boolean contains(java.util.Enumeration<java.lang.String> e,
                                     java.lang.String str)
Returns whether the given string appears in the given enumeration of strings. It is case sensitive.

Parameters:
e - the enumeration
str - the string to search for
Returns:
true if the string is in the list, false otherwise

contains

public static final boolean contains(char[] theList,
                                     char c)
Returns whether the given char appears in the given list.

Parameters:
theList - the list
c - the char to search for
Returns:
true if the char is in the list, false otherwise

contains

public static final boolean contains(byte[] theList,
                                     byte b)
Returns whether the given byte appears in the given list.

Parameters:
theList - the list
b - the byte to search for
Returns:
true if the byte is in the list, false otherwise

containsIgnoreCase

public static final boolean containsIgnoreCase(java.lang.String[] theList,
                                               java.lang.String str)
Returns whether the given string appears in the given list. It is case insensitive.

Parameters:
theList - the list
str - the string to search for
Returns:
true if the string is in the list, false otherwise

containsIgnoreCase

public static final boolean containsIgnoreCase(java.util.List<?> theList,
                                               java.lang.String str)
Returns whether the given string appears in the given list. It is case insensitive.

Parameters:
theList - the list
str - the string to search for
Returns:
true if the string is in the list, false otherwise

contains

public static final boolean contains(java.lang.Object[] theList,
                                     java.lang.Object obj)
Returns whether the given Object appears in the given list.

Parameters:
theList - the list
obj - the Object to search for
Returns:
true if the Object is in the list, false otherwise

containsAsString

public static final boolean containsAsString(java.lang.Object[] theList,
                                             java.lang.Object obj)
Returns whether the given Object appears in the given list, after calling toString on both the list object and the given object

Parameters:
theList - the list
obj - the Object to search for, which is a toString
Returns:
true if the Object is in the list, false otherwise

contains

public static final boolean contains(java.lang.Object[] theList,
                                     java.lang.Object[] objs)
Returns whether any of the given given Objects appears in the given list.

Parameters:
theList - the list
objs - the Objects to search for
Returns:
true if the Object is in the list, false otherwise

contains

public static final boolean contains(int[] theList,
                                     int x)
Returns whether the given int appears in the given list.

Parameters:
theList - the list
x - the int to search for
Returns:
true if the int is in the list, false otherwise

contains

public static final boolean contains(int[] theList,
                                     int[] xs)
Returns whether any of the given ints appears in the given list.

Parameters:
theList - the list
xs - the ints to search for
Returns:
true if the int is in the list, false otherwise

compareRange

public static final boolean compareRange(java.nio.ByteBuffer buf,
                                         byte[] bytes,
                                         int pos)
Returns true if the given bytebuffer, starting at the given pos, is the same as the given byte array.

Parameters:
buf - the bytebuffer to compare
bytes - the byte array to compare
pos - the starting position in the bytebuffer
Returns:
true if they match, false otherwise

containIndex

public static final int containIndex(java.nio.ByteBuffer buf,
                                     byte[][] bytes,
                                     int pos)
Compares the given bytebuffer, starting at the given pos, with each byte array in the given byte array array, and returns the top level index of which byte array matches the bytebuffer at that position. What's this good for?

Parameters:
buf - the bytebuffer
bytes - the array of byte arrays
pos - the starting position in the bytebuffer
Returns:
which byte array matches, or -1

startsWith

public static final int startsWith(java.lang.String[] theList,
                                   java.lang.String str)
Returns the index of the string in the string array that starts with the given string. The search is case sensitive

Parameters:
theList - the list of strings
str - the string to look for
Returns:
index of entry in the list that starts with the string, or -1

startsWithIgnoreCase

public static final int startsWithIgnoreCase(java.lang.String[] theList,
                                             java.lang.String str)
Returns the index of the string in the string array that starts with the given string. The search is case insensitive

Parameters:
theList - the list of strings
str - the string to look for
Returns:
index of entry in the list that starts with the string, or -1

startsAnyWith

public static final boolean startsAnyWith(java.lang.String[] theList,
                                          java.lang.String str)
Returns true if any string in string array starts with the given string. The search is case sensitive

Parameters:
theList - the list of strings
str - the string to look for
Returns:
true if any string in the list starts with the str, or false

startsAnyWithIgnoreCase

public static final boolean startsAnyWithIgnoreCase(java.lang.String[] theList,
                                                    java.lang.String str)
Returns true if any string in string array starts with the given string. The search is case insensitive

Parameters:
theList - the list of strings
str - the string to look for
Returns:
true if any string in the list starts with the str, or false

endsWith

public static final int endsWith(java.lang.String[] theList,
                                 java.lang.String str)
Returns the index of the string in the string array that ends with the given string. The search is case sensitive

Parameters:
theList - the list of strings
str - the string to look for
Returns:
index of entry in the list that ends with the string, or -1

endsWithIgnoreCase

public static final int endsWithIgnoreCase(java.lang.String[] theList,
                                           java.lang.String str)
Returns the index of the string in the string array that ends with the given string. The search is case insensitive

Parameters:
theList - the list of strings
str - the string to look for
Returns:
index of entry in the list that ends with the string, or -1

endsAnyWith

public static final boolean endsAnyWith(java.lang.String[] theList,
                                        java.lang.String str)
Returns true if any string in string array ends with the given string. The search is case sensitive

Parameters:
theList - the list of strings
str - the string to look for
Returns:
true if any string in the list ends with the str, or false

endsAnyWithIgnoreCase

public static final boolean endsAnyWithIgnoreCase(java.lang.String[] theList,
                                                  java.lang.String str)
Returns true if any string in string array ends with the given string. The search is case insensitive

Parameters:
theList - the list of strings
str - the string to look for
Returns:
true if any string in the list ends with the str, or false