comparison src/test/java/org/msgpack/testclasses/InheritanceClassNotNullable.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.NotNullable;
7
8
9 @Ignore @Message @Beans
10 public class InheritanceClassNotNullable extends SuperClassNotNullable {
11 @NotNullable
12 public String f1;
13
14 @NotNullable
15 public int f2;
16
17 public InheritanceClassNotNullable() {}
18
19 @NotNullable
20 public String getF1() {
21 return f1;
22 }
23
24 @NotNullable
25 public void setF1(String f1) {
26 this.f1 = f1;
27 }
28
29 @NotNullable
30 public int getF2() {
31 return f2;
32 }
33
34 @NotNullable
35 public void setF2(int f2) {
36 this.f2 = f2;
37 }
38
39 @Override
40 public boolean equals(Object o) {
41 if (! (o instanceof InheritanceClassNotNullable)) {
42 return false;
43 }
44 InheritanceClassNotNullable that = (InheritanceClassNotNullable) o;
45 // f0
46 if (f0 == null) {
47 if (that.f0 != null) {
48 return false;
49 }
50 }
51 if (that.f0 != null) {
52 if (! f0.equals(that.f0)) {
53 return false;
54 }
55 }
56 // f1
57 if (f1 == null) {
58 if (that.f1 != null) {
59 return false;
60 }
61 }
62 if (that.f1 != null) {
63 if (! f1.equals(that.f1)) {
64 return false;
65 }
66 }
67 // f2
68 if (f2 != that.f2) {
69 return false;
70 }
71 return true;
72 }
73 }