CobolPrincipal (Micro Focus COBOL Connector Class Library)
Keywords: com.microfocus.cobol.connector.spi.CobolPrincipal class

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.microfocus.cobol.connector.spi
Class CobolPrincipal

    java.lang.Object
      com.microfocus.cobol.connector.spi.CobolPrincipal

All Implemented Interfaces:
  Principal, Serializable

public class CobolPrincipal
extends Object
implements Principal, Serializable

See Also:
  Serialized Form

Constructor Summary
`CobolPrincipal(String name)` Create a CobolPrincipal with a username.

Method Summary
`boolean` | `equals(Object o)` Compares the specified Object with this `SamplePrincipal` for equality.
`String` | `getName()` Return the username for this `SamplePrincipal`.
`int` | `hashCode()` Return a hash code for this `SamplePrincipal`.
`String` | `toString()` Return a string representation of this `SamplePrincipal`.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### CobolPrincipal

    public CobolPrincipal(String name)

  Create a CobolPrincipal with a username.

Parameters:
  `name` - the username for this user.
Throws:
  `NullPointerException` - if the `name` is `null`.

Method Detail

### getName

    public String getName()

  Return the username for this `SamplePrincipal`.

  Specified by:
    `getName` in interface `Principal`
  Returns:
    the Sample username for this `SamplePrincipal`

### toString

    public String toString()

  Return a string representation of this `SamplePrincipal`.

  Specified by:
    `toString` in interface `Principal`
  Returns:
    a string representation of this `SamplePrincipal`.

### equals

    public boolean equals(Object o)

  Compares the specified Object with this `SamplePrincipal` for equality. Returns true if the given object is also a `SamplePrincipal` and the two SamplePrincipals have the same username.

  Specified by:
    `equals` in interface `Principal`
  Parameters:
    `o` - Object to be compared for equality with this `SamplePrincipal`.
  Returns:
    true if the specified Object is equal equal to this `SamplePrincipal`.

### hashCode

    public int hashCode()

  Return a hash code for this `SamplePrincipal`.

  Specified by:
    `hashCode` in interface `Principal`
  Returns:
    a hash code for this `SamplePrincipal`.

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.