Package graphql.scalars.regex
Class RegexScalar.Builder
- java.lang.Object
-
- graphql.scalars.regex.RegexScalar.Builder
-
- Enclosing class:
- RegexScalar
public static class RegexScalar.Builder extends java.lang.Object
A builder forRegexScalar
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RegexScalar.Builder
addPattern(java.util.regex.Pattern pattern)
Adds aPattern
that controls the acceptable value for this scalarRegexScalar.Builder
addPatterns(java.util.regex.Pattern... patterns)
Adds aPattern
that controls the acceptable value for this scalargraphql.schema.GraphQLScalarType
build()
RegexScalar.Builder
description(java.lang.String description)
Sets the description of the regex scalarRegexScalar.Builder
name(java.lang.String name)
Sets the name of the regex scalar
-
-
-
Method Detail
-
name
public RegexScalar.Builder name(java.lang.String name)
Sets the name of the regex scalar- Parameters:
name
- the name of the regex scalar- Returns:
- this builder
-
description
public RegexScalar.Builder description(java.lang.String description)
Sets the description of the regex scalar- Parameters:
description
- the description of the regex scalar- Returns:
- this builder
-
addPattern
public RegexScalar.Builder addPattern(java.util.regex.Pattern pattern)
Adds aPattern
that controls the acceptable value for this scalar- Parameters:
pattern
- the regex pattern- Returns:
- this builder
-
addPatterns
public RegexScalar.Builder addPatterns(java.util.regex.Pattern... patterns)
Adds aPattern
that controls the acceptable value for this scalar- Parameters:
patterns
- one of more regex patterns- Returns:
- this builder
-
build
public graphql.schema.GraphQLScalarType build()
- Returns:
- the built
RegexScalar
-
-