public interface Principal
| java.security.Principal |
| |
该界面代表了委托人的抽象概念,可用于表示任何实体,如个人,公司和登录ID。
也可以看看:
Public methods |
|
|---|---|
abstract boolean |
equals(Object another) 将此主体与指定的对象进行比较。 |
abstract String |
getName() 返回此主体的名称。 |
abstract int |
hashCode() 返回此主体的哈希码。 |
abstract String |
toString() 返回此主体的字符串表示形式。 |
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. |
String toString ()
返回此主体的字符串表示形式。
| Returns | |
|---|---|
String |
a string representation of this principal. |