@Test public void testEquals() { new EqualsTester() .addEqualityGroup( new BgpRouteDiff(PROP_AS_PATH, "a", "b"), new BgpRouteDiff(PROP_AS_PATH, "a", "b")) .addEqualityGroup(new BgpRouteDiff(PROP_COMMUNITIES, "a", "b")) .addEqualityGroup(new BgpRouteDiff(PROP_AS_PATH, "c", "b")) .addEqualityGroup(new BgpRouteDiff(PROP_AS_PATH, "a", "c")) .testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof BgpRouteDiff)) { return false; } BgpRouteDiff diff = (BgpRouteDiff) o; return Objects.equals(_fieldName, diff._fieldName) && Objects.equals(_oldValue, diff._oldValue) && Objects.equals(_newValue, diff._newValue); }
BgpRouteDiff implements Comparable<BgpRouteDiff> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof BgpRouteDiff)) { return false; } BgpRouteDiff diff = (BgpRouteDiff) o; return Objects.equals(_fieldName, diff._fieldName) && Objects.equals(_oldValue, diff._oldValue) && Objects.equals(_newValue, diff._newValue); } }
BgpRouteDiff implements Comparable<BgpRouteDiff> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof BgpRouteDiff)) { return false; } BgpRouteDiff diff = (BgpRouteDiff) o; return Objects.equals(_fieldName, diff._fieldName) && Objects.equals(_oldValue, diff._oldValue) && Objects.equals(_newValue, diff._newValue); } BgpRouteDiff(String fieldName, String oldValue, String newValue); }
BgpRouteDiff implements Comparable<BgpRouteDiff> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof BgpRouteDiff)) { return false; } BgpRouteDiff diff = (BgpRouteDiff) o; return Objects.equals(_fieldName, diff._fieldName) && Objects.equals(_oldValue, diff._oldValue) && Objects.equals(_newValue, diff._newValue); } BgpRouteDiff(String fieldName, String oldValue, String newValue); @Override boolean equals(Object o); @JsonProperty(PROP_FIELD_NAME) String getFieldName(); @JsonProperty(PROP_OLD_VALUE) String getOldValue(); @Override int hashCode(); @JsonProperty(PROP_NEW_VALUE) String getNewValue(); static SortedSet<BgpRouteDiff> routeDiffs(
      @Nullable BgpRoute route1, @Nullable BgpRoute route2); @Override int compareTo(BgpRouteDiff that); }
BgpRouteDiff implements Comparable<BgpRouteDiff> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof BgpRouteDiff)) { return false; } BgpRouteDiff diff = (BgpRouteDiff) o; return Objects.equals(_fieldName, diff._fieldName) && Objects.equals(_oldValue, diff._oldValue) && Objects.equals(_newValue, diff._newValue); } BgpRouteDiff(String fieldName, String oldValue, String newValue); @Override boolean equals(Object o); @JsonProperty(PROP_FIELD_NAME) String getFieldName(); @JsonProperty(PROP_OLD_VALUE) String getOldValue(); @Override int hashCode(); @JsonProperty(PROP_NEW_VALUE) String getNewValue(); static SortedSet<BgpRouteDiff> routeDiffs(
      @Nullable BgpRoute route1, @Nullable BgpRoute route2); @Override int compareTo(BgpRouteDiff that);  }