/** * Construct CellRangeAddress by the parsing the given string * * @param cellRangeAddress * The String to be parsed into CellRangeAddress * @throws IllegalArgumentException if the given argument is not a valid CellRangeAddress */ public CellRangeAddress(String cellRangeAddress) throws IllegalArgumentException { if (!isValid(cellRangeAddress)) { throw new IllegalArgumentException( "parameter is invalid for datatype CellRangeAddress"); } mCellRangeAddress = cellRangeAddress; }
/** * Construct CellRangeAddress by the parsing the given string * * @param cellRangeAddress * The String to be parsed into CellRangeAddress * @throws IllegalArgumentException if the given argument is not a valid CellRangeAddress */ public CellRangeAddress(String cellRangeAddress) throws IllegalArgumentException { if (!isValid(cellRangeAddress)) { throw new IllegalArgumentException( "parameter is invalid for datatype CellRangeAddress"); } mCellRangeAddress = cellRangeAddress; }
/** * Construct CellRangeAddress by the parsing the given string * * @param cellRangeAddress * The String to be parsed into CellRangeAddress * @throws IllegalArgumentException if the given argument is not a valid CellRangeAddress */ public CellRangeAddress(String cellRangeAddress) throws IllegalArgumentException { if (!isValid(cellRangeAddress)) { throw new IllegalArgumentException( "parameter is invalid for datatype CellRangeAddress"); } mCellRangeAddress = cellRangeAddress; }
/** * check if the specified String is a valid {@odf.datatype cellRangeAddressList} data type * @param stringValue the value to be tested * @return true if the value of argument is valid for {@odf.datatype cellRangeAddressList} data type * false otherwise */ public static boolean isValid(String stringValue) { if (stringValue == null) { return false; } if (stringValue.length() == 0) { return true; } String[] names = stringValue.split(" "); for (int i = 0; i < names.length; i++) { if (!CellRangeAddress.isValid(names[i])) { return false; } } return true; } }
/** * check if the specified String is a valid {@odf.datatype cellRangeAddressList} data type * @param stringValue the value to be tested * @return true if the value of argument is valid for {@odf.datatype cellRangeAddressList} data type * false otherwise */ public static boolean isValid(String stringValue) { if (stringValue == null) { return false; } if (stringValue.length() == 0) { return true; } String[] names = stringValue.split(" "); for (int i = 0; i < names.length; i++) { if (!CellRangeAddress.isValid(names[i])) { return false; } } return true; } }
/** * check if the specified String is a valid {@odf.datatype cellRangeAddressList} data type * @param stringValue the value to be tested * @return true if the value of argument is valid for {@odf.datatype cellRangeAddressList} data type * false otherwise */ public static boolean isValid(String stringValue) { if (stringValue == null) { return false; } if (stringValue.length() == 0) { return true; } String[] names = stringValue.split(" "); for (int i = 0; i < names.length; i++) { if (!CellRangeAddress.isValid(names[i])) { return false; } } return true; } }