Skip to content

Commit

Permalink
Import Guava Objects to improve readability in ContainerInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
itzg committed Dec 22, 2015
1 parent 95c23d0 commit bed5b13
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package com.spotify.docker.client.messages;

import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;

Expand Down Expand Up @@ -54,8 +55,8 @@ public class ContainerInfo {
@JsonProperty("Volumes") private ImmutableMap<String, String> volumes;
@JsonProperty("VolumesRW") private ImmutableMap<String, Boolean> volumesRW;
/**
* This field is an extension defined by the Docker Swarm API, therefore it will only be populated when
* communicating with a Swarm cluster.
* This field is an extension defined by the Docker Swarm API, therefore it will only
* be populated when communicating with a Swarm cluster.
*/
@JsonProperty("Node") private Node node;

Expand Down Expand Up @@ -304,15 +305,15 @@ public boolean equals(Object o) {
return false;
}
Node node = (Node) o;
return com.google.common.base.Objects.equal(id, node.id) &&
com.google.common.base.Objects.equal(ip, node.ip) &&
com.google.common.base.Objects.equal(addr, node.addr) &&
com.google.common.base.Objects.equal(name, node.name);
return Objects.equal(id, node.id) &&
Objects.equal(ip, node.ip) &&
Objects.equal(addr, node.addr) &&
Objects.equal(name, node.name);
}

@Override
public int hashCode() {
return com.google.common.base.Objects.hashCode(id, ip, addr, name);
return Objects.hashCode(id, ip, addr, name);
}

@Override
Expand Down

0 comments on commit bed5b13

Please sign in to comment.