AbstractParty
Keywords: net.corda.core.identity.AbstractParty class
Date: 2023-09-18

net.corda.core.identity

## Class AbstractParty

- net.corda.core.identity.AbstractParty

- All Implemented Interfaces:
    Destination
  Direct Known Subclasses:
    AnonymousParty, Party

      @DoNotImplement
      public class AbstractParty
      implements Destination

  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`

- - ### Field Detail

    - #### Companion

          public static net.corda.core.identity.AbstractParty.Companion Companion

  - ### Constructor Detail

    - #### AbstractParty

          public AbstractParty(@NotNull
                               java.security.PublicKey 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`

  - ### Method Detail

    - #### equals

          public boolean equals(@Nullable
                                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()

    - #### nameOrNull

          @Nullable
          public CordaX500Name nameOrNull()

    - #### ref

          @NotNull
          public PartyAndReference ref(@NotNull
                                                OpaqueBytes bytes)

      Build a reference to something being stored or issued by a party e.g. in a vault or (more likely) on their normal ledger.

    - #### ref

          @NotNull
          public PartyAndReference ref(@NotNull
                                                byte... bytes)

      Build a reference to something being stored or issued by a party e.g. in a vault or (more likely) on their normal ledger.

    - #### getOwningKey

          @NotNull
          public java.security.PublicKey getOwningKey()