public class KvManagerConfig extends Object
KvManager instances,
including the caller's package name and distributed network type.SystemCapability.Data#DATA_DISTRIBUTEDDATAMGR| 构造器 | 说明 |
|---|---|
KvManagerConfig(Context context) |
A constructor used to create a
KvManagerConfig instance based on the application context. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
boolean |
equals(Object obj) |
Checks whether this object equals the specified object.
|
UserInfo |
getUserInfo() |
Obtains user information.
|
int |
hashCode() |
Obtains the hash code of this object.
|
boolean |
isInvalid() |
Checks whether the
KvManagerConfig instance is valid. |
void |
setUserInfo(UserInfo userInfo) |
Sets user information.
|
public KvManagerConfig(Context context)
KvManagerConfig instance based on the application context.
The input parameter context is used to obtain the package name of the caller.
By default, the same-account networking is used.
context - Indicates the context of the caller's application.public boolean isInvalid()
KvManagerConfig instance is valid.
If the input package name or UserInfo is null, the KvManagerConfig instance
is considered invalid.
true if the KvManagerConfig instance is invalid; returns false otherwise.public UserInfo getUserInfo()
public void setUserInfo(UserInfo userInfo)
userInfo - Indicates the user information to set.public int hashCode()
hashCode 在类中 ObjectObject.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)public boolean equals(Object obj)
equals 在类中 Objectobj - Indicates the object to compare.true if the two objects are equal; returns false otherwise.Object.hashCode(),
HashMap