@Test public void testEquals() { new EqualsTester() .addEqualityGroup( new ExplicitAsPathSet(new RegexAsPathSetElem("123")), new ExplicitAsPathSet(new RegexAsPathSetElem("123"))) .addEqualityGroup( new ExplicitAsPathSet(new RegexAsPathSetElem("123"), new RegexAsPathSetElem("456"))) .addEqualityGroup(new ExplicitAsPathSet(new RegexAsPathSetElem("456"))) .testEquals(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof ExplicitAsPathSet)) { return false; } ExplicitAsPathSet other = (ExplicitAsPathSet) obj; return _elems.equals(other._elems); }
ExplicitAsPathSet extends AsPathSetExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof ExplicitAsPathSet)) { return false; } ExplicitAsPathSet other = (ExplicitAsPathSet) obj; return _elems.equals(other._elems); } }
ExplicitAsPathSet extends AsPathSetExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof ExplicitAsPathSet)) { return false; } ExplicitAsPathSet other = (ExplicitAsPathSet) obj; return _elems.equals(other._elems); } ExplicitAsPathSet(AsPathSetElem... elems);  ExplicitAsPathSet(Iterable<AsPathSetElem> elems); }
ExplicitAsPathSet extends AsPathSetExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof ExplicitAsPathSet)) { return false; } ExplicitAsPathSet other = (ExplicitAsPathSet) obj; return _elems.equals(other._elems); } ExplicitAsPathSet(AsPathSetElem... elems);  ExplicitAsPathSet(Iterable<AsPathSetElem> elems); @Override boolean equals(Object obj); @JsonProperty(PROP_ELEMS) @Nonnull List<AsPathSetElem> getElems(); @Override int hashCode(); @Override boolean matches(Environment environment); void setElems(List<AsPathSetElem> elems); }
ExplicitAsPathSet extends AsPathSetExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof ExplicitAsPathSet)) { return false; } ExplicitAsPathSet other = (ExplicitAsPathSet) obj; return _elems.equals(other._elems); } ExplicitAsPathSet(AsPathSetElem... elems);  ExplicitAsPathSet(Iterable<AsPathSetElem> elems); @Override boolean equals(Object obj); @JsonProperty(PROP_ELEMS) @Nonnull List<AsPathSetElem> getElems(); @Override int hashCode(); @Override boolean matches(Environment environment); void setElems(List<AsPathSetElem> elems);  }