class GeneratedRoute extends AbstractRoute implements Comparable<GeneratedRoute> {

  @Override
  public boolean equals(@Nullable Object o) {
    if (this == o) {
      return true;
    }
    if (!(o instanceof GeneratedRoute)) {
      return false;
    }
    GeneratedRoute that = (GeneratedRoute) o;
    return (_hashCode == that._hashCode || _hashCode == 0 || that._hashCode == 0)
        && _network.equals(that._network)
        && _admin == that._admin
        && getNonRouting() == that.getNonRouting()
        && getNonForwarding() == that.getNonForwarding()
        && _discard == that._discard
        && _metric == that._metric
        && _tag == that._tag
        && _asPath.equals(that._asPath)
        && Objects.equals(_attributePolicy, that._attributePolicy)
        && _communities.equals(that._communities)
        && Objects.equals(_generationPolicy, that._generationPolicy)
        && _nextHopInterface.equals(that._nextHopInterface)
        && _nextHopIp.equals(that._nextHopIp);
  }

  private  GeneratedRoute(
      Prefix network,
      int administrativeCost,
      Ip nextHopIp,
      AsPath asPath,
      @Nullable String attributePolicy,
      @Nullable SortedSet<Community> communities,
      boolean discard,
      @Nullable String generationPolicy,
      long metric,
      String nextHopInterface,
      long tag,
      boolean nonForwarding,
      boolean nonRouting);

}