View Javadoc

1   package com.atlassian.plugin.mock;
2   
3   public class MockGold implements MockMineral, MockThing
4   {
5       int weight;
6   
7       public MockGold()
8       {
9       }
10  
11      public MockGold(int weight)
12      {
13          this.weight = weight;
14      }
15  
16      public int getWeight()
17      {
18          return weight;
19      }
20  
21      public boolean equals(Object o)
22      {
23          if (this == o) return true;
24          if (!(o instanceof MockGold)) return false;
25  
26          final MockGold mockGold = (MockGold) o;
27  
28          if (weight != mockGold.weight) return false;
29  
30          return true;
31      }
32  
33      public int hashCode()
34      {
35          return weight;
36      }
37  }