Class ScheduleId

java.lang.Object
com.hedera.hashgraph.sdk.ScheduleId
All Implemented Interfaces:
Comparable<ScheduleId>

public final class ScheduleId extends Object implements Comparable<ScheduleId>
The entity ID of a schedule transaction. See Hedera Documentation
  • Field Details

    • shard

      @Nonnegative public final long shard
      The shard number
    • realm

      @Nonnegative public final long realm
      The realm number
    • num

      @Nonnegative public final long num
      The id number
  • Constructor Details

    • ScheduleId

      @Deprecated public ScheduleId(@Nonnegative long num)
      Deprecated.
      Constructor.
      Parameters:
      num - the num part Constructor that uses shard, realm and num should be used instead as shard and realm should not assume 0 value
    • ScheduleId

      public ScheduleId(@Nonnegative long shard, @Nonnegative long realm, @Nonnegative long num)
      Constructor.
      Parameters:
      shard - the shard part
      realm - the realm part
      num - the num part
    • ScheduleId

      ScheduleId(@Nonnegative long shard, @Nonnegative long realm, @Nonnegative long num, @Nullable String checksum)
      Constructor.
      Parameters:
      shard - the shard part
      realm - the realm part
      num - the num part
      checksum - the checksum
  • Method Details

    • fromString

      public static ScheduleId fromString(String id)
      Create a schedule id from a string.
      Parameters:
      id - the string representing the schedule id
      Returns:
      the new schedule id
    • fromProtobuf

      static ScheduleId fromProtobuf(ScheduleID scheduleId)
      Create a schedule id from a protobuf.
      Parameters:
      scheduleId - the protobuf
      Returns:
      the new schedule id
    • fromBytes

      public static ScheduleId fromBytes(byte[] bytes) throws com.google.protobuf.InvalidProtocolBufferException
      Create a schedule id from a byte array.
      Parameters:
      bytes - the byte array
      Returns:
      the new schedule id
      Throws:
      com.google.protobuf.InvalidProtocolBufferException - when there is an issue with the protobuf
    • toProtobuf

      ScheduleID toProtobuf()
      Create the protobuf.
      Returns:
      the protobuf representing the schedule id
    • validate

      @Deprecated public void validate(Client client) throws BadEntityIdException
      Deprecated.
      Parameters:
      client - to validate against
      Throws:
      BadEntityIdException - if entity ID is formatted poorly
    • validateChecksum

      public void validateChecksum(Client client) throws BadEntityIdException
      Validate the configured client.
      Parameters:
      client - the configured client
      Throws:
      BadEntityIdException - if entity ID is formatted poorly
    • getChecksum

      @Nullable public String getChecksum()
      Extract the checksum.
      Returns:
      the checksum
    • toBytes

      public byte[] toBytes()
      Create the byte array.
      Returns:
      byte array representation
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStringWithChecksum

      public String toStringWithChecksum(Client client)
      Convert the schedule id into a string with checksum.
      Parameters:
      client - the configured client
      Returns:
      the string representation
    • hashCode

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

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

      public int compareTo(ScheduleId o)
      Specified by:
      compareTo in interface Comparable<ScheduleId>