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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringaddress()Multi-line fields that has the contents of the street address (or similar)Stringcity()The city of the addressStringcode()The ZIP or postal code part of the addressStringcountry()The country part of the address.static TenantAddressempty()booleanequals(Object o)inthashCode()booleanisEmpty()Stringregion()The region part of the address - e.g.StringtoString()TenantAddresswithAddress(String address)TenantAddresswithCity(String city)TenantAddresswithCode(String code)TenantAddresswithCountry(String country)TenantAddresswithRegion(String region)
-
-
-
Method Detail
-
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)
-
-