repositories
/
Persons_Comparator.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
3f2a829163130f8bba5c5ed1e22e5fdd0fa916c3
[Persons_Comparator.git]
/
src
/
Weight.java
1
public class
Weight
{
2
private int
weight
;
3
4
Weight
(
int
weight
) {
5
setWeight
(
weight
);
6
}
7
8
public int
getWeight
() {
9
return
weight
;
10
}
11
12
public void
setWeight
(
int
weight
) {
13
if
(
validateWeight
(
weight
)) {
14
this
.
weight
=
weight
;
15
}
/* FIXME: raise an error */
16
}
17
18
private boolean
validateWeight
(
int
weight
) {
19
return
(
weight
>
0
);
20
}
21
}