- java.lang.Object
-
- com.sun.security.auth.UnixNumericUserPrincipal
-
- 实现的所有接口
-
Serializable,Principal
public class UnixNumericUserPrincipal extends Object implements Principal, Serializable
此类实现Principal接口并表示用户的Unix标识号(UID)。诸如此
UnixNumericUserPrincipal可以与特定的Subject相关联以使用附加身份来扩充该Subject。 有关如何实现此目的的更多信息,请参阅Subject类。 然后,授权决策可以基于与Subject相关联的Subject。- 另请参见:
-
Principal,Subject, Serialized Form
-
-
构造方法摘要
构造方法 构造器 描述 UnixNumericUserPrincipal(long name)使用用户标识号(UID)的长表示创建UnixNumericUserPrincipal。UnixNumericUserPrincipal(String name)使用用户标识号(UID)的String表示创建UnixNumericUserPrincipal。
-
方法摘要
所有方法 实例方法 具体的方法 变量和类型 方法 描述 booleanequals(Object o)将指定的Object与此UnixNumericUserPrincipal进行比较以获得相等性。StringgetName()返回此UnixNumericUserPrincipal的用户标识号(UID)。inthashCode()返回此UnixNumericUserPrincipal的哈希码。longlongValue()返回此UnixNumericUserPrincipal的用户标识号(UID)。StringtoString()返回此UnixNumericUserPrincipal的字符串表示UnixNumericUserPrincipal。
-
-
-
构造方法详细信息
-
UnixNumericUserPrincipal
public UnixNumericUserPrincipal(String name)
使用String表示用户的标识号(UID)创建UnixNumericUserPrincipal。- 参数
-
name- 此用户的用户标识号(UID)。 - 异常
-
NullPointerException- 如果name是null。
-
UnixNumericUserPrincipal
public UnixNumericUserPrincipal(long name)
使用用户标识号(UID)的长表示创建UnixNumericUserPrincipal。- 参数
-
name- 此用户的用户标识号(UID)表示为long。
-
-
方法详细信息
-
getName
public String getName()
返回此UnixNumericUserPrincipal的用户标识号(UID)。
-
longValue
public long longValue()
返回此UnixNumericUserPrincipal的用户标识号(UID)。- 结果
-
这个
UnixNumericUserPrincipal的用户标识号(UID)很长。
-
toString
public String toString()
返回此UnixNumericUserPrincipal的字符串表示UnixNumericUserPrincipal。
-
equals
public boolean equals(Object o)
将指定的Object与此UnixNumericUserPrincipal进行比较以获得相等性。 如果给定对象也是UnixNumericUserPrincipal并且两个UnixNumericUserPrincipals具有相同的用户标识号(UID),则返回true。
-
hashCode
public int hashCode()
返回此UnixNumericUserPrincipal的哈希码。- Specified by:
-
hashCode,界面Principal - 重写:
-
hashCode在类Object - 结果
-
这个
UnixNumericUserPrincipal的哈希码。 - 另请参见:
-
Object.equals(java.lang.Object),System.identityHashCode(java.lang.Object)
-
-