Class TenantAddress

java.lang.Object
com.yahoo.vespa.hosted.controller.tenant.TenantAddress

public class TenantAddress extends Object
A generic address container that tries to make as few assumptions about addresses as possible. Most addresses have some of these fields, but with different names (e.g. postal code vs zip code). When consuming data from this class, do not make any assumptions about which fields have content. An address might be still valid with surprisingly little information. All fields are non-null, but might be empty strings.
Author:
ogronnesby
  • Method Details

    • empty

      public static TenantAddress empty()
    • address

      public String address()
      Multi-line fields that has the contents of the street address (or similar)
    • code

      public String code()
      The ZIP or postal code part of the address
    • city

      public String city()
      The city of the address
    • region

      public String region()
      The region part of the address - e.g. a state, county, or province
    • country

      public String country()
      The country part of the address. Its name, not a code
    • isEmpty

      public boolean isEmpty()
    • withAddress

      public TenantAddress withAddress(String address)
    • withCode

      public TenantAddress withCode(String code)
    • withCity

      public TenantAddress withCity(String city)
    • withRegion

      public TenantAddress withRegion(String region)
    • withCountry

      public TenantAddress withCountry(String country)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object