forked from json-iterator/java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomizedObject.java
More file actions
28 lines (22 loc) · 821 Bytes
/
CustomizedObject.java
File metadata and controls
28 lines (22 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.jsoniter;
public class CustomizedObject {
public String field2;
public String field1;
public int field3;
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CustomizedObject that = (CustomizedObject) o;
if (field3 != that.field3) return false;
if (field2 != null ? !field2.equals(that.field2) : that.field2 != null) return false;
return field1 != null ? field1.equals(that.field1) : that.field1 == null;
}
@Override
public int hashCode() {
int result = field2 != null ? field2.hashCode() : 0;
result = 31 * result + (field1 != null ? field1.hashCode() : 0);
result = 31 * result + field3;
return result;
}
}