Interface Address

All Superinterfaces:
Comparable<Address>, Serializable

public interface Address extends Serializable, Comparable<Address>
Addresses are opaque objects that uniquely identify Nodes. While the provided addresses might provide meaningful information via Object.toString(), you should not use those Strings (except when printing addresses). Instead, use Object.equals(Object) and Comparable.compareTo(Object) to compare addresses.
  • Method Summary

    Modifier and Type
    Method
    Description
    default Address
    Returns the root address, representing the root Node of some hierarchy.
    static Address
    subAddress(Address address, String id)
    Returns a sub-address for the given address.

    Methods inherited from interface java.lang.Comparable

    compareTo
  • Method Details

    • rootAddress

      default Address rootAddress()
      Returns the root address, representing the root Node of some hierarchy.
      Returns:
      the root address
    • subAddress

      static Address subAddress(Address address, String id)
      Returns a sub-address for the given address. Used to initialize a sub-node.
      Parameters:
      address - the address of the parent node
      id - the sub-node's identifier
      Returns:
      the sub-address.