Rev 266 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
/*
* Copyright (C) 2011.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
package test.display.check;
/**
* @author Steve Ratcliffe
*/
public class Street
{
private int mapIndex
;
private String name
;
private String cityName
;
private String regionName
;
private String countryName
;
private int offset
;
public Street
() {
}
public Street
(Street s,
int offset
) {
this.
mapIndex = s.
mapIndex;
this.
name = s.
name;
this.
cityName = s.
cityName;
this.
regionName = s.
regionName;
this.
countryName = s.
countryName;
this.
offset = offset
;
}
public int getMapIndex
() {
return mapIndex
;
}
public void setMapIndex
(int mapIndex
) {
this.
mapIndex = mapIndex
;
}
public String getName
() {
return name
;
}
public void setName
(String name
) {
this.
name = name
;
}
public String getCityName
() {
return cityName
;
}
public void setCityName
(String cityName
) {
this.
cityName = cityName
;
}
public String getRegionName
() {
return regionName ==
null ? "" : regionName
;
}
public void setRegionName
(String regionName
) {
this.
regionName = regionName
;
}
public String getCountryName
() {
return countryName ==
null ? "" : countryName
;
}
public void setCountryName
(String countryName
) {
this.
countryName = countryName
;
}
public void setOffset
(int offset
) {
this.
offset = offset
;
}
public int getOffset
() {
return offset
;
}
public boolean hasRegion
(String regionName
) {
String r1 =
(this.
regionName ==
null)? "":
this.
regionName;
String r2 =
(regionName ==
null)? "": regionName
;
return r1.
equals(r2
);
}
public boolean sameCityAs
(Street other
) {
return cityName.
equals(other.
cityName)
&& regionName.
equals(other.
regionName)
&& countryName.
equals(other.
countryName);
}
}