Mercurial > hg > Members > sugi > MessagePack-java
comparison src/test/java/org/msgpack/testclasses/EnumTypeFieldsClass.java @ 0:cb825acd883a
first commit
author | sugi |
---|---|
date | Sat, 18 Oct 2014 15:06:15 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:cb825acd883a |
---|---|
1 package org.msgpack.testclasses; | |
2 | |
3 import org.junit.Ignore; | |
4 import org.msgpack.annotation.Beans; | |
5 import org.msgpack.annotation.Message; | |
6 import org.msgpack.annotation.OrdinalEnum; | |
7 | |
8 | |
9 @Ignore @Message @Beans | |
10 public class EnumTypeFieldsClass { | |
11 public int f0; | |
12 | |
13 public SampleEnum f1; | |
14 | |
15 public EnumTypeFieldsClass() {} | |
16 | |
17 public int getF0() { | |
18 return f0; | |
19 } | |
20 | |
21 public void setF0(int f0) { | |
22 this.f0 = f0; | |
23 } | |
24 | |
25 public SampleEnum getF1() { | |
26 return f1; | |
27 } | |
28 | |
29 public void setF1(SampleEnum f1) { | |
30 this.f1 = f1; | |
31 } | |
32 | |
33 @Override | |
34 public boolean equals(Object o) { | |
35 if (! (o instanceof EnumTypeFieldsClass)) { | |
36 return false; | |
37 } | |
38 EnumTypeFieldsClass that = (EnumTypeFieldsClass) o; | |
39 if (f0 != that.f0) { | |
40 return false; | |
41 } | |
42 if (f1 != that.f1) { | |
43 return false; | |
44 } | |
45 return true; | |
46 } | |
47 | |
48 @Ignore @OrdinalEnum | |
49 public static enum SampleEnum { | |
50 ONE, TWO, THREE; | |
51 } | |
52 } |