/** * 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; }
/** * Copies an existing {@link AsciiSet} so that you can augment it with additional values. * * @return A builder initialized to the same characters in the copied set. */ public AsciiSet.Builder copy() { Builder b = new Builder(); for (int i = 0; i < 128; i++) b.store[i] = store[i]; return b; }
/** * 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; }
/** * Copies an existing {@link AsciiSet} so that you can augment it with additional values. * * @return A builder initialized to the same characters in the copied set. */ public AsciiSet.Builder copy() { Builder b = new Builder(); for (int i = 0; i < 128; i++) b.store[i] = store[i]; return b; }
/** * Creates a builder for an ASCII set. * * @return A new builder. */ public static AsciiSet.Builder create() { return new Builder(); }
/** * Copies an existing {@link AsciiSet} so that you can augment it with additional values. * * @return A builder initialized to the same characters in the copied set. */ public AsciiSet.Builder copy() { Builder b = new Builder(); for (int i = 0; i < 128; i++) b.store[i] = store[i]; return b; }
/** * Creates a builder for an ASCII set. * * @return A new builder. */ public static AsciiSet.Builder create() { return new Builder(); }
/** * Creates a builder for an ASCII set. * * @return A new builder. */ public static AsciiSet.Builder create() { return new Builder(); }