|
Last change
on this file since 507 was 507, checked in by George Lilly, 17 years ago |
|
NHIN gateway and adaptor for use on linux with VistA EHR and RPMS
|
|
File size:
1.6 KB
|
| Line | |
|---|
| 1 | package gov.hhs.fha.nhinc.connectmgr.data;
|
|---|
| 2 |
|
|---|
| 3 | import java.util.List;
|
|---|
| 4 | import java.util.ArrayList;
|
|---|
| 5 |
|
|---|
| 6 | /**
|
|---|
| 7 | * This class represents the lines in an address.
|
|---|
| 8 | * @author westbergl
|
|---|
| 9 | * @version 1.0
|
|---|
| 10 | * @created 20-Oct-2008 12:06:39 PM
|
|---|
| 11 | */
|
|---|
| 12 | public class CMAddresses
|
|---|
| 13 | {
|
|---|
| 14 | public List<CMAddress> addressList = new ArrayList<CMAddress>();
|
|---|
| 15 |
|
|---|
| 16 | /**
|
|---|
| 17 | * Default constructor.
|
|---|
| 18 | */
|
|---|
| 19 | public CMAddresses()
|
|---|
| 20 | {
|
|---|
| 21 | clear();
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | /**
|
|---|
| 25 | * Clear the contents of this and set it to a default state.
|
|---|
| 26 | */
|
|---|
| 27 | public void clear()
|
|---|
| 28 | {
|
|---|
| 29 | addressList = new ArrayList<CMAddress>();
|
|---|
| 30 | }
|
|---|
| 31 |
|
|---|
| 32 | /**
|
|---|
| 33 | * Returns true of the contents of the object are the same as the one
|
|---|
| 34 | * passed in.
|
|---|
| 35 | *
|
|---|
| 36 | * @param oCompare The object to compare.
|
|---|
| 37 | * @return TRUE if the contents are the same as the one passed in.
|
|---|
| 38 | */
|
|---|
| 39 | public boolean equals(CMAddresses oCompare)
|
|---|
| 40 | {
|
|---|
| 41 | if (oCompare.addressList.size() != this.addressList.size())
|
|---|
| 42 | {
|
|---|
| 43 | return false;
|
|---|
| 44 | }
|
|---|
| 45 |
|
|---|
| 46 | int iCnt = this.addressList.size();
|
|---|
| 47 | for (int i = 0; i < iCnt; i++)
|
|---|
| 48 | {
|
|---|
| 49 | if (! this.addressList.get(i).equals(oCompare.addressList.get(i)))
|
|---|
| 50 | {
|
|---|
| 51 | return false;
|
|---|
| 52 | }
|
|---|
| 53 | }
|
|---|
| 54 |
|
|---|
| 55 | // If we got here then everything is the same...
|
|---|
| 56 | //----------------------------------------------
|
|---|
| 57 | return true;
|
|---|
| 58 | }
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 | /**
|
|---|
| 62 | * Returns the list of addresses.
|
|---|
| 63 | *
|
|---|
| 64 | * @return The list of addresses.
|
|---|
| 65 | */
|
|---|
| 66 | public List<CMAddress> getAddress()
|
|---|
| 67 | {
|
|---|
| 68 | return addressList;
|
|---|
| 69 | }
|
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.