Record Class EntityAddress

java.lang.Object
java.lang.Record
org.lfenergy.shapeshifter.api.EntityAddress

public record EntityAddress(EntityAddress.Scheme scheme, String address) extends Record
Entity Address such as EAN or EA1.

From the USEF Flex Trading Protocol Specification, Section 7. EA1 addressing scheme:
In USEF messages, there is often a requirement for a globally unique identity for certain entities. To meet this requirement, USEF defines the Entity Address (EA).

Currently, two addressing schemes are supported:

  • The European Article Number (EAN), commonly used to uniquely identify connection points in the electricity network and therefore a natural identifier to do the same in USEF. An example of an EA using this scheme is: ean.871685900012636543
  • The USEF type 1 entity address (EA1) is designed to allow participants to generate unique identifiers for themselves and entities managed by them, without relying on a central authority.
  • Constructor Details

    • EntityAddress

      public EntityAddress(EntityAddress.Scheme scheme, String address)
      Creates an instance of a EntityAddress record class.
      Parameters:
      scheme - the value for the scheme record component
      address - the value for the address record component
  • Method Details

    • parse

      public static EntityAddress parse(String str)
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • scheme

      public EntityAddress.Scheme scheme()
      Returns the value of the scheme record component.
      Returns:
      the value of the scheme record component
    • address

      public String address()
      Returns the value of the address record component.
      Returns:
      the value of the address record component