Most visited

Recently visited

Added in API level 1

Principal

public interface Principal

java.security.Principal
Known Indirect Subclasses


该界面代表了委托人的抽象概念,可用于表示任何实体,如个人,公司和登录ID。

也可以看看:

摘要(Summary)

公共方法(Public methods)

abstract boolean equals(Object another)

将此主体与指定的对象进行比较。

abstract String getName()

返回此主体的名称。

abstract int hashCode()

返回此主体的哈希码。

abstract String toString()

返回此主体的字符串表示形式。

公共方法(Public methods)

equals

Added in API level 1
boolean equals (Object another)

将此主体与指定的对象进行比较。 如果传入的对象与此接口的实现代表的主体匹配,则返回true。

参数(Parameters)
another Object: principal to compare with.
返回(Returns)
boolean true if the principal passed in is the same as that encapsulated by this principal, and false otherwise.

getName

Added in API level 1
String getName ()

返回此主体的名称。

返回(Returns)
String the name of this principal.

hashCode

Added in API level 1
int hashCode ()

返回此主体的哈希码。

返回(Returns)
int a hashcode for this principal.

toString

Added in API level 1
String toString ()

返回此主体的字符串表示形式。

返回(Returns)
String a string representation of this principal.

Hooray!