Package com.configcat

Class User.Builder

  • Enclosing class:
    User

    public static class User.Builder
    extends java.lang.Object
    A builder that helps construct a User instance.
    • Constructor Summary

      Constructors 
      Constructor Description
      Builder()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      User build​(java.lang.String identifier)
      Builds the configured User instance.
      User.Builder country​(java.lang.String country)
      Optional.
      User.Builder custom​(java.util.Map<java.lang.String,​java.lang.String> custom)
      Optional.
      User.Builder email​(java.lang.String email)
      Optional.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • email

        public User.Builder email​(java.lang.String email)
        Optional. Sets the email of the user.
        Parameters:
        email - the email address.
        Returns:
        the builder.
      • country

        public User.Builder country​(java.lang.String country)
        Optional. Sets the country of the user.
        Parameters:
        country - the country.
        Returns:
        the builder.
      • custom

        public User.Builder custom​(java.util.Map<java.lang.String,​java.lang.String> custom)
        Optional. Sets the custom attributes of a user
        Parameters:
        custom - the custom attributes.
        Returns:
        the builder.
      • build

        public User build​(java.lang.String identifier)
        Builds the configured User instance.
        Parameters:
        identifier - the user identifier.
        Returns:
        the configured User instance.