1
2
3
4
5
6
7 package org.mule.module.json.transformers;
8
9 import org.mule.tck.testmodels.fruit.Apple;
10 import org.mule.tck.testmodels.fruit.Banana;
11 import org.mule.tck.testmodels.fruit.Orange;
12
13
14
15
16 public class FruitCollection
17 {
18 private Apple apple;
19 private Banana banana;
20 private Orange orange;
21
22 public FruitCollection()
23 {
24 super();
25 }
26
27 public FruitCollection(Apple apple, Banana banana, Orange orange)
28 {
29 this.apple = apple;
30 this.banana = banana;
31 this.orange = orange;
32 }
33
34 public Apple getApple()
35 {
36 return apple;
37 }
38
39 public Banana getBanana()
40 {
41 return banana;
42 }
43
44 public Orange getOrange()
45 {
46 return orange;
47 }
48
49 public void setApple(Apple apple)
50 {
51 this.apple = apple;
52 }
53
54 public void setBanana(Banana banana)
55 {
56 this.banana = banana;
57 }
58
59 public void setOrange(Orange orange)
60 {
61 this.orange = orange;
62 }
63
64 @Override
65 public boolean equals(Object o)
66 {
67 if (this == o)
68 {
69 return true;
70 }
71 if (o == null || getClass() != o.getClass())
72 {
73 return false;
74 }
75
76 FruitCollection that = (FruitCollection) o;
77
78 if (apple != null ? !apple.equals(that.apple) : that.apple != null)
79 {
80 return false;
81 }
82 if (banana != null ? !banana.equals(that.banana) : that.banana != null)
83 {
84 return false;
85 }
86 if (orange != null ? !orange.equals(that.orange) : that.orange != null)
87 {
88 return false;
89 }
90
91 return true;
92 }
93
94 @Override
95 public int hashCode()
96 {
97 int result = apple != null ? apple.hashCode() : 0;
98 result = 31 * result + (banana != null ? banana.hashCode() : 0);
99 result = 31 * result + (orange != null ? orange.hashCode() : 0);
100 return result;
101 }
102 }