Class UserFields

    • Constructor Summary

      Constructors 
      Constructor Description
      UserFields()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isEmpty()
      Checks whether the current UserFields is empty.
      void putCountry​(java.lang.String country)
      Specify new country code.
      void putDisplayName​(java.lang.String displayName)
      Specify new display name.
      void putLocale​(LocaleContainer locale)
      Specify new locale(BCP47).
      void remove​(java.lang.String key)
      Remove a pair of key/value from KiiBaseObject
      void removeCountry()
      Remove country.
      void removeDisplayName()
      Remove display name.
      void removeFromServer​(java.lang.String key)
      Remove a pair of key/value from UserFields.
      void removeLocale()
      Remove locale.
      void set​(java.lang.String key, byte[] value)
      Create/Update the key/value byte array in the KiiBaseObject
      void set​(java.lang.String key, double value)
      Create/Update association of the specified key with the specified double value in the KiiObject.
      void set​(java.lang.String key, int value)
      Create/Update the key/value int in the KiiBaseObject
      void set​(java.lang.String key, long value)
      Create/Update the key/value long in the KiiBaseObject
      void set​(java.lang.String key, android.net.Uri value)
      Create/Update the key/value Uri in the KiiBaseObject
      void set​(java.lang.String key, java.lang.Boolean value)
      Create/Update the key/value boolean in the KiiBaseObject
      void set​(java.lang.String key, java.lang.String value)
      Create/Update the key/value string in the KiiBaseObject
      void set​(java.lang.String key, org.json.JSONArray value)
      Create/Update association of the specified key with the specified JSONArray value in the KiiObject.
      void set​(java.lang.String key, org.json.JSONObject value)
      Create/Update the key/value JSONObject in the KiiBaseObject
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • UserFields

        public UserFields()
    • Method Detail

      • putDisplayName

        public void putDisplayName​(@NonNull
                                   java.lang.String displayName)
        Specify new display name.
        Parameters:
        displayName -
        Throws:
        java.lang.IllegalArgumentException - if KiiUser.isValidDisplayName(String) returns false for this displayName.
      • putCountry

        public void putCountry​(@NonNull
                               java.lang.String country)
        Specify new country code.
        Parameters:
        country -
        Throws:
        java.lang.IllegalArgumentException - if KiiUser.isValidCountry(String) returns false for this country.
      • putLocale

        public void putLocale​(@NonNull
                              LocaleContainer locale)
        Specify new locale(BCP47).
        Parameters:
        locale -
        Throws:
        java.lang.IllegalArgumentException - if locale is null
      • removeDisplayName

        public void removeDisplayName()
        Remove display name. This method removes display name which is put by putDisplayName(String). Even if you use this method, display name is not removed from server.
      • removeCountry

        public void removeCountry()
        Remove country. This method removes country which is put by putCountry(String). Even if you use this method, country is not removed from server.
      • removeLocale

        public void removeLocale()
        Remove locale. This method removes locale which is put by putLocale(LocaleContainer). Even if you use this method, locale is not removed from server.
      • toString

        @Nullable
        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • set

        public void set​(java.lang.String key,
                        int value)
        Description copied from class: KiiBaseObject
        Create/Update the key/value int in the KiiBaseObject
        Overrides:
        set in class KiiBaseObject
        Parameters:
        key - is Key string
        value - is Value int
      • set

        public void set​(java.lang.String key,
                        long value)
        Description copied from class: KiiBaseObject
        Create/Update the key/value long in the KiiBaseObject
        Overrides:
        set in class KiiBaseObject
        Parameters:
        key - is Key string
        value - is Value long
      • set

        public void set​(java.lang.String key,
                        byte[] value)
        Description copied from class: KiiBaseObject
        Create/Update the key/value byte array in the KiiBaseObject
        Overrides:
        set in class KiiBaseObject
        Parameters:
        key - is Key string
        value - in byte array
      • set

        public void set​(java.lang.String key,
                        java.lang.String value)
        Description copied from class: KiiBaseObject
        Create/Update the key/value string in the KiiBaseObject
        Overrides:
        set in class KiiBaseObject
        Parameters:
        key - is Key string
        value - is Value string
      • set

        public void set​(java.lang.String key,
                        java.lang.Boolean value)
        Description copied from class: KiiBaseObject
        Create/Update the key/value boolean in the KiiBaseObject
        Overrides:
        set in class KiiBaseObject
        Parameters:
        key - is Key string
        value - is Value boolean
      • set

        public void set​(java.lang.String key,
                        double value)
        Description copied from class: KiiBaseObject
        Create/Update association of the specified key with the specified double value in the KiiObject.
        NOTE: Before involving floating point value, please consider using integer(int/long) instead. For example, use percentage, permil, ppm, etc.
        The reason is:
      • Will dramatically improve the performance of bucket query.
      • Bucket query does not support the mixed result of integer and floating point. ex.) If you use same key for integer and floating point and inquire object with the integer value, objects which has double value with the key would not be evaluated in the query. (and vice versa)

Overrides:
set in class KiiBaseObject
Parameters:
key - Key string.
value - double value.