Record Class Address

java.lang.Object
java.lang.Record
energy.eddie.regionconnector.cds.providers.ap.Address

public record Address(String houseNumber, String street, String city, String state, String zip, @Nullable String staircase, @Nullable String floor, @Nullable String door, @Nullable String suffix) extends Record
  • Constructor Details

    • Address

      public Address(String houseNumber, String street, String city, String state, String zip, @Nullable String staircase, @Nullable String floor, @Nullable String door, @Nullable String suffix)
      Creates an instance of a Address record class.
      Parameters:
      houseNumber - the value for the houseNumber record component
      street - the value for the street record component
      city - the value for the city record component
      state - the value for the state record component
      zip - the value for the zip record component
      staircase - the value for the staircase record component
      floor - the value for the floor record component
      door - the value for the door record component
      suffix - the value for the suffix record component
  • Method Details

    • parse

      @Nullable public static Address parse(String input)
    • toString

      public final 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.
    • houseNumber

      public String houseNumber()
      Returns the value of the houseNumber record component.
      Returns:
      the value of the houseNumber record component
    • street

      public String street()
      Returns the value of the street record component.
      Returns:
      the value of the street record component
    • city

      public String city()
      Returns the value of the city record component.
      Returns:
      the value of the city record component
    • state

      public String state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • zip

      public String zip()
      Returns the value of the zip record component.
      Returns:
      the value of the zip record component
    • staircase

      @Nullable public String staircase()
      Returns the value of the staircase record component.
      Returns:
      the value of the staircase record component
    • floor

      @Nullable public String floor()
      Returns the value of the floor record component.
      Returns:
      the value of the floor record component
    • door

      @Nullable public String door()
      Returns the value of the door record component.
      Returns:
      the value of the door record component
    • suffix

      @Nullable public String suffix()
      Returns the value of the suffix record component.
      Returns:
      the value of the suffix record component