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.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 a list of contacts for a business entity.
|
---|
8 | *
|
---|
9 | * @author Les Westberg
|
---|
10 | */
|
---|
11 | public class CMContacts
|
---|
12 | {
|
---|
13 | private List<CMContact> contactList = new ArrayList<CMContact>();
|
---|
14 |
|
---|
15 | /**
|
---|
16 | * Default constructor.
|
---|
17 | */
|
---|
18 | public CMContacts()
|
---|
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 | contactList = new ArrayList<CMContact>();
|
---|
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(CMContacts oCompare)
|
---|
39 | {
|
---|
40 | if (oCompare.contactList.size() != this.contactList.size())
|
---|
41 | {
|
---|
42 | return false;
|
---|
43 | }
|
---|
44 |
|
---|
45 | int iCnt = this.contactList.size();
|
---|
46 | for (int i = 0; i < iCnt; i++)
|
---|
47 | {
|
---|
48 | if (! this.contactList.get(i).equals(oCompare.contactList.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 contacts.
|
---|
61 | *
|
---|
62 | * @return The list of contacts.
|
---|
63 | */
|
---|
64 | public List<CMContact> getContact()
|
---|
65 | {
|
---|
66 | return contactList;
|
---|
67 | }
|
---|
68 |
|
---|
69 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.