java.lang.Object
com.hedera.hashgraph.sdk.ScheduleId
- All Implemented Interfaces:
Comparable<ScheduleId>
The entity ID of a schedule transaction.
See Hedera Documentation
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionScheduleId(long num) Deprecated.ScheduleId(long shard, long realm, long num) Constructor.ScheduleId(long shard, long realm, long num, String checksum) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintbooleanstatic ScheduleIdfromBytes(byte[] bytes) Create a schedule id from a byte array.(package private) static ScheduleIdfromProtobuf(ScheduleID scheduleId) Create a schedule id from a protobuf.static ScheduleIdfromString(String id) Create a schedule id from a string.Extract the checksum.inthashCode()byte[]toBytes()Create the byte array.(package private) ScheduleIDCreate the protobuf.toString()toStringWithChecksum(Client client) Convert the schedule id into a string with checksum.voidDeprecated.voidvalidateChecksum(Client client) Validate the configured client.
-
Field Details
-
shard
@Nonnegative public final long shardThe shard number -
realm
@Nonnegative public final long realmThe realm number -
num
@Nonnegative public final long numThe id number
-
-
Constructor Details
-
ScheduleId
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 partrealm- the realm partnum- the num part
-
ScheduleId
ScheduleId(@Nonnegative long shard, @Nonnegative long realm, @Nonnegative long num, @Nullable String checksum) Constructor.- Parameters:
shard- the shard partrealm- the realm partnum- the num partchecksum- the checksum
-
-
Method Details
-
fromString
Create a schedule id from a string.- Parameters:
id- the string representing the schedule id- Returns:
- the new schedule id
-
fromProtobuf
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.UsevalidateChecksum(Client)instead.- Parameters:
client- to validate against- Throws:
BadEntityIdException- if entity ID is formatted poorly
-
validateChecksum
Validate the configured client.- Parameters:
client- the configured client- Throws:
BadEntityIdException- if entity ID is formatted poorly
-
getChecksum
Extract the checksum.- Returns:
- the checksum
-
toBytes
public byte[] toBytes()Create the byte array.- Returns:
- byte array representation
-
toString
-
toStringWithChecksum
Convert the schedule id into a string with checksum.- Parameters:
client- the configured client- Returns:
- the string representation
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<ScheduleId>
-
validateChecksum(Client)instead.