@Test public void testPermitAll() { RouteFilterList rfl = new RouteFilterList("name", ImmutableList.of(PERMIT_ALL)); for (int prefixLen = 0; prefixLen <= Prefix.MAX_PREFIX_LENGTH; prefixLen++) { assertTrue(rfl.permits(Prefix.create(Ip.parse("1.1.1.1"), prefixLen))); } }
@JsonCreator private static RouteFilterLine create( @Nullable @JsonProperty(PROP_ACTION) LineAction action, @Nullable @JsonProperty(PROP_IP_WILDCARD) IpWildcard ipWildcard, @Nullable @JsonProperty(PROP_LENGTH_RANGE) SubRange lengthRange) { checkArgument(action != null, "% is missing", PROP_ACTION); checkArgument(ipWildcard != null, "% is missing", PROP_IP_WILDCARD); checkArgument(lengthRange != null, "% is missing", PROP_LENGTH_RANGE); return new RouteFilterLine(action, ipWildcard, lengthRange); }
RouteFilterLine implements Serializable { @JsonCreator private static RouteFilterLine create( @Nullable @JsonProperty(PROP_ACTION) LineAction action, @Nullable @JsonProperty(PROP_IP_WILDCARD) IpWildcard ipWildcard, @Nullable @JsonProperty(PROP_LENGTH_RANGE) SubRange lengthRange) { checkArgument(action != null, "% is missing", PROP_ACTION); checkArgument(ipWildcard != null, "% is missing", PROP_IP_WILDCARD); checkArgument(lengthRange != null, "% is missing", PROP_LENGTH_RANGE); return new RouteFilterLine(action, ipWildcard, lengthRange); } }
RouteFilterLine implements Serializable { @JsonCreator private static RouteFilterLine create( @Nullable @JsonProperty(PROP_ACTION) LineAction action, @Nullable @JsonProperty(PROP_IP_WILDCARD) IpWildcard ipWildcard, @Nullable @JsonProperty(PROP_LENGTH_RANGE) SubRange lengthRange) { checkArgument(action != null, "% is missing", PROP_ACTION); checkArgument(ipWildcard != null, "% is missing", PROP_IP_WILDCARD); checkArgument(lengthRange != null, "% is missing", PROP_LENGTH_RANGE); return new RouteFilterLine(action, ipWildcard, lengthRange); } RouteFilterLine(LineAction action, IpWildcard ipWildcard, SubRange lengthRange);  RouteFilterLine(LineAction action, Prefix prefix, SubRange lengthRange);  RouteFilterLine(LineAction action, PrefixRange prefixRange); }
RouteFilterLine implements Serializable { @JsonCreator private static RouteFilterLine create( @Nullable @JsonProperty(PROP_ACTION) LineAction action, @Nullable @JsonProperty(PROP_IP_WILDCARD) IpWildcard ipWildcard, @Nullable @JsonProperty(PROP_LENGTH_RANGE) SubRange lengthRange) { checkArgument(action != null, "% is missing", PROP_ACTION); checkArgument(ipWildcard != null, "% is missing", PROP_IP_WILDCARD); checkArgument(lengthRange != null, "% is missing", PROP_LENGTH_RANGE); return new RouteFilterLine(action, ipWildcard, lengthRange); } RouteFilterLine(LineAction action, IpWildcard ipWildcard, SubRange lengthRange);  RouteFilterLine(LineAction action, Prefix prefix, SubRange lengthRange);  RouteFilterLine(LineAction action, PrefixRange prefixRange); @Override boolean equals(@Nullable Object o); @JsonProperty(PROP_ACTION) LineAction getAction(); @JsonProperty(PROP_LENGTH_RANGE) SubRange getLengthRange(); @JsonProperty(PROP_IP_WILDCARD) IpWildcard getIpWildcard(); @Override int hashCode(); @Override String toString(); }
RouteFilterLine implements Serializable { @JsonCreator private static RouteFilterLine create( @Nullable @JsonProperty(PROP_ACTION) LineAction action, @Nullable @JsonProperty(PROP_IP_WILDCARD) IpWildcard ipWildcard, @Nullable @JsonProperty(PROP_LENGTH_RANGE) SubRange lengthRange) { checkArgument(action != null, "% is missing", PROP_ACTION); checkArgument(ipWildcard != null, "% is missing", PROP_IP_WILDCARD); checkArgument(lengthRange != null, "% is missing", PROP_LENGTH_RANGE); return new RouteFilterLine(action, ipWildcard, lengthRange); } RouteFilterLine(LineAction action, IpWildcard ipWildcard, SubRange lengthRange);  RouteFilterLine(LineAction action, Prefix prefix, SubRange lengthRange);  RouteFilterLine(LineAction action, PrefixRange prefixRange); @Override boolean equals(@Nullable Object o); @JsonProperty(PROP_ACTION) LineAction getAction(); @JsonProperty(PROP_LENGTH_RANGE) SubRange getLengthRange(); @JsonProperty(PROP_IP_WILDCARD) IpWildcard getIpWildcard(); @Override int hashCode(); @Override String toString(); static final RouteFilterLine PERMIT_ALL; }