Module dev.metaschema.core
Class IMatchesConstraint.Builder
java.lang.Object
dev.metaschema.core.model.constraint.AbstractConstraintBuilder<T,R>
dev.metaschema.core.model.constraint.AbstractConfigurableMessageConstraintBuilder<IMatchesConstraint.Builder,IMatchesConstraint>
dev.metaschema.core.model.constraint.IMatchesConstraint.Builder
- Enclosing interface:
- IMatchesConstraint
public static final class IMatchesConstraint.Builder
extends AbstractConfigurableMessageConstraintBuilder<IMatchesConstraint.Builder,IMatchesConstraint>
Provides a builder pattern for constructing a new
IMatchesConstraint.-
Method Summary
Modifier and TypeMethodDescriptiondatatype(IDataTypeAdapter<?> datatype) Use the provided data type to validate associated values.protected IMatchesConstraint.BuildergetThis()Get the builder.protected IMatchesConstraintGet a new instance of the built object.Use the provided pattern to validate associated values.Use the provided pattern to validate associated values.protected voidvalidate()Validate the values provided to the builder.Methods inherited from class dev.metaschema.core.model.constraint.AbstractConfigurableMessageConstraintBuilder
getMessage, messageMethods inherited from class dev.metaschema.core.model.constraint.AbstractConstraintBuilder
build, description, formalName, getDescription, getFormalName, getId, getLevel, getProperties, getRemarks, getSource, getTarget, identifier, level, properties, property, property, remarks, source, target
-
Method Details
-
regex
Use the provided pattern to validate associated values.- Parameters:
pattern- the pattern to use- Returns:
- this builder
-
regex
Use the provided pattern to validate associated values.- Parameters:
pattern- the expected pattern- Returns:
- this builder
-
datatype
Use the provided data type to validate associated values.- Parameters:
datatype- the expected data type- Returns:
- this builder
-
getThis
Description copied from class:AbstractConstraintBuilderGet the builder.Implementations of this method must return
this.- Specified by:
getThisin classAbstractConstraintBuilder<IMatchesConstraint.Builder,IMatchesConstraint> - Returns:
- the builder instance
-
validate
protected void validate()Description copied from class:AbstractConstraintBuilderValidate the values provided to the builder.- Overrides:
validatein classAbstractConstraintBuilder<IMatchesConstraint.Builder,IMatchesConstraint>
-
newInstance
Description copied from class:AbstractConstraintBuilderGet a new instance of the built object.- Specified by:
newInstancein classAbstractConstraintBuilder<IMatchesConstraint.Builder,IMatchesConstraint> - Returns:
- the built instance
-