com.sun.grid.security.login

## Class NumericUserPrincipal

- java.lang.Object
- - com.sun.grid.security.login.NumericUserPrincipal

- All Implemented Interfaces:
    java.io.Serializable, java.security.Principal

      public class NumericUserPrincipal
      extends java.lang.Object
      implements java.security.Principal, java.io.Serializable

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NumericUserPrincipal(long name)` Create a `NumericUserPrincipal` using a long representation of the user's identification number (UID).
    `NumericUserPrincipal(java.lang.String name)` Create a `NumericUserPrincipal` using a `String` representation of the user's identification number (UID).

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object o)` Compares the specified Object with this `NumericUserPrincipal` for equality.
    `java.lang.String` | `getName()` Return the user identification number (UID) for this `NumericUserPrincipal`.
    `int` | `hashCode()` Return a hash code for this `NumericUserPrincipal`.
    `long` | `longValue()` Return the user identification number (UID) for this `NumericUserPrincipal` as a long.
    `java.lang.String` | `toString()` Return a string representation of this `NumericUserPrincipal`.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.security.Principal

      `implies`

- - ### Constructor Detail

    - #### NumericUserPrincipal

          public NumericUserPrincipal(java.lang.String name)

      Create a `NumericUserPrincipal` using a `String` representation of the user's identification number (UID).

      Parameters:
        `name` - the user identification number (UID) for this user.
      Throws:
        `java.lang.NullPointerException` - if the `name` is `null`.

    - #### NumericUserPrincipal

          public NumericUserPrincipal(long name)

      Create a `NumericUserPrincipal` using a long representation of the user's identification number (UID).

      Parameters:
        `name` - the user identification number (UID) for this user represented as a long.

  - ### Method Detail

    - #### getName

          public java.lang.String getName()

      Return the user identification number (UID) for this `NumericUserPrincipal`.

      Specified by:
        `getName` in interface `java.security.Principal`
      Returns:
        the user identification number (UID) for this `NumericUserPrincipal`

    - #### longValue

          public long longValue()

      Return the user identification number (UID) for this `NumericUserPrincipal` as a long.

      Returns:
        the user identification number (UID) for this `NumericUserPrincipal` as a long.

    - #### toString

          public java.lang.String toString()

      Return a string representation of this `NumericUserPrincipal`.

      Specified by:
        `toString` in interface `java.security.Principal`
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        a string representation of this `NumericUserPrincipal`.

    - #### equals

          public boolean equals(java.lang.Object o)

      Compares the specified Object with this `NumericUserPrincipal` for equality. Returns true if the given object is also a `NumericUserPrincipal` and the two NumericUserPrincipals have the same user identification number (UID).

      Specified by:
        `equals` in interface `java.security.Principal`
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `o` - Object to be compared for equality with this `NumericUserPrincipal`.
      Returns:
        true if the specified Object is equal equal to this `NumericUserPrincipal`.

    - #### hashCode

          public int hashCode()

      Return a hash code for this `NumericUserPrincipal`.

      Specified by:
        `hashCode` in interface `java.security.Principal`
      Overrides:
        `hashCode` in class `java.lang.Object`
      Returns:
        a hash code for this `NumericUserPrincipal`.