Class 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:
    Identity Item Schema
    • Constructor Detail

      • 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 Detail

      • getId

        @NonNull
        public String getId()
        Identity of the consumer in the related namespace.
        Returns:
        The id for this identity 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object