@Test public void testEquals() { ConstantEnumSetSpecifier<String> group1Elem1 = new ConstantEnumSetSpecifier<>(ImmutableSet.of()); ConstantEnumSetSpecifier<String> group2Elem1 = new ConstantEnumSetSpecifier<>(ImmutableSet.of("a")); ConstantEnumSetSpecifier<String> group3Elem1 = new ConstantEnumSetSpecifier<>(ImmutableSet.of("a", "b")); ConstantEnumSetSpecifier<String> group3Elem2 = new ConstantEnumSetSpecifier<>(ImmutableSet.of("b", "a")); new EqualsTester() .addEqualityGroup(group1Elem1) .addEqualityGroup(group2Elem1) .addEqualityGroup(group3Elem1, group3Elem2) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (!(obj instanceof ConstantEnumSetSpecifier)) { return false; } return _structureTypes.equals(((ConstantEnumSetSpecifier) obj)._structureTypes); }
ConstantEnumSetSpecifier implements EnumSetSpecifier<T> { @Override public boolean equals(@Nullable Object obj) { if (!(obj instanceof ConstantEnumSetSpecifier)) { return false; } return _structureTypes.equals(((ConstantEnumSetSpecifier) obj)._structureTypes); } }
ConstantEnumSetSpecifier implements EnumSetSpecifier<T> { @Override public boolean equals(@Nullable Object obj) { if (!(obj instanceof ConstantEnumSetSpecifier)) { return false; } return _structureTypes.equals(((ConstantEnumSetSpecifier) obj)._structureTypes); } ConstantEnumSetSpecifier(Set<T> structureTypes); }
ConstantEnumSetSpecifier implements EnumSetSpecifier<T> { @Override public boolean equals(@Nullable Object obj) { if (!(obj instanceof ConstantEnumSetSpecifier)) { return false; } return _structureTypes.equals(((ConstantEnumSetSpecifier) obj)._structureTypes); } ConstantEnumSetSpecifier(Set<T> structureTypes); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override Set<T> resolve(); }
ConstantEnumSetSpecifier implements EnumSetSpecifier<T> { @Override public boolean equals(@Nullable Object obj) { if (!(obj instanceof ConstantEnumSetSpecifier)) { return false; } return _structureTypes.equals(((ConstantEnumSetSpecifier) obj)._structureTypes); } ConstantEnumSetSpecifier(Set<T> structureTypes); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override Set<T> resolve();  }