public class Schemas extends ContextHandler<ExecutionNotifier<?>>
Schema
instances.Constructor and Description |
---|
Schemas(ExecutionNotifier<?> context)
Creates a new Schemas instance.
|
Modifier and Type | Method and Description |
---|---|
static Optional<Integer> |
domainSize(Schema schema)
If the given schema value domain is bounded, returns the maximum number of values allowed.
|
static Integer |
maxLengthRequired(Schema schema)
Returns the maximum string length required by the given schema.
|
static Integer |
maxPatternMatch(org.cornutum.regexpgen.RegExpGen patternGen)
Returns the maximum length required for the given pattern generator.
|
static Integer |
maxPatternMatch(Schema schema)
Returns the maximum length required for pattern matches.
|
static Schema |
merge(Schema defaults,
Schema schema)
Creates a new schema by merging the contents of the given schema with the given default schema.
|
static Integer |
minLengthRequired(Schema schema)
Returns the minimum string length required by the given schema.
|
static Integer |
minPatternMatch(org.cornutum.regexpgen.RegExpGen patternGen)
Returns the minimum length required for the given pattern generator.
|
static Integer |
minPatternMatch(Schema schema)
Returns the minimum length required for pattern matches.
|
Schema |
normalize(Schema schema)
Updates the given
Schema to normalize property values. |
static Schema |
not(Schema schema)
Returns a schema that describes values that do not belong to the values described by the given schema.
|
static BigDecimal |
unitOf(Schema schema)
Returns the unit value for the number range defined by the given schema.
|
doFor, getContext, getNotifier, notifyError, notifyError, notifyWarning, notifyWarning, resultFor, setNotifier
public Schemas(ExecutionNotifier<?> context)
public static Schema not(Schema schema)
public static Schema merge(Schema defaults, Schema schema)
public Schema normalize(Schema schema)
Schema
to normalize property values.public static Integer maxPatternMatch(Schema schema)
public static Integer maxPatternMatch(org.cornutum.regexpgen.RegExpGen patternGen)
public static Integer minPatternMatch(Schema schema)
public static Integer minPatternMatch(org.cornutum.regexpgen.RegExpGen patternGen)
public static Integer minLengthRequired(Schema schema)
public static Integer maxLengthRequired(Schema schema)
public static Optional<Integer> domainSize(Schema schema)
Optional.empty()
.public static BigDecimal unitOf(Schema schema)
Copyright © 2024 The Cornutum Project. All rights reserved.