Package com.launchdarkly.sdk
Class UserAttribute
- java.lang.Object
-
- com.launchdarkly.sdk.UserAttribute
-
- All Implemented Interfaces:
JsonSerializable
@Deprecated public final class UserAttribute extends java.lang.Object implements JsonSerializable
Represents a built-in or custom attribute name supported byLDUser.Application code rarely needs to use this type; it is used internally by the SDK for efficiency in flag evaluations. It can also be used as a reference for the constant names of built-in attributes such as
EMAIL. However, in the newerLDContextmodel, there are very few reserved attribute names, so the equivalent ofEMAILwould simply be a custom attribute called "email".For a fuller description of user attributes and how they can be referenced in feature flag rules, see the reference guides on Setting user attributes and Targeting users.
-
-
Field Summary
Fields Modifier and Type Field Description static UserAttributeANONYMOUSDeprecated.Represents the anonymous attribute.static UserAttributeAVATARDeprecated.Represents the avatar URL attribute.static UserAttributeCOUNTRYDeprecated.Represents the country attribute.static UserAttributeEMAILDeprecated.Represents the user key attribute.static UserAttributeFIRST_NAMEDeprecated.Represents the first name attribute.static UserAttributeIPDeprecated.Represents the IP address attribute.static UserAttributeKEYDeprecated.Represents the user key attribute.static UserAttributeLAST_NAMEDeprecated.Represents the last name attribute.static UserAttributeNAMEDeprecated.Represents the full name attribute.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(java.lang.Object other)Deprecated.static UserAttributeforName(java.lang.String name)Deprecated.Returns a UserAttribute instance for the specified attribute name.java.lang.StringgetName()Deprecated.Returns the case-sensitive attribute name.inthashCode()Deprecated.booleanisBuiltIn()Deprecated.Returns true for a built-in attribute or false for a custom attribute.java.lang.StringtoString()Deprecated.
-
-
-
Field Detail
-
KEY
public static final UserAttribute KEY
Deprecated.Represents the user key attribute.
-
IP
public static final UserAttribute IP
Deprecated.Represents the IP address attribute.
-
EMAIL
public static final UserAttribute EMAIL
Deprecated.Represents the user key attribute.
-
NAME
public static final UserAttribute NAME
Deprecated.Represents the full name attribute.
-
AVATAR
public static final UserAttribute AVATAR
Deprecated.Represents the avatar URL attribute.
-
FIRST_NAME
public static final UserAttribute FIRST_NAME
Deprecated.Represents the first name attribute.
-
LAST_NAME
public static final UserAttribute LAST_NAME
Deprecated.Represents the last name attribute.
-
COUNTRY
public static final UserAttribute COUNTRY
Deprecated.Represents the country attribute.
-
ANONYMOUS
public static final UserAttribute ANONYMOUS
Deprecated.Represents the anonymous attribute.
-
-
Method Detail
-
forName
public static UserAttribute forName(java.lang.String name)
Deprecated.Returns a UserAttribute instance for the specified attribute name.For built-in attributes, the same instances are always reused and
isBuiltIn()will return true. For custom attributes, a new instance is created andisBuiltIn()will return false.- Parameters:
name- the attribute name- Returns:
- a
UserAttribute
-
getName
public java.lang.String getName()
Deprecated.Returns the case-sensitive attribute name.- Returns:
- the attribute name
-
isBuiltIn
public boolean isBuiltIn()
Deprecated.Returns true for a built-in attribute or false for a custom attribute.- Returns:
- true if it is a built-in attribute
-
equals
public boolean equals(java.lang.Object other)
Deprecated.- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
-