@Test public void testToBuilder() { Bgpv4Route br = Bgpv4Route.builder() .setNetwork(Prefix.parse("1.1.1.0/24")) .setNextHopInterface("blah") .setOriginatorIp(Ip.parse("1.1.1.1")) .setOriginType(OriginType.IGP) .setProtocol(RoutingProtocol.BGP) .setTag(3L) .build(); assertThat(br, equalTo(br.toBuilder().build())); }
@Override public Builder toBuilder() { return builder() .setNetwork(getNetwork()) .setAdmin(getAdministrativeCost()) .setNonRouting(getNonRouting()) .setNonForwarding(getNonForwarding()) .setAsPath(_asPath) .setClusterList(_clusterList) .setCommunities(_communities) .setDiscard(_discard) .setLocalPreference(_localPreference) .setMetric(_med) .setNextHopInterface(_nextHopInterface) .setNextHopIp(_nextHopIp) .setOriginatorIp(_originatorIp) .setOriginType(_originType) .setProtocol(_protocol) .setReceivedFromIp(_receivedFromIp) .setReceivedFromRouteReflectorClient(_receivedFromRouteReflectorClient) .setSrcProtocol(_srcProtocol) .setTag(_tag) .setWeight(_weight); }
Bgpv4Route extends BgpRoute<Bgpv4Route.Builder, Bgpv4Route> { @Override public Builder toBuilder() { return builder() .setNetwork(getNetwork()) .setAdmin(getAdministrativeCost()) .setNonRouting(getNonRouting()) .setNonForwarding(getNonForwarding()) .setAsPath(_asPath) .setClusterList(_clusterList) .setCommunities(_communities) .setDiscard(_discard) .setLocalPreference(_localPreference) .setMetric(_med) .setNextHopInterface(_nextHopInterface) .setNextHopIp(_nextHopIp) .setOriginatorIp(_originatorIp) .setOriginType(_originType) .setProtocol(_protocol) .setReceivedFromIp(_receivedFromIp) .setReceivedFromRouteReflectorClient(_receivedFromRouteReflectorClient) .setSrcProtocol(_srcProtocol) .setTag(_tag) .setWeight(_weight); } }
Bgpv4Route extends BgpRoute<Bgpv4Route.Builder, Bgpv4Route> { @Override public Builder toBuilder() { return builder() .setNetwork(getNetwork()) .setAdmin(getAdministrativeCost()) .setNonRouting(getNonRouting()) .setNonForwarding(getNonForwarding()) .setAsPath(_asPath) .setClusterList(_clusterList) .setCommunities(_communities) .setDiscard(_discard) .setLocalPreference(_localPreference) .setMetric(_med) .setNextHopInterface(_nextHopInterface) .setNextHopIp(_nextHopIp) .setOriginatorIp(_originatorIp) .setOriginType(_originType) .setProtocol(_protocol) .setReceivedFromIp(_receivedFromIp) .setReceivedFromRouteReflectorClient(_receivedFromRouteReflectorClient) .setSrcProtocol(_srcProtocol) .setTag(_tag) .setWeight(_weight); } 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); }
Bgpv4Route extends BgpRoute<Bgpv4Route.Builder, Bgpv4Route> { @Override public Builder toBuilder() { return builder() .setNetwork(getNetwork()) .setAdmin(getAdministrativeCost()) .setNonRouting(getNonRouting()) .setNonForwarding(getNonForwarding()) .setAsPath(_asPath) .setClusterList(_clusterList) .setCommunities(_communities) .setDiscard(_discard) .setLocalPreference(_localPreference) .setMetric(_med) .setNextHopInterface(_nextHopInterface) .setNextHopIp(_nextHopIp) .setOriginatorIp(_originatorIp) .setOriginType(_originType) .setProtocol(_protocol) .setReceivedFromIp(_receivedFromIp) .setReceivedFromRouteReflectorClient(_receivedFromRouteReflectorClient) .setSrcProtocol(_srcProtocol) .setTag(_tag) .setWeight(_weight); } 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); static Builder builder(); @Override Builder toBuilder(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Override String toString(); }
Bgpv4Route extends BgpRoute<Bgpv4Route.Builder, Bgpv4Route> { @Override public Builder toBuilder() { return builder() .setNetwork(getNetwork()) .setAdmin(getAdministrativeCost()) .setNonRouting(getNonRouting()) .setNonForwarding(getNonForwarding()) .setAsPath(_asPath) .setClusterList(_clusterList) .setCommunities(_communities) .setDiscard(_discard) .setLocalPreference(_localPreference) .setMetric(_med) .setNextHopInterface(_nextHopInterface) .setNextHopIp(_nextHopIp) .setOriginatorIp(_originatorIp) .setOriginType(_originType) .setProtocol(_protocol) .setReceivedFromIp(_receivedFromIp) .setReceivedFromRouteReflectorClient(_receivedFromRouteReflectorClient) .setSrcProtocol(_srcProtocol) .setTag(_tag) .setWeight(_weight); } 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); static Builder builder(); @Override Builder toBuilder(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Override String toString();  }