Methods Summary |
---|
public boolean | equals(java.lang.Object o)Compares the specified Object with this
UnixNumericGroupPrincipal
for equality. Returns true if the given object is also a
UnixNumericGroupPrincipal and the two
UnixNumericGroupPrincipals
have the same group identification number (GID).
if (o == null)
return false;
if (this == o)
return true;
if (!(o instanceof UnixNumericGroupPrincipal))
return false;
UnixNumericGroupPrincipal that = (UnixNumericGroupPrincipal)o;
if (this.getName().equals(that.getName()) &&
this.isPrimaryGroup() == that.isPrimaryGroup())
return true;
return false;
|
public java.lang.String | getName()Return the user's group identification number (GID) for this
UnixNumericGroupPrincipal .
return name;
|
public int | hashCode()Return a hash code for this UnixNumericGroupPrincipal .
return toString().hashCode();
|
public boolean | isPrimaryGroup()Return whether this group identification number (GID) represents
the primary group to which this user belongs.
return primaryGroup;
|
public long | longValue()Return the user's group identification number (GID) for this
UnixNumericGroupPrincipal as a long.
return ((new Long(name)).longValue());
|
public java.lang.String | toString()Return a string representation of this
UnixNumericGroupPrincipal .
if (primaryGroup) {
java.text.MessageFormat form = new java.text.MessageFormat
(sun.security.util.ResourcesMgr.getString
("UnixNumericGroupPrincipal [Primary Group]: name",
"sun.security.util.AuthResources"));
Object[] source = {name};
return form.format(source);
} else {
java.text.MessageFormat form = new java.text.MessageFormat
(sun.security.util.ResourcesMgr.getString
("UnixNumericGroupPrincipal [Supplementary Group]: name",
"sun.security.util.AuthResources"));
Object[] source = {name};
return form.format(source);
}
|