Class HookId

java.lang.Object
com.hedera.hashgraph.sdk.HookId

public class HookId extends Object
The ID of a hook.

This class represents the HookId protobuf message, which contains the hook's creating entity ID and an arbitrary 64-bit identifier.

  • Constructor Details

    • HookId

      public HookId(HookEntityId entityId, long hookId)
      Create a new HookId.
      Parameters:
      entityId - the hook's creating entity ID
      hookId - the arbitrary 64-bit identifier
  • Method Details

    • getEntityId

      public HookEntityId getEntityId()
      Get the hook's creating entity ID.
      Returns:
      the entity ID
    • getHookId

      public long getHookId()
      Get the hook ID.
      Returns:
      the hook ID
    • toProtobuf

      HookId toProtobuf()
      Convert this HookId to a protobuf message.
      Returns:
      the protobuf HookId
    • fromProtobuf

      static HookId fromProtobuf(HookId proto)
      Create a HookId from a protobuf message.
      Parameters:
      proto - the protobuf HookId
      Returns:
      a new HookId instance
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object