/** * Builds a new {@link ImmutableRegexpValidator ImmutableRegexpValidator}. * @return An immutable instance of RegexpValidator * @throws java.lang.IllegalStateException if any required attributes are missing */ public ImmutableRegexpValidator build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new ImmutableRegexpValidator(validationRegex, name, haveToContains); }