com.samsung.android.sdk.healthdata
Class HealthPermissionManager.PermissionKey
- java.lang.Object
-
- com.samsung.android.sdk.healthdata.HealthPermissionManager.PermissionKey
-
- Enclosing class:
- HealthPermissionManager
public static class HealthPermissionManager.PermissionKey extends Object
This class represents the permission key which consists of a health data type and a permission type. It is used as a key to request permission and checks the permission state.- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor and Description PermissionKey(String dataType, HealthPermissionManager.PermissionType permissionType)
Creates a PermissionKey instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description boolean
equals(Object obj)
Checks if this instance is equal with the given object.String
getDataType()
Gets the health data type of the permission key.HealthPermissionManager.PermissionType
getPermissionType()
Gets the permission type of the permission key.int
hashCode()
Returns a hash code value for this instance.
-
-
-
Constructor Detail
-
PermissionKey
public PermissionKey(String dataType, HealthPermissionManager.PermissionType permissionType)
Creates a PermissionKey instance.- Parameters:
dataType
- The health data typepermissionType
- The permission type- Since:
- 1.0.0
-
-
Method Detail
-
getDataType
public String getDataType()
Gets the health data type of the permission key.- Returns:
- the health data type
- Since:
- 1.0.0
-
getPermissionType
public HealthPermissionManager.PermissionType getPermissionType()
Gets the permission type of the permission key.- Returns:
- The permission type
- Since:
- 1.0.0
-
equals
public boolean equals(Object obj)
Checks if this instance is equal with the given object. In other to be equal,obj
must an instance ofPermissionKey
.- Overrides:
equals
in classObject
- Parameters:
obj
- ThePermissionKey
object to compare this instance with- Returns:
true
if the given object is equal to this instance, orfalse
- See Also:
hashCode()
-
hashCode
public int hashCode()
Returns a hash code value for this instance.
Ifequals(Object)
returnstrue
for two objects, their hash code values are same.- Overrides:
hashCode
in classObject
- Returns:
- The hash code value for this instance
- See Also:
equals(Object)
-
-