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 | * @author westbergl
|
---|
8 | * @version 1.0
|
---|
9 | * @created 20-Oct-2008 12:07:20 PM
|
---|
10 | */
|
---|
11 | public class CMPersonNames
|
---|
12 | {
|
---|
13 |
|
---|
14 | private List<String> personNameList = new ArrayList<String>();
|
---|
15 |
|
---|
16 | /**
|
---|
17 | * Default constructor.
|
---|
18 | */
|
---|
19 | public CMPersonNames()
|
---|
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 | personNameList = new ArrayList<String>();
|
---|
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(CMPersonNames oCompare)
|
---|
40 | {
|
---|
41 | if (oCompare.personNameList.size() != this.personNameList.size())
|
---|
42 | {
|
---|
43 | return false;
|
---|
44 | }
|
---|
45 |
|
---|
46 | int iCnt = this.personNameList.size();
|
---|
47 | for (int i = 0; i < iCnt; i++)
|
---|
48 | {
|
---|
49 | if (! this.personNameList.get(i).equals(oCompare.personNameList.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 | /**
|
---|
63 | * Returns the names for this person.
|
---|
64 | *
|
---|
65 | * @return The list of names for this person.
|
---|
66 | */
|
---|
67 | public List<String> getPersonName()
|
---|
68 | {
|
---|
69 | return personNameList;
|
---|
70 | }
|
---|
71 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.