public final class UserIdPrincipal extends Object implements UserPrincipal
UserPrincipal
that represents users by integer IDs.Constructor and Description |
---|
UserIdPrincipal(int uid) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
static UserIdPrincipal |
fromUserPrinciple(UserPrincipal user)
Creates a
UserIdPrincipal from a UserPrincipal with an
unknown type. |
String |
getName()
Returns a string representation of this user's ID.
|
int |
getUid() |
int |
hashCode() |
public static UserIdPrincipal fromUserPrinciple(UserPrincipal user)
UserIdPrincipal
from a UserPrincipal
with an
unknown type.user
- the principal to convertUserIdPrincipal
IllegalArgumentException
- if the principal is not a
UserIdPrincipal
and does not have a numeric name.public int getUid()
public String getName()
public int hashCode()