Class Claim.ClaimBuilder

    • Constructor Detail

      • ClaimBuilder

        public ClaimBuilder​(String name)
        Constructor for a ClaimBuilder.
        Parameters:
        name - the name of this Claim, optionally with '#'-preceded locale suffix
    • Method Detail

      • build

        public Claim build()
        Return the claim this builder was building.
        Returns:
        A claim with the values set in this Builder
      • withLocale

        public Claim.ClaimBuilder withLocale​(Locale locale)
        Sets the locale of the ClaimBuilder.
        Parameters:
        locale - Claim's locale
        Returns:
        This builder
      • withJsonValue

        public Claim.ClaimBuilder withJsonValue​(JsonValue value)
        Sets the value for the ClaimBuilder.
        Parameters:
        value - The JsonValue to set, must not be null
        Returns:
        The builder
      • withJsonValues

        public Claim.ClaimBuilder withJsonValues​(List<JsonValue> values)
        Sets the values for the ClaimBuilder.
        Parameters:
        values - The JsonValue to set, must not be null
        Returns:
        The builder
      • withStringValues

        public Claim.ClaimBuilder withStringValues​(List<String> values)
        Sets the string values for the ClaimBuilder.
        Parameters:
        values - Values to set, must not be null or empty
        Returns:
        This builder
      • withStringValue

        public Claim.ClaimBuilder withStringValue​(String value)
        Sets the string value for the ClaimBuilder.
        Parameters:
        value - Value to set, must not be null
        Returns:
        This builder
      • withNumericalValues

        public Claim.ClaimBuilder withNumericalValues​(List<Number> values)
        Sets the number values for the ClaimBuilder.
        Parameters:
        values - Values to set, must not be null or empty
        Returns:
        This builder
      • withNumericalValue

        public Claim.ClaimBuilder withNumericalValue​(Number value)
        Sets the number value for the ClaimBuilder.
        Parameters:
        value - Value to set, must not be null
        Returns:
        This builder
      • withBooleanValues

        public Claim.ClaimBuilder withBooleanValues​(List<Boolean> values)
        Sets the boolean values for the ClaimBuilder.
        Parameters:
        values - Values to set, must not be null or empty
        Returns:
        This builder
      • withBooleanValue

        public Claim.ClaimBuilder withBooleanValue​(Boolean value)
        Sets the boolean value for the ClaimBuilder.
        Parameters:
        value - Value to set, must not be null
        Returns:
        This builder
      • isEssential

        public Claim.ClaimBuilder isEssential()
        Marks this ClaimBuilder as building an essential claim.
        Returns:
        This builder