|
@@ -62,7 +62,7 @@ public class ProfileListModel extends DefaultListModel implements Iterable<Profi
|
62
|
62
|
|
63
|
63
|
/** {@inheritDoc} */
|
64
|
64
|
@Override
|
65
|
|
- public Profile getElementAt(int index) {
|
|
65
|
+ public Profile getElementAt(final int index) {
|
66
|
66
|
return profiles.get(index);
|
67
|
67
|
}
|
68
|
68
|
|
|
@@ -74,7 +74,7 @@ public class ProfileListModel extends DefaultListModel implements Iterable<Profi
|
74
|
74
|
* @return the profile that was removed
|
75
|
75
|
*/
|
76
|
76
|
@Override
|
77
|
|
- public Profile remove(int index) {
|
|
77
|
+ public Profile remove(final int index) {
|
78
|
78
|
final Profile returnValue = profiles.remove(index);
|
79
|
79
|
|
80
|
80
|
fireIntervalRemoved(this, index, index);
|
|
@@ -89,7 +89,7 @@ public class ProfileListModel extends DefaultListModel implements Iterable<Profi
|
89
|
89
|
*
|
90
|
90
|
* @return true if the object was removed
|
91
|
91
|
*/
|
92
|
|
- public boolean remove(Profile p) {
|
|
92
|
+ public boolean remove(final Profile p) {
|
93
|
93
|
final int index = profiles.indexOf(p);
|
94
|
94
|
final boolean returnValue = profiles.remove(p);
|
95
|
95
|
|
|
@@ -115,7 +115,7 @@ public class ProfileListModel extends DefaultListModel implements Iterable<Profi
|
115
|
115
|
*
|
116
|
116
|
* @return index of the specified object
|
117
|
117
|
*/
|
118
|
|
- public int indexOf(Profile p) {
|
|
118
|
+ public int indexOf(final Profile p) {
|
119
|
119
|
return profiles.indexOf(p);
|
120
|
120
|
}
|
121
|
121
|
|
|
@@ -127,7 +127,7 @@ public class ProfileListModel extends DefaultListModel implements Iterable<Profi
|
127
|
127
|
* @return the profile that was removed
|
128
|
128
|
*/
|
129
|
129
|
@Override
|
130
|
|
- public Profile get(int index) {
|
|
130
|
+ public Profile get(final int index) {
|
131
|
131
|
return profiles.get(index);
|
132
|
132
|
}
|
133
|
133
|
|
|
@@ -148,7 +148,7 @@ public class ProfileListModel extends DefaultListModel implements Iterable<Profi
|
148
|
148
|
*
|
149
|
149
|
* @return true if the model contains the profile
|
150
|
150
|
*/
|
151
|
|
- public boolean contains(Profile p) {
|
|
151
|
+ public boolean contains(final Profile p) {
|
152
|
152
|
return profiles.contains(p);
|
153
|
153
|
}
|
154
|
154
|
|
|
@@ -160,7 +160,7 @@ public class ProfileListModel extends DefaultListModel implements Iterable<Profi
|
160
|
160
|
*
|
161
|
161
|
* @return true if the model contains a profile with the specified name
|
162
|
162
|
*/
|
163
|
|
- public boolean contains(String name) {
|
|
163
|
+ public boolean contains(final String name) {
|
164
|
164
|
synchronized (profiles) {
|
165
|
165
|
for (Profile profile : profiles) {
|
166
|
166
|
if (profile.getName().equals(name)) {
|
|
@@ -188,7 +188,7 @@ public class ProfileListModel extends DefaultListModel implements Iterable<Profi
|
188
|
188
|
* @param index index to add the profile
|
189
|
189
|
* @param element profile to add
|
190
|
190
|
*/
|
191
|
|
- public void add(int index, Profile element) {
|
|
191
|
+ public void add(final int index, final Profile element) {
|
192
|
192
|
profiles.add(index, element);
|
193
|
193
|
|
194
|
194
|
fireIntervalAdded(this, index, index);
|
|
@@ -201,7 +201,7 @@ public class ProfileListModel extends DefaultListModel implements Iterable<Profi
|
201
|
201
|
*
|
202
|
202
|
* @return true if the item was added
|
203
|
203
|
*/
|
204
|
|
- public boolean add(Profile p) {
|
|
204
|
+ public boolean add(final Profile p) {
|
205
|
205
|
final boolean returnValue = profiles.add(p);
|
206
|
206
|
final int index = profiles.indexOf(p);
|
207
|
207
|
|
|
@@ -222,8 +222,9 @@ public class ProfileListModel extends DefaultListModel implements Iterable<Profi
|
222
|
222
|
|
223
|
223
|
/** {@inheritDoc} */
|
224
|
224
|
@Override
|
225
|
|
- public boolean equals(Object obj) {
|
226
|
|
- return profiles.equals(obj);
|
|
225
|
+ public boolean equals(final Object obj) {
|
|
226
|
+ return obj instanceof ProfileListModel
|
|
227
|
+ && profiles.equals(((ProfileListModel) obj).getProfiles());
|
227
|
228
|
}
|
228
|
229
|
|
229
|
230
|
/** {@inheritDoc} */
|