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