Builds Strings instances.
| 35 | * Builds {@link Strings} instances. |
| 36 | */ |
| 37 | public static class Builder extends AbstractSupplier<Strings, Builder, RuntimeException> { |
| 38 | |
| 39 | /** |
| 40 | * Ignores case when possible. |
| 41 | */ |
| 42 | private boolean ignoreCase; |
| 43 | |
| 44 | /** |
| 45 | * Compares null as less when possible. |
| 46 | */ |
| 47 | private boolean nullIsLess; |
| 48 | |
| 49 | /** |
| 50 | * Constructs a new instance. |
| 51 | */ |
| 52 | private Builder() { |
| 53 | // empty |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * Gets a new {@link Strings} instance. |
| 58 | */ |
| 59 | @Override |
| 60 | public Strings get() { |
| 61 | return ignoreCase ? new CiStrings(nullIsLess) : new CsStrings(nullIsLess); |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * Sets the ignoreCase property for new Strings instances. |
| 66 | * |
| 67 | * @param ignoreCase the ignoreCase property for new Strings instances. |
| 68 | * @return {@code this} instance. |
| 69 | */ |
| 70 | public Builder setIgnoreCase(final boolean ignoreCase) { |
| 71 | this.ignoreCase = ignoreCase; |
| 72 | return asThis(); |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * Sets the nullIsLess property for new Strings instances. |
| 77 | * |
| 78 | * @param nullIsLess the nullIsLess property for new Strings instances. |
| 79 | * @return {@code this} instance. |
| 80 | */ |
| 81 | public Builder setNullIsLess(final boolean nullIsLess) { |
| 82 | this.nullIsLess = nullIsLess; |
| 83 | return asThis(); |
| 84 | } |
| 85 | |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Case-insensitive extension. |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…