Class RegexScalar.Builder

  • Enclosing class:
    RegexScalar

    public static class RegexScalar.Builder
    extends java.lang.Object
    A builder for RegexScalar
    • Constructor Summary

      Constructors 
      Constructor Description
      Builder()  
    • Constructor Detail

      • Builder

        public Builder()
    • 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 a Pattern 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 a Pattern 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