@Test public void equals() { ResourceType type1 = new ResourceType("test"); ResourceType type2 = new ResourceType("test"); ResourceType type3 = new ResourceType("other"); assertEquals(type1, type2); assertNotEquals(type1, type3); }
@Override public boolean equals(Object object) { if (object == null) { return false; } if (object == this) { return true; } if (object.getClass() != getClass()) { return false; } ResourceType rhs = (ResourceType) object; return new EqualsBuilder() .append(getId(), rhs.getId()) .isEquals(); }
ResourceType { @Override public boolean equals(Object object) { if (object == null) { return false; } if (object == this) { return true; } if (object.getClass() != getClass()) { return false; } ResourceType rhs = (ResourceType) object; return new EqualsBuilder() .append(getId(), rhs.getId()) .isEquals(); } }
ResourceType { @Override public boolean equals(Object object) { if (object == null) { return false; } if (object == this) { return true; } if (object.getClass() != getClass()) { return false; } ResourceType rhs = (ResourceType) object; return new EqualsBuilder() .append(getId(), rhs.getId()) .isEquals(); } ResourceType(String id); @Unstable  ResourceType(String id, boolean isStatic); }
ResourceType { @Override public boolean equals(Object object) { if (object == null) { return false; } if (object == this) { return true; } if (object.getClass() != getClass()) { return false; } ResourceType rhs = (ResourceType) object; return new EqualsBuilder() .append(getId(), rhs.getId()) .isEquals(); } ResourceType(String id); @Unstable  ResourceType(String id, boolean isStatic); String getId(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object object); @Unstable boolean isStatic(); }
ResourceType { @Override public boolean equals(Object object) { if (object == null) { return false; } if (object == this) { return true; } if (object.getClass() != getClass()) { return false; } ResourceType rhs = (ResourceType) object; return new EqualsBuilder() .append(getId(), rhs.getId()) .isEquals(); } ResourceType(String id); @Unstable  ResourceType(String id, boolean isStatic); String getId(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object object); @Unstable boolean isStatic();  }