Class UnlaunchUser

java.lang.Object
io.unlaunch.engine.UnlaunchUser

public class UnlaunchUser
extends java.lang.Object
Author:
umermansoor
  • Method Summary

    Modifier and Type Method Description
    void clearAllAttributes()  
    static UnlaunchUser create​(java.lang.String id)  
    static UnlaunchUser createAnonymous()  
    static UnlaunchUser createWithAttributes​(java.lang.String id, UnlaunchAttribute... attributes)  
    boolean equals​(java.lang.Object o)
    Returns true if the given UnlaunchUser object has same id as this object and the user attributes map has the same mappings as this map.
    java.util.Map<java.lang.String,​io.unlaunch.engine.UnlaunchValue> getAllAttributes()
    Returns a map of user attributes with values.
    java.lang.Object getAttribute​(java.lang.String key)
    Returns the value to which the specified key is mapped, or null if attributes map do not have the key.
    java.lang.String getId()
    Returns id of the UnlaunchUser
    int hashCode()  
    void putAttribute​(java.lang.String key, java.lang.Object value)
    Key should be non-null and non-empty string.
    void setAttributes​(java.util.Map<java.lang.String,​java.lang.Object> attributes)  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • create

      public static UnlaunchUser create​(java.lang.String id)
    • createWithAttributes

      public static UnlaunchUser createWithAttributes​(java.lang.String id, UnlaunchAttribute... attributes)
    • createAnonymous

      public static UnlaunchUser createAnonymous()
    • getAllAttributes

      public java.util.Map<java.lang.String,​io.unlaunch.engine.UnlaunchValue> getAllAttributes()
      Returns a map of user attributes with values.
      Returns:
      map of user attributes
    • setAttributes

      public void setAttributes​(java.util.Map<java.lang.String,​java.lang.Object> attributes)
    • putAttribute

      public void putAttribute​(java.lang.String key, java.lang.Object value)
      Key should be non-null and non-empty string. key should match to the attribute name used in the rule conditions.
      Parameters:
      key - attribute key
      value - attribute value
    • getAttribute

      public java.lang.Object getAttribute​(java.lang.String key)
      Returns the value to which the specified key is mapped, or null if attributes map do not have the key.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the value to which the specified key is mapped, or null if attributes do not contain this key
      Throws:
      java.lang.NullPointerException - if the specified key is null or is empty.
    • clearAllAttributes

      public void clearAllAttributes()
    • getId

      public java.lang.String getId()
      Returns id of the UnlaunchUser
      Returns:
      id of the user
    • equals

      public boolean equals​(java.lang.Object o)
      Returns true if the given UnlaunchUser object has same id as this object and the user attributes map has the same mappings as this map. key should match to the attribute name used in the rule conditions.
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object