java.lang.Object
jdk.net.UnixDomainPrincipal
Represents the credentials of a peer connected to a
Unix domain socket.
- Since:
- 16
-
Constructor Summary
ConstructorsConstructorDescriptionUnixDomainPrincipal(UserPrincipal user, GroupPrincipal group)
Creates a UnixDomainPrincipal. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true ifobj
is aUnixDomainPrincipal
and its user and group are equal to this user and group.group()
Returns this object'sGroupPrincipal
int
hashCode()
Returns a hashcode calculated from the user and groupuser()
Returns this object'sUserPrincipal
-
Constructor Details
-
UnixDomainPrincipal
Creates a UnixDomainPrincipal.- Parameters:
user
- the user identitygroup
- the group identity- Throws:
NullPointerException
- ifuser
orgroup
arenull
.
-
-
Method Details
-
equals
Returns true ifobj
is aUnixDomainPrincipal
and its user and group are equal to this user and group.- Overrides:
equals
in classObject
- Parameters:
obj
- the object to compare with- Returns:
- true if this equal to obj
- See Also:
Object.hashCode()
,HashMap
-
hashCode
public int hashCode()Returns a hashcode calculated from the user and group- Overrides:
hashCode
in classObject
- Returns:
- a hash code value for this object.
- See Also:
Object.equals(java.lang.Object)
,System.identityHashCode(java.lang.Object)
-
user
Returns this object'sUserPrincipal
- Returns:
- this object's user
-
group
Returns this object'sGroupPrincipal
- Returns:
- this object's user
-