Module dev.metaschema.core
Class IExpectConstraint.Builder
java.lang.Object
dev.metaschema.core.model.constraint.AbstractConstraintBuilder<T,R>
dev.metaschema.core.model.constraint.AbstractConfigurableMessageConstraintBuilder<IExpectConstraint.Builder,IExpectConstraint>
dev.metaschema.core.model.constraint.IExpectConstraint.Builder
- Enclosing interface:
- IExpectConstraint
public static final class IExpectConstraint.Builder
extends AbstractConfigurableMessageConstraintBuilder<IExpectConstraint.Builder,IExpectConstraint>
Provides a builder pattern for constructing a new
IExpectConstraint.-
Method Summary
Modifier and TypeMethodDescriptionprotected IExpectConstraint.BuildergetThis()Get the builder.protected IExpectConstraintGet a new instance of the built object.test(IMetapathExpression test) Use the provided test to validate selected nodes.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
-
test
Use the provided test to validate selected nodes.- Parameters:
test- the test metapath expression to use- Returns:
- this builder
-
getThis
Description copied from class:AbstractConstraintBuilderGet the builder.Implementations of this method must return
this.- Specified by:
getThisin classAbstractConstraintBuilder<IExpectConstraint.Builder,IExpectConstraint> - Returns:
- the builder instance
-
validate
protected void validate()Description copied from class:AbstractConstraintBuilderValidate the values provided to the builder.- Overrides:
validatein classAbstractConstraintBuilder<IExpectConstraint.Builder,IExpectConstraint>
-
newInstance
Description copied from class:AbstractConstraintBuilderGet a new instance of the built object.- Specified by:
newInstancein classAbstractConstraintBuilder<IExpectConstraint.Builder,IExpectConstraint> - Returns:
- the built instance
-