@Test public void testEquals() { new EqualsTester() .addEqualityGroup( new RangeCommunityHalf(new SubRange(1, 2)), new RangeCommunityHalf(new SubRange(1, 2))) .addEqualityGroup(new RangeCommunityHalf(new SubRange(1, 3))) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof RangeCommunityHalf)) { return false; } return _range.equals(((RangeCommunityHalf) obj)._range); }
RangeCommunityHalf implements CommunityHalfExpr { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof RangeCommunityHalf)) { return false; } return _range.equals(((RangeCommunityHalf) obj)._range); } }
RangeCommunityHalf implements CommunityHalfExpr { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof RangeCommunityHalf)) { return false; } return _range.equals(((RangeCommunityHalf) obj)._range); } RangeCommunityHalf(@Nonnull SubRange range); }
RangeCommunityHalf implements CommunityHalfExpr { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof RangeCommunityHalf)) { return false; } return _range.equals(((RangeCommunityHalf) obj)._range); } RangeCommunityHalf(@Nonnull SubRange range); @Override boolean dynamicMatchCommunity(); @Override boolean equals(@Nullable Object obj); @JsonProperty(PROP_RANGE) @Nonnull SubRange getRange(); @Override int hashCode(); @Override boolean matches(int communityHalf); @Override String toString(); }
RangeCommunityHalf implements CommunityHalfExpr { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof RangeCommunityHalf)) { return false; } return _range.equals(((RangeCommunityHalf) obj)._range); } RangeCommunityHalf(@Nonnull SubRange range); @Override boolean dynamicMatchCommunity(); @Override boolean equals(@Nullable Object obj); @JsonProperty(PROP_RANGE) @Nonnull SubRange getRange(); @Override int hashCode(); @Override boolean matches(int communityHalf); @Override String toString(); static final RangeCommunityHalf ALL; }