01: package net.sf.mockcreator;
02:
03: public class Struct {
04: public int id;
05: public String name;
06: protected int protected_id;
07: private int private_id;
08:
09: public Struct(int i1, int i2, int i3, String n) {
10: id = i1;
11: protected_id = i2;
12: private_id = i3;
13: name = n;
14: }
15:
16: public boolean equals(Object o) {
17: if (o == this ) {
18: return true;
19: }
20:
21: if (!(o instanceof Struct)) {
22: return false;
23: }
24:
25: Struct s = (Struct) o;
26:
27: return s.id == id;
28: }
29:
30: public String toString() {
31: return "{" + id + ";" + protected_id + ";" + private_id + ";"
32: + name + "}";
33: }
34: }
|