java.lang.Object
com.hedera.hashgraph.sdk.NodeAddressBook
A list of nodes and their metadata.
See Hedera Documentation
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static List<NodeAddress> cloneNodeAddresses(List<NodeAddress> addresses) static NodeAddressBookfromBytes(com.google.protobuf.ByteString bytes) Create a node address book from a byte string.(package private) static NodeAddressBookfromProtobuf(NodeAddressBook book) Create a node address book from a protobuf.Extract the of node addresses.setNodeAddresses(List<NodeAddress> nodeAddresses) Assign the list of node addresses.com.google.protobuf.ByteStringtoBytes()Create the byte string.(package private) NodeAddressBookCreate the protobuf.toString()
-
Field Details
-
nodeAddresses
List<NodeAddress> nodeAddresses
-
-
Constructor Details
-
NodeAddressBook
NodeAddressBook()Constructor.
-
-
Method Details
-
getNodeAddresses
Extract the of node addresses.- Returns:
- list of node addresses
-
setNodeAddresses
Assign the list of node addresses.- Parameters:
nodeAddresses- list of node addresses- Returns:
this
-
cloneNodeAddresses
-
fromProtobuf
Create a node address book from a protobuf.- Parameters:
book- the protobuf- Returns:
- the new node address book
-
fromBytes
public static NodeAddressBook fromBytes(com.google.protobuf.ByteString bytes) throws com.google.protobuf.InvalidProtocolBufferException Create a node address book from a byte string.- Parameters:
bytes- the byte string- Returns:
- the new node address book
- Throws:
com.google.protobuf.InvalidProtocolBufferException- when there is an issue with the protobuf
-
toProtobuf
NodeAddressBook toProtobuf()Create the protobuf.- Returns:
- the protobuf representation
-
toBytes
public com.google.protobuf.ByteString toBytes()Create the byte string.- Returns:
- the byte string representation
-
toString
-