class Bgpv4Route extends BgpRoute<Bgpv4Route.Builder, Bgpv4Route> {

  @Override
  public boolean equals(@Nullable Object o) {
    if (this == o) {
      return true;
    }
    if (!(o instanceof Bgpv4Route)) {
      return false;
    }
    Bgpv4Route other = (Bgpv4Route) o;
    return (_hashCode == other._hashCode || _hashCode == 0 || other._hashCode == 0)
        && _network.equals(other._network)
        && _nextHopIp.equals(other._nextHopIp)
        && _originatorIp.equals(other._originatorIp)
        && _nextHopInterface.equals(other._nextHopInterface)
        && Objects.equals(_receivedFromIp, other._receivedFromIp)
        // Things above this line are more likely to cause false earlier.
        && _admin == other._admin
        && _discard == other._discard
        && _localPreference == other._localPreference
        && _med == other._med
        && _originType == other._originType
        && _protocol == other._protocol
        && _receivedFromRouteReflectorClient == other._receivedFromRouteReflectorClient
        && _srcProtocol == other._srcProtocol
        && _tag == other._tag
        && _weight == other._weight
        && getNonRouting() == other.getNonRouting()
        && getNonForwarding() == other.getNonForwarding()
        && _asPath.equals(other._asPath)
        && _clusterList.equals(other._clusterList)
        && _communities.equals(other._communities);
  }

  private  Bgpv4Route(
      @Nullable Prefix network,
      @Nullable Ip nextHopIp,
      int admin,
      @Nullable AsPath asPath,
      @Nullable Set<Community> communities,
      boolean discard,
      long localPreference,
      long med,
      String nextHopInterface,
      Ip originatorIp,
      @Nullable Set<Long> clusterList,
      boolean receivedFromRouteReflectorClient,
      OriginType originType,
      RoutingProtocol protocol,
      @Nullable Ip receivedFromIp,
      @Nullable RoutingProtocol srcProtocol,
      long tag,
      int weight,
      boolean nonForwarding,
      boolean nonRouting);

}