source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/Production/Common/NhincLib/src/gov/hhs/fha/nhinc/connectmgr/data/CMAddress.java@ 507

Last change on this file since 507 was 507, checked in by George Lilly, 15 years ago

NHIN gateway and adaptor for use on linux with VistA EHR and RPMS

File size: 1.5 KB
Line 
1package gov.hhs.fha.nhinc.connectmgr.data;
2
3import java.util.List;
4import java.util.ArrayList;
5
6/**
7 * This class represents a single address.
8 *
9 * @author Les Westberg
10 */
11public class CMAddress
12{
13 private List<String> addressLineList = new ArrayList<String>();
14
15 /**
16 * Default Constructor.
17 */
18 public CMAddress()
19 {
20 clear();
21 }
22
23 /**
24 * Clear the contents of this and set it to a default state.
25 */
26 public void clear()
27 {
28 addressLineList = new ArrayList<String>();
29 }
30
31 /**
32 * Returns true of the contents of the object are the same as the one
33 * passed in.
34 *
35 * @param oCompare The object to compare.
36 * @return TRUE if the contents are the same as the one passed in.
37 */
38 public boolean equals(CMAddress oCompare)
39 {
40 if (oCompare.addressLineList.size() != this.addressLineList.size())
41 {
42 return false;
43 }
44
45 int iCnt = this.addressLineList.size();
46 for (int i = 0; i < iCnt; i++)
47 {
48 if (! this.addressLineList.get(i).equals(oCompare.addressLineList.get(i)))
49 {
50 return false;
51 }
52 }
53
54 // If we got here then everything is the same...
55 //----------------------------------------------
56 return true;
57 }
58
59 /**
60 * Returns the list of address lines.
61 *
62 * @return The list of address lines.
63 */
64 public List<String> getAddressLine()
65 {
66 return addressLineList;
67 }
68
69
70
71}
Note: See TracBrowser for help on using the repository browser.