java.lang.Object
com.sun.security.auth.UnixNumericUserPrincipal
- 所有已实现的接口:
-
Serializable,Principal
该类实现了
Principal接口,表示用户的Unix标识号(UID)。
诸如UnixNumericUserPrincipal这样的Principal可以与特定的Subject关联,以增强该Subject的附加身份。请参阅Subject类,了解如何实现此功能。然后可以基于与Subject关联的Principals做授权决策。
- 参见:
-
Constructor Summary
ConstructorsConstructorDescriptionUnixNumericUserPrincipal(long name) 使用用户标识号(UID)的长表示创建UnixNumericUserPrincipal。使用用户标识号(UID)的String表示创建UnixNumericUserPrincipal。 -
Method Summary
-
Constructor Details
-
UnixNumericUserPrincipal
使用用户标识号(UID)的String表示创建UnixNumericUserPrincipal。- 参数:
-
name- 此用户的用户标识号(UID)。 - 抛出:
-
NullPointerException- 如果name为null。
-
UnixNumericUserPrincipal
public UnixNumericUserPrincipal(long name) 使用用户标识号(UID)的长表示创建UnixNumericUserPrincipal。- 参数:
-
name- 此用户的用户标识号(UID)的长表示形式。
-
-
Method Details
-
getName
返回此UnixNumericUserPrincipal的用户标识号(UID)。 -
longValue
public long longValue()返回此UnixNumericUserPrincipal的用户标识号(UID)作为长整型。- 返回:
-
此
UnixNumericUserPrincipal的用户标识号(UID)作为长整型。
-
toString
返回此UnixNumericUserPrincipal的字符串表示形式。 -
equals
将指定的对象与此UnixNumericUserPrincipal进行比较以检查是否相等。如果给定对象也是UnixNumericUserPrincipal,并且两个UnixNumericUserPrincipals具有相同的用户标识号(UID),则返回true。 -
hashCode
public int hashCode()返回此UnixNumericUserPrincipal的哈希码。
-