Skip to content

Commit a0f17db

Browse files
committed
Override object equals method in IoRecursiveConfig
1 parent 55db9de commit a0f17db

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<version>9</version>
88
</parent>
99

10-
<groupId>com.github.yuting-liu</groupId>
10+
<groupId>com.github.docker-java</groupId>
1111
<artifactId>docker-java</artifactId>
1212
<packaging>jar</packaging>
13-
<version>3.1.0</version>
13+
<version>3.1.0-SNAPSHOT</version>
1414

1515
<name>docker-java</name>
16-
<url>https://github.com/yuting-liu/docker-java</url>
16+
<url>https://github.com/docker-java/docker-java</url>
1717
<description>Java API Client for Docker</description>
1818

1919
<licenses>

src/main/java/com/github/dockerjava/api/model/IoRecursiveConfig.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
44
import com.fasterxml.jackson.annotation.JsonProperty;
5+
import org.apache.commons.lang.builder.EqualsBuilder;
6+
import org.apache.commons.lang.builder.HashCodeBuilder;
7+
import org.apache.commons.lang.builder.ToStringBuilder;
58

69
import javax.annotation.CheckForNull;
710
import java.io.Serializable;
@@ -83,4 +86,19 @@ public IoRecursiveConfig withValue(Long value) {
8386
this.value = value;
8487
return this;
8588
}
89+
90+
@Override
91+
public String toString() {
92+
return ToStringBuilder.reflectionToString(this);
93+
}
94+
95+
@Override
96+
public boolean equals(Object o) {
97+
return EqualsBuilder.reflectionEquals(this, o);
98+
}
99+
100+
@Override
101+
public int hashCode() {
102+
return HashCodeBuilder.reflectionHashCode(this);
103+
}
86104
}

0 commit comments

Comments
 (0)