package com.tistory.antop; public class Zipcode { // 데이터 순서(5) private int seq; // 우편번호(7) private String zipcode; // 특별시,광역시,도(4) private String sido; // 시,군,구(15) private String gugun; // 읍,면,동(26) private String dong; // 리(18) private String ri; // 건물명(40) private String bldg; // 시작번지(11) private String stBunji; // 끝번지(9) private String edBunji; public Zipcode() { } public int getSeq() { return seq; } @SuppressWarnings("unused") private void setSeq(int seq) { this.seq = seq; } public String getZipcode() { return zipcode; } public void setZipcode(String zipcode) { this.zipcode = zipcode; } public String getSido() { return sido; } public void setSido(String sido) { this.sido = sido; } public String getGugun() { return gugun; } public void setGugun(String gugun) { this.gugun = gugun; } public String getDong() { return dong; } public void setDong(String dong) { this.dong = dong; } public String getRi() { return ri; } public void setRi(String ri) { this.ri = ri; } public String getBldg() { return bldg; } public void setBldg(String bldg) { this.bldg = bldg; } public String getStBunji() { return stBunji; } public void setStBunji(String stBunji) { this.stBunji = stBunji; } public String getEdBunji() { return edBunji; } public void setEdBunji(String edBunji) { this.edBunji = edBunji; } @Override public String toString() { int comma = 0; StringBuffer sb = new StringBuffer(); if(this.seq != 0) { sb.append((comma > 0) ? ", " : ""); comma++; sb.append("데이터 순서 : " + this.seq); } if(this.zipcode != null) { sb.append((comma > 0) ? ", " : ""); comma++; sb.append("우편번호 : " + this.zipcode); } if(this.sido != null) { sb.append((comma > 0) ? ", " : ""); comma++; sb.append("특별시,광역시,도 : " + this.sido); } if(this.gugun != null) { sb.append((comma > 0) ? ", " : ""); comma++; sb.append("시,군,구 : " + this.gugun); } if(this.dong != null) { sb.append((comma > 0) ? ", " : ""); comma++; sb.append("읍,면,동 : " + this.dong); } if(this.ri != null) { sb.append((comma > 0) ? ", " : ""); comma++; sb.append("리 : " + this.ri); } if(this.bldg != null) { sb.append((comma > 0) ? ", " : ""); comma++; sb.append("건물명 : " + this.bldg); } if(this.stBunji != null) { sb.append((comma > 0) ? ", " : ""); comma++; sb.append("시작번지 : " + this.stBunji); } if(this.edBunji != null) { sb.append((comma > 0) ? ", " : ""); comma++; sb.append("끝번지 : " + this.edBunji); } return sb.toString(); } }