blob: cdff30e883a1dc1b678bf05f3b88fa3aab66328e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package net.gcdc.asn1.datatypes;
public class AlphabetBuilder {
private final StringBuilder sb = new StringBuilder();
public AlphabetBuilder() {}
public String chars() {
return sb.toString();
}
public AlphabetBuilder withRange(char from, char to) {
for (char c = from; c <= to; c++) {
sb.append(c);
}
return this;
}
public AlphabetBuilder withChars(String str) {
sb.append(str);
return this;
}
public AlphabetBuilder withChars(Character... chars) {
for (char c : chars) {
sb.append(c);
}
return this;
}
}
|