@Test public void testIsEqualsSucceed() { ResourceIdentifier resourceIdentifier = new ResourceIdentifier. Builder(). setGroupName("a group"). setJvmName("a jvm"). build(); ResourceIdentifier anotherResourceIdentifier = new ResourceIdentifier. Builder(). setGroupName("a group"). setJvmName("a jvm"). build(); assertTrue(resourceIdentifier.equals(anotherResourceIdentifier)); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || ResourceIdentifier.class != o.getClass()) return false; ResourceIdentifier that = (ResourceIdentifier) o; return new EqualsBuilder() .append(resourceName, that.resourceName) .append(groupName, that.groupName) .append(webServerName, that.webServerName) .append(jvmName, that.jvmName) .append(webAppName, that.webAppName) .isEquals(); }
ResourceIdentifier { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || ResourceIdentifier.class != o.getClass()) return false; ResourceIdentifier that = (ResourceIdentifier) o; return new EqualsBuilder() .append(resourceName, that.resourceName) .append(groupName, that.groupName) .append(webServerName, that.webServerName) .append(jvmName, that.jvmName) .append(webAppName, that.webAppName) .isEquals(); } }
ResourceIdentifier { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || ResourceIdentifier.class != o.getClass()) return false; ResourceIdentifier that = (ResourceIdentifier) o; return new EqualsBuilder() .append(resourceName, that.resourceName) .append(groupName, that.groupName) .append(webServerName, that.webServerName) .append(jvmName, that.jvmName) .append(webAppName, that.webAppName) .isEquals(); } private  ResourceIdentifier(final Builder builder); }
ResourceIdentifier { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || ResourceIdentifier.class != o.getClass()) return false; ResourceIdentifier that = (ResourceIdentifier) o; return new EqualsBuilder() .append(resourceName, that.resourceName) .append(groupName, that.groupName) .append(webServerName, that.webServerName) .append(jvmName, that.jvmName) .append(webAppName, that.webAppName) .isEquals(); } private  ResourceIdentifier(final Builder builder); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
ResourceIdentifier { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || ResourceIdentifier.class != o.getClass()) return false; ResourceIdentifier that = (ResourceIdentifier) o; return new EqualsBuilder() .append(resourceName, that.resourceName) .append(groupName, that.groupName) .append(webServerName, that.webServerName) .append(jvmName, that.jvmName) .append(webAppName, that.webAppName) .isEquals(); } private  ResourceIdentifier(final Builder builder); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); final String resourceName; final String groupName; final String webServerName; final String jvmName; final String webAppName; }