public abstract class KeyEntity
extends java.lang.Object
KeyEntity abstract class wraps various attributes related to a key. Keys can be made
a favorite key to make them easier to find. When tapped, a group key will show all the individual
keys in the group. When tapped, a batch key will activate all the individual keys in the batch at
the same time.| Modifier and Type | Method and Description |
|---|---|
boolean |
areContentsTheSame(KeyEntity keyEntity)
Returns a boolean that represents whether or not the contents of two keys are the same.
|
boolean |
areItemsTheSame(KeyEntity keyEntity)
Returns a boolean that represents whether or not the items of two keys are the same.
|
abstract int |
badgeId()
Returns an int of the identification number of the badge the key belongs to.
|
abstract boolean |
favoriteKey()
Returns a boolean that represents whether or not the key is a favorite key.
|
abstract GroupKeyEntity |
groupKeyEntity()
Returns a
GroupKeyEntity object related to the key. |
abstract int |
keyId()
Returns an int of the identification number of the key.
|
abstract int |
keyOrder()
Returns an int of the sort order of keys.
|
abstract java.lang.String |
name()
Returns a String of the name of the key.
|
abstract KeyEntity |
withFavoriteKey(boolean favoriteKey)
Constructor for a
KeyEntity object with the favoriteKey set. |
public boolean areContentsTheSame(KeyEntity keyEntity)
keyEntity - See KeyEntitytrue if the two keys have the same name and are both a favorite key;
false otherwise.public boolean areItemsTheSame(KeyEntity keyEntity)
keyEntity - See KeyEntitytrue if the two keys have the same key ID;
false otherwise.public abstract int keyId()
Object.hashCode()
and Object.equals(Object) implementations.public abstract int badgeId()
public abstract java.lang.String name()
public abstract boolean favoriteKey()
true if the key is a favorite key;
false otherwise.public abstract int keyOrder()
public abstract KeyEntity withFavoriteKey(boolean favoriteKey)
KeyEntity object with the favoriteKey set.favoriteKey - See favoriteKey()KeyEntity object with the favoriteKey set.@Nullable public abstract GroupKeyEntity groupKeyEntity()
GroupKeyEntity object related to the key. Only keys that are part of a
group key will have this property. May be null.GroupKeyEntity object related to the key.