|
|
@ -13,15 +13,18 @@ public class AddressInfo {
|
|
|
|
public AddressInfo(String address, String suburb, String state, String postCode, String country) {
|
|
|
|
public AddressInfo(String address, String suburb, String state, String postCode, String country) {
|
|
|
|
this.address = address;
|
|
|
|
this.address = address;
|
|
|
|
this.suburb = suburb;
|
|
|
|
this.suburb = suburb;
|
|
|
|
this.state = state;
|
|
|
|
|
|
|
|
if (!postCode.matches("^\\d{4}$")) {
|
|
|
|
if (!postCode.matches("^\\d{4}$")) {
|
|
|
|
postCode = "9999";
|
|
|
|
postCode = "9999";
|
|
|
|
country = "OTH";
|
|
|
|
country = "OTH";
|
|
|
|
|
|
|
|
state = "OTH";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.postCode = postCode;
|
|
|
|
|
|
|
|
if (country != null && country.length() != 3) {
|
|
|
|
if (country != null && country.length() != 3) {
|
|
|
|
country = "OTH";
|
|
|
|
country = "OTH";
|
|
|
|
|
|
|
|
state = "OTH";
|
|
|
|
|
|
|
|
postCode = "9999";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.postCode = postCode;
|
|
|
|
|
|
|
|
this.state = state;
|
|
|
|
this.country = country;
|
|
|
|
this.country = country;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|