/** * Deletes the option from its set of jvm options and then invokes the next * in the chain. * * @param option * @return Returns true if the option exists in at least one element in the * chain. */ boolean deleteJvmOption(String option) { boolean b1 = jvmOptions.remove(option); boolean b2 = next().deleteJvmOption(option); return (b1 || b2); }
/** * Deletes the option from its set of jvm options and then invokes the next * in the chain. * @param option * @return Returns true if the option exists in at least one element in the * chain. */ boolean deleteJvmOption(String option) { boolean b1 = jvmOptions.remove(option); boolean b2 = next().deleteJvmOption(option); return (b1 || b2); }
/** * Deletes the options from its current set. * * @param options * @return Returns an array of options that <bold>could not</bold> be * deleted. The array will be atleast of 0 length. An array of length > 0 * indicates that some options haven't been deleted successfully. * @throws IllegalArgumentException If options param is null. */ public String[] deleteJvmOptions(String[] options) { if (null == options) { throw new IllegalArgumentException(); } final Set donotExist = new HashSet(); for (int i = 0; i < options.length; i++) { if (!head.deleteJvmOption(options[i])) { donotExist.add(options[i]); } } return toStringArray(donotExist); }
/** * Deletes the options from its current set. * @param options * @return Returns an array of options that <bold>could not</bold> be * deleted. The array will be atleast of 0 length. An array of * length > 0 indicates that some options haven't been deleted successfully. * @throws IllegalArgumentException If options param is null. */ public String[] deleteJvmOptions(String[] options) { if (null == options) { throw new IllegalArgumentException(); } //The following tokenizes the options. // options = tokenize(options); final Set donotExist = new HashSet(); for (int i = 0; i < options.length; i++) { if (!head.deleteJvmOption(options[i])) { donotExist.add(options[i]); } } return toStringArray(donotExist); }