1 package org.exoplatform.services.xml.querying.impl.xtas; 2 3 import java.util.ArrayList ; 4 5 6 public class City 7 { 8 private String name; 9 private String country; 10 private String zip; 11 private ArrayList streets; 12 13 public City() 14 { 15 streets = new ArrayList (); 16 } 17 18 public City(String country, String name, String zip) 19 { 20 this(); 21 this.name = name; 22 this.country = country; 23 this.zip = zip; 24 this.streets.add(new Street("One", new Integer (100))); 25 this.streets.add(new Street("Two", new Integer (200))); 26 this.streets.add(new Street("Three", new Integer (300))); 27 } 28 29 public ArrayList getStreets(){ 30 31 return streets; 32 } 33 34 public String getName() { 35 return name;} 36 37 43 public void setName(String aName) { 44 name = aName;} 45 46 51 public String getCountry() { 52 return country;} 53 54 60 public void setCountry(String aCountry) { 61 country = aCountry;} 62 63 public String getZip() { 64 return zip;} 65 66 public void setZip(String aZip) { 67 zip = aZip;} 68 69 70 public String toString() 71 { 72 return name+","+country+","+zip; 73 } 74 75 } 76 | Popular Tags |