@Test public void testEquals() { CompletionMetadata.Builder builder = CompletionMetadata.builder(); CompletionMetadata initial = builder.build(); new EqualsTester() .addEqualityGroup(new Object()) .addEqualityGroup(initial, initial, builder.build(), CompletionMetadata.EMPTY) .addEqualityGroup(builder.setFilterNames(ImmutableSet.of("filter")).build()) .addEqualityGroup( builder .setInterfaces(ImmutableSet.of(NodeInterfacePair.of("node", "interface"))) .build()) .addEqualityGroup(builder.setIps(ImmutableSet.of(Ip.parse("1.1.1.1"))).build()) .addEqualityGroup( builder .setSourceLocations(ImmutableSet.of(new InterfaceLocation("node", "interface"))) .build()) .addEqualityGroup(builder.setMlagIds(ImmutableSet.of("mlag")).build()) .addEqualityGroup(builder.setNodes(ImmutableSet.of("node")).build()) .addEqualityGroup(builder.setPrefixes(ImmutableSet.of("prefix")).build()) .addEqualityGroup(builder.setStructureNames(ImmutableSet.of("structure")).build()) .addEqualityGroup(builder.setVrfs(ImmutableSet.of("vrf")).build()) .addEqualityGroup(builder.setZones(ImmutableSet.of("zone")).build()) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CompletionMetadata)) { return false; } CompletionMetadata rhs = (CompletionMetadata) obj; return _filterNames.equals(rhs._filterNames) && _interfaces.equals(rhs._interfaces) && _ips.equals(rhs._ips) && _sourceLocations.equals(rhs._sourceLocations) && _mlagIds.equals(rhs._mlagIds) && _nodes.equals(rhs._nodes) && _prefixes.equals(rhs._prefixes) && _routingPolicyNames.equals(rhs._routingPolicyNames) && _structureNames.equals(rhs._structureNames) && _vrfs.equals(rhs._vrfs) && _zones.equals(rhs._zones); }
CompletionMetadata implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CompletionMetadata)) { return false; } CompletionMetadata rhs = (CompletionMetadata) obj; return _filterNames.equals(rhs._filterNames) && _interfaces.equals(rhs._interfaces) && _ips.equals(rhs._ips) && _sourceLocations.equals(rhs._sourceLocations) && _mlagIds.equals(rhs._mlagIds) && _nodes.equals(rhs._nodes) && _prefixes.equals(rhs._prefixes) && _routingPolicyNames.equals(rhs._routingPolicyNames) && _structureNames.equals(rhs._structureNames) && _vrfs.equals(rhs._vrfs) && _zones.equals(rhs._zones); } }
CompletionMetadata implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CompletionMetadata)) { return false; } CompletionMetadata rhs = (CompletionMetadata) obj; return _filterNames.equals(rhs._filterNames) && _interfaces.equals(rhs._interfaces) && _ips.equals(rhs._ips) && _sourceLocations.equals(rhs._sourceLocations) && _mlagIds.equals(rhs._mlagIds) && _nodes.equals(rhs._nodes) && _prefixes.equals(rhs._prefixes) && _routingPolicyNames.equals(rhs._routingPolicyNames) && _structureNames.equals(rhs._structureNames) && _vrfs.equals(rhs._vrfs) && _zones.equals(rhs._zones); } CompletionMetadata(
      Set<String> filterNames,
      Set<NodeInterfacePair> interfaces,
      Map<Ip, IpCompletionMetadata> ips,
      Set<Location> sourceLocations,
      Set<String> mlagIds,
      Map<String, NodeCompletionMetadata> nodes,
      Set<String> prefixes,
      Set<String> routingPolicyNames,
      Set<String> structureNames,
      Set<String> vrfs,
      Set<String> zones); }
CompletionMetadata implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CompletionMetadata)) { return false; } CompletionMetadata rhs = (CompletionMetadata) obj; return _filterNames.equals(rhs._filterNames) && _interfaces.equals(rhs._interfaces) && _ips.equals(rhs._ips) && _sourceLocations.equals(rhs._sourceLocations) && _mlagIds.equals(rhs._mlagIds) && _nodes.equals(rhs._nodes) && _prefixes.equals(rhs._prefixes) && _routingPolicyNames.equals(rhs._routingPolicyNames) && _structureNames.equals(rhs._structureNames) && _vrfs.equals(rhs._vrfs) && _zones.equals(rhs._zones); } CompletionMetadata(
      Set<String> filterNames,
      Set<NodeInterfacePair> interfaces,
      Map<Ip, IpCompletionMetadata> ips,
      Set<Location> sourceLocations,
      Set<String> mlagIds,
      Map<String, NodeCompletionMetadata> nodes,
      Set<String> prefixes,
      Set<String> routingPolicyNames,
      Set<String> structureNames,
      Set<String> vrfs,
      Set<String> zones); static @Nonnull Builder builder(); @JsonProperty(PROP_FILTER_NAMES) @Nonnull Set<String> getFilterNames(); @JsonProperty(PROP_INTERFACES) @Nonnull Set<NodeInterfacePair> getInterfaces(); @JsonProperty(PROP_IPS) @Nonnull Map<Ip, IpCompletionMetadata> getIps(); @JsonProperty(PROP_SOURCE_LOCATIONS) @Nonnull Set<Location> getSourceLocations(); @JsonProperty(PROP_MLAG_IDS) @Nonnull Set<String> getMlagIds(); @JsonProperty(PROP_NODES) @Nonnull Map<String, NodeCompletionMetadata> getNodes(); @JsonProperty(PROP_PREFIXES) @Nonnull Set<String> getPrefixes(); @JsonProperty(PROP_ROUTING_POLICY_NAMES) @Nonnull Set<String> getRoutingPolicyNames(); @JsonProperty(PROP_STRUCTURE_NAMES) @Nonnull Set<String> getStructureNames(); @JsonProperty(PROP_VRFS) @Nonnull Set<String> getVrfs(); @JsonProperty(PROP_ZONES) @Nonnull Set<String> getZones(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override String toString(); }
CompletionMetadata implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CompletionMetadata)) { return false; } CompletionMetadata rhs = (CompletionMetadata) obj; return _filterNames.equals(rhs._filterNames) && _interfaces.equals(rhs._interfaces) && _ips.equals(rhs._ips) && _sourceLocations.equals(rhs._sourceLocations) && _mlagIds.equals(rhs._mlagIds) && _nodes.equals(rhs._nodes) && _prefixes.equals(rhs._prefixes) && _routingPolicyNames.equals(rhs._routingPolicyNames) && _structureNames.equals(rhs._structureNames) && _vrfs.equals(rhs._vrfs) && _zones.equals(rhs._zones); } CompletionMetadata(
      Set<String> filterNames,
      Set<NodeInterfacePair> interfaces,
      Map<Ip, IpCompletionMetadata> ips,
      Set<Location> sourceLocations,
      Set<String> mlagIds,
      Map<String, NodeCompletionMetadata> nodes,
      Set<String> prefixes,
      Set<String> routingPolicyNames,
      Set<String> structureNames,
      Set<String> vrfs,
      Set<String> zones); static @Nonnull Builder builder(); @JsonProperty(PROP_FILTER_NAMES) @Nonnull Set<String> getFilterNames(); @JsonProperty(PROP_INTERFACES) @Nonnull Set<NodeInterfacePair> getInterfaces(); @JsonProperty(PROP_IPS) @Nonnull Map<Ip, IpCompletionMetadata> getIps(); @JsonProperty(PROP_SOURCE_LOCATIONS) @Nonnull Set<Location> getSourceLocations(); @JsonProperty(PROP_MLAG_IDS) @Nonnull Set<String> getMlagIds(); @JsonProperty(PROP_NODES) @Nonnull Map<String, NodeCompletionMetadata> getNodes(); @JsonProperty(PROP_PREFIXES) @Nonnull Set<String> getPrefixes(); @JsonProperty(PROP_ROUTING_POLICY_NAMES) @Nonnull Set<String> getRoutingPolicyNames(); @JsonProperty(PROP_STRUCTURE_NAMES) @Nonnull Set<String> getStructureNames(); @JsonProperty(PROP_VRFS) @Nonnull Set<String> getVrfs(); @JsonProperty(PROP_ZONES) @Nonnull Set<String> getZones(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override String toString(); static final CompletionMetadata EMPTY; }