Class IdentityItem

java.lang.Object
com.adobe.marketing.mobile.edge.identity.IdentityItem

public final class IdentityItem extends Object
Identity is used to clearly distinguish people that are interacting with digital experiences. An IdentityItem is intended to be included in an instance of IdentityMap.
See Also:
  • Constructor Details

    • IdentityItem

      public IdentityItem(@NonNull String id, @Nullable AuthenticatedState authenticatedState, boolean primary)
      Creates a new IdentityItem. An IdentityItem should not have an empty or null id value. An IdentityMap will reject IdentityItems with null or empty identifiers.
      Parameters:
      id - id for the item; should not be null
      authenticatedState - AuthenticatedState for the item; if none is provided AuthenticatedState.AMBIGUOUS is used as default
      primary - primary flag for the item
      Throws:
      IllegalArgumentException - if id is null
    • IdentityItem

      public IdentityItem(@NonNull String id)
      Creates a new IdentityItem with default values authenticatedState) is set to AMBIGUOUS (@code primary is set to false An IdentityItem should not have an empty or null id value. An IdentityMap will reject IdentityItems with null or empty identifiers.
      Parameters:
      id - the id for this IdentityItem; should not be null
      Throws:
      IllegalArgumentException - if id is null
    • IdentityItem

      public IdentityItem(@NonNull IdentityItem item)
      Creates a copy of item.
      Parameters:
      item - A IdentityItem to be copied; should not be null
  • Method Details

    • getId

      @NonNull public String getId()
      Identity of the consumer in the related namespace.
      Returns:
      The id for this identity item
    • getAuthenticatedState

      @NonNull public AuthenticatedState getAuthenticatedState()
      The state this identity is authenticated.
      Returns:
      Current AuthenticatedState for this item
    • isPrimary

      public boolean isPrimary()
      Indicates if this identity is the preferred identity. Is used as a hint to help systems better organize how identities are queried.
      Returns:
      true if this item is primary, false otherwise
    • toString

      @NonNull public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object