net.corda.core.crypto

## Class AbstractParty

- net.corda.core.crypto.AbstractParty

- Direct Known Subclasses:
    AnonymousParty, Party

      public class AbstractParty

  An `class AbstractParty` contains the common elements of `class Party` and `class AnonymousParty`, specifically the owning key of the party. In most cases `class Party` or `class AnonymousParty` should be used, depending on use-case.

  See Also:
    `class AbstractParty`, `class Party`, `class AnonymousParty`, `class Party`, `class AnonymousParty`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractParty(CompositeKey owningKey)` An `class AbstractParty` contains the common elements of `class Party` and `class AnonymousParty`, specifically the owning key of the party. In most cases `class Party` or `class AnonymousParty` should be used, depending on use-case.
    `AbstractParty(java.security.PublicKey owningKey)` A helper constructor that converts the given PublicKey in to a `class CompositeKey` with a single node

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object other)` Anonymised parties do not include any detail apart from owning key, so equality is dependent solely on the key
    `CompositeKey` | `getOwningKey()`
    `int` | `hashCode()`
    `java.lang.String` | `nameOrNull()`
    `PartyAndReference` | `ref(OpaqueBytes bytes)`
    `PartyAndReference` | `ref(byte bytes)`
    `AnonymousParty` | `toAnonymous()`

- - ### Constructor Detail

    - #### AbstractParty

          public AbstractParty(CompositeKey owningKey)

      An `class AbstractParty` contains the common elements of `class Party` and `class AnonymousParty`, specifically the owning key of the party. In most cases `class Party` or `class AnonymousParty` should be used, depending on use-case.

      See Also:
        `class AbstractParty`, `class Party`, `class AnonymousParty`, `class Party`, `class AnonymousParty`

    - #### AbstractParty

          public AbstractParty(java.security.PublicKey owningKey)

      A helper constructor that converts the given PublicKey in to a `class CompositeKey` with a single node

      See Also:
        PublicKey, `class CompositeKey`

  - ### Method Detail

    - #### equals

          public boolean equals(java.lang.Object other)

      Anonymised parties do not include any detail apart from owning key, so equality is dependent solely on the key

    - #### hashCode

          public int hashCode()

    - #### toAnonymous

          public AnonymousParty toAnonymous()

    - #### nameOrNull

          public java.lang.String nameOrNull()

    - #### ref

          public PartyAndReference ref(OpaqueBytes bytes)

    - #### ref

          public PartyAndReference ref(byte bytes)

    - #### getOwningKey

          public CompositeKey getOwningKey()