@Test public void testCompareGroupIds() { final IpPermission tcp = builder().ipProtocol(IpProtocol.TCP).build(); final IpPermission aa = builder().fromPermission(tcp) .groupId("a").build(); final IpPermission a = builder().fromPermission(tcp) .groupId("a").build(); final IpPermission ab = builder().fromPermission(tcp) .groupId("a") .groupId("b").build(); final IpPermission ba = builder().fromPermission(tcp) .groupId("b") .groupId("a").build(); assertTotalOrder(ImmutableList.of(tcp, a, ab, ba)); assertEqualAndComparable(a, aa); }
public static Builder builder() { return new Builder(); }
IpPermission implements Comparable<IpPermission> { public static Builder builder() { return new Builder(); } }
IpPermission implements Comparable<IpPermission> { public static Builder builder() { return new Builder(); } IpPermission(IpProtocol ipProtocol, int fromPort, int toPort,
                       Multimap<String, String> tenantIdGroupNamePairs, Iterable<String> groupIds, Iterable<String> cidrBlocks,
                       Iterable<String> exclusionCidrBlocks); }
IpPermission implements Comparable<IpPermission> { public static Builder builder() { return new Builder(); } IpPermission(IpProtocol ipProtocol, int fromPort, int toPort,
                       Multimap<String, String> tenantIdGroupNamePairs, Iterable<String> groupIds, Iterable<String> cidrBlocks,
                       Iterable<String> exclusionCidrBlocks); static Builder builder(); IpProtocol getIpProtocol(); int getFromPort(); int getToPort(); Multimap<String, String> getTenantIdGroupNamePairs(); Set<String> getGroupIds(); Set<String> getCidrBlocks(); @Beta Set<String> getExclusionCidrBlocks(); @Override int compareTo(IpPermission that); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
IpPermission implements Comparable<IpPermission> { public static Builder builder() { return new Builder(); } IpPermission(IpProtocol ipProtocol, int fromPort, int toPort,
                       Multimap<String, String> tenantIdGroupNamePairs, Iterable<String> groupIds, Iterable<String> cidrBlocks,
                       Iterable<String> exclusionCidrBlocks); static Builder builder(); IpProtocol getIpProtocol(); int getFromPort(); int getToPort(); Multimap<String, String> getTenantIdGroupNamePairs(); Set<String> getGroupIds(); Set<String> getCidrBlocks(); @Beta Set<String> getExclusionCidrBlocks(); @Override int compareTo(IpPermission that); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }