@Test public void testEquals() { ExtendedCommunity ec = ExtendedCommunity.of(0, 2L, 123L); new EqualsTester() .addEqualityGroup(ec, ec, ExtendedCommunity.of(0, 2L, 123L)) .addEqualityGroup( ExtendedCommunity.of(1 << 8, 2L, 123L), ExtendedCommunity.of(1 << 8, Ip.parse("0.0.0.2"), 123L)) .addEqualityGroup(ExtendedCommunity.of(0, 3L, 123L)) .addEqualityGroup(ExtendedCommunity.of(0, 2L, 124L)) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof ExtendedCommunity)) { return false; } ExtendedCommunity that = (ExtendedCommunity) o; return _type == that._type && _subType == that._subType && _globalAdministrator == that._globalAdministrator && _localAdministrator == that._localAdministrator; }
ExtendedCommunity extends Community { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof ExtendedCommunity)) { return false; } ExtendedCommunity that = (ExtendedCommunity) o; return _type == that._type && _subType == that._subType && _globalAdministrator == that._globalAdministrator && _localAdministrator == that._localAdministrator; } }
ExtendedCommunity extends Community { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof ExtendedCommunity)) { return false; } ExtendedCommunity that = (ExtendedCommunity) o; return _type == that._type && _subType == that._subType && _globalAdministrator == that._globalAdministrator && _localAdministrator == that._localAdministrator; } private  ExtendedCommunity(
      byte type, byte subType, long globalAdministrator, long localAdministrator); }
ExtendedCommunity extends Community { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof ExtendedCommunity)) { return false; } ExtendedCommunity that = (ExtendedCommunity) o; return _type == that._type && _subType == that._subType && _globalAdministrator == that._globalAdministrator && _localAdministrator == that._localAdministrator; } private  ExtendedCommunity(
      byte type, byte subType, long globalAdministrator, long localAdministrator); @Nonnull static ExtendedCommunity parse(String communityStr); @Nonnull static Optional<ExtendedCommunity> tryParse(String text); static ExtendedCommunity of(int type, long globalAdministrator, long localAdministrator); static ExtendedCommunity of(int type, Ip globalAdministrator, long localAdministrator); static ExtendedCommunity target(long asn, long value); @Override T accept(CommunityVisitor<T> visitor); @Override boolean isTransitive(); boolean isRouteOrigin(); boolean isRouteTarget(); boolean isVpnDistinguisher(); long getGlobalAdministrator(); long getLocalAdministrator(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Nonnull @Override String matchString(); @Override @Nonnull @JsonValue String toString(); }
ExtendedCommunity extends Community { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof ExtendedCommunity)) { return false; } ExtendedCommunity that = (ExtendedCommunity) o; return _type == that._type && _subType == that._subType && _globalAdministrator == that._globalAdministrator && _localAdministrator == that._localAdministrator; } private  ExtendedCommunity(
      byte type, byte subType, long globalAdministrator, long localAdministrator); @Nonnull static ExtendedCommunity parse(String communityStr); @Nonnull static Optional<ExtendedCommunity> tryParse(String text); static ExtendedCommunity of(int type, long globalAdministrator, long localAdministrator); static ExtendedCommunity of(int type, Ip globalAdministrator, long localAdministrator); static ExtendedCommunity target(long asn, long value); @Override T accept(CommunityVisitor<T> visitor); @Override boolean isTransitive(); boolean isRouteOrigin(); boolean isRouteTarget(); boolean isVpnDistinguisher(); long getGlobalAdministrator(); long getLocalAdministrator(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Nonnull @Override String matchString(); @Override @Nonnull @JsonValue String toString();  }