/** * Create from a string of the form "idx=val,...,idx=val" * * @param string The string * @param n The length of the array * @return The array object * @throws SparseIntArrayFormatException If the string is not formatted as a * sparse array */ public static SparseIntArray fromString(String string, int n) throws VectorFormatException { return fromString(string, n, 0, ","); }
/** * Create from a string of the form "idx=val,...,idx=val" * * @param string The string * @param n The length of the array * @param defaultValue The default value * @return The array object * @throws SparseIntArrayFormatException If the string is not formatted as a * sparse array */ public static SparseIntArray fromString(String string, int length, int defaultValue) throws VectorFormatException { return fromString(string, length, defaultValue, ","); }
@Override public Vector<Integer> fromString(String s, int n) throws VectorFormatException { return SparseIntArray.fromString(s, n); }