@Test public void testEquals() { DifferenceNodeSpecifier group1Elem1 = new DifferenceNodeSpecifier(AllNodesNodeSpecifier.INSTANCE, AllNodesNodeSpecifier.INSTANCE); DifferenceNodeSpecifier group1Elem2 = new DifferenceNodeSpecifier(AllNodesNodeSpecifier.INSTANCE, AllNodesNodeSpecifier.INSTANCE); DifferenceNodeSpecifier group2Elem1 = new DifferenceNodeSpecifier(AllNodesNodeSpecifier.INSTANCE, NoNodesNodeSpecifier.INSTANCE); DifferenceNodeSpecifier group3Elem1 = new DifferenceNodeSpecifier(NoNodesNodeSpecifier.INSTANCE, NoNodesNodeSpecifier.INSTANCE); new EqualsTester() .addEqualityGroup(group1Elem1, group1Elem2) .addEqualityGroup(group2Elem1) .addEqualityGroup(group3Elem1) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof DifferenceNodeSpecifier)) { return false; } DifferenceNodeSpecifier rhs = (DifferenceNodeSpecifier) obj; return _nodeSpecifier1.equals(rhs._nodeSpecifier1) && _nodeSpecifier2.equals(rhs._nodeSpecifier2); }
DifferenceNodeSpecifier implements NodeSpecifier { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof DifferenceNodeSpecifier)) { return false; } DifferenceNodeSpecifier rhs = (DifferenceNodeSpecifier) obj; return _nodeSpecifier1.equals(rhs._nodeSpecifier1) && _nodeSpecifier2.equals(rhs._nodeSpecifier2); } }
DifferenceNodeSpecifier implements NodeSpecifier { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof DifferenceNodeSpecifier)) { return false; } DifferenceNodeSpecifier rhs = (DifferenceNodeSpecifier) obj; return _nodeSpecifier1.equals(rhs._nodeSpecifier1) && _nodeSpecifier2.equals(rhs._nodeSpecifier2); } DifferenceNodeSpecifier(
      @Nonnull NodeSpecifier nodeSpecifier1, @Nonnull NodeSpecifier nodeSpecifier2); }
DifferenceNodeSpecifier implements NodeSpecifier { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof DifferenceNodeSpecifier)) { return false; } DifferenceNodeSpecifier rhs = (DifferenceNodeSpecifier) obj; return _nodeSpecifier1.equals(rhs._nodeSpecifier1) && _nodeSpecifier2.equals(rhs._nodeSpecifier2); } DifferenceNodeSpecifier(
      @Nonnull NodeSpecifier nodeSpecifier1, @Nonnull NodeSpecifier nodeSpecifier2); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override Set<String> resolve(SpecifierContext ctxt); }
DifferenceNodeSpecifier implements NodeSpecifier { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof DifferenceNodeSpecifier)) { return false; } DifferenceNodeSpecifier rhs = (DifferenceNodeSpecifier) obj; return _nodeSpecifier1.equals(rhs._nodeSpecifier1) && _nodeSpecifier2.equals(rhs._nodeSpecifier2); } DifferenceNodeSpecifier(
      @Nonnull NodeSpecifier nodeSpecifier1, @Nonnull NodeSpecifier nodeSpecifier2); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override Set<String> resolve(SpecifierContext ctxt);  }