/** * Shortcut for calling multiple ranges. * * @param s Strings of the form "A-Z" where A and Z represent the first and last characters in the range. * @return This object (for method chaining). */ public AsciiSet.Builder ranges(String...s) { for (String ss : s) { if (ss.length() != 3 || ss.charAt(1) != '-') throw new RuntimeException("Value passed to ranges() must be 3 characters"); range(ss.charAt(0), ss.charAt(2)); } return this; }
/** * Shortcut for calling multiple ranges. * * @param s Strings of the form "A-Z" where A and Z represent the first and last characters in the range. * @return This object (for method chaining). */ public AsciiSet.Builder ranges(String...s) { for (String ss : s) { if (ss.length() != 3 || ss.charAt(1) != '-') throw new RuntimeException("Value passed to ranges() must be 3 characters"); range(ss.charAt(0), ss.charAt(2)); } return this; }
/** * Shortcut for calling multiple ranges. * * @param s Strings of the form "A-Z" where A and Z represent the first and last characters in the range. * @return This object (for method chaining). */ public AsciiSet.Builder ranges(String...s) { for (String ss : s) { if (ss.length() != 3 || ss.charAt(1) != '-') throw new RuntimeException("Value passed to ranges() must be 3 characters"); range(ss.charAt(0), ss.charAt(2)); } return this; }