@Test public void testStopWhenEmpty() { IpSpace space = AclIpSpace.builder() .thenPermitting(Prefix.parse("1.2.3.4/32").toIpSpace()) .thenRejecting(UniverseIpSpace.INSTANCE) .thenPermitting(Prefix.parse("2.0.0.0/8").toIpSpace()) .build(); IpSpace expected = AclIpSpace.builder() .thenPermitting(Prefix.parse("1.2.3.4/32").toIpSpace()) .thenRejecting(UniverseIpSpace.INSTANCE) .build(); assertThat(space, equalTo(expected)); }
public static Builder builder() { return new Builder(); }
AclIpSpace extends IpSpace { public static Builder builder() { return new Builder(); } }
AclIpSpace extends IpSpace { public static Builder builder() { return new Builder(); } @JsonCreator private  AclIpSpace(@Nullable @JsonProperty(PROP_LINES) List<AclIpSpaceLine> lines); }
AclIpSpace extends IpSpace { public static Builder builder() { return new Builder(); } @JsonCreator private  AclIpSpace(@Nullable @JsonProperty(PROP_LINES) List<AclIpSpaceLine> lines); static Builder builder(); static IpSpace of(Iterable<AclIpSpaceLine> lines); static IpSpace of(AclIpSpaceLine... lines); static @Nullable IpSpace difference(
      @Nullable IpSpace ipSpace1, @Nullable IpSpace ipSpace2); static @Nullable IpSpace intersection(IpSpace... ipSpaces); static @Nullable IpSpace intersection(Iterable<IpSpace> ipSpaces); static Builder permitting(IpSpace... ipSpaces); static Builder permitting(Iterable<IpSpace> ipSpaces); static Builder permitting(Stream<IpSpace> ipSpaces); static Builder rejecting(IpSpace... ipSpaces); static Builder rejecting(Iterable<IpSpace> ipSpaces); static @Nullable IpSpace union(IpSpace... ipSpaces); static @Nullable IpSpace union(Iterable<IpSpace> ipSpaces); @Override R accept(GenericIpSpaceVisitor<R> ipSpaceVisitor); @Nonnull @JsonProperty(PROP_LINES) List<AclIpSpaceLine> getLines(); @Override int hashCode(); @Override String toString(); }
AclIpSpace extends IpSpace { public static Builder builder() { return new Builder(); } @JsonCreator private  AclIpSpace(@Nullable @JsonProperty(PROP_LINES) List<AclIpSpaceLine> lines); static Builder builder(); static IpSpace of(Iterable<AclIpSpaceLine> lines); static IpSpace of(AclIpSpaceLine... lines); static @Nullable IpSpace difference(
      @Nullable IpSpace ipSpace1, @Nullable IpSpace ipSpace2); static @Nullable IpSpace intersection(IpSpace... ipSpaces); static @Nullable IpSpace intersection(Iterable<IpSpace> ipSpaces); static Builder permitting(IpSpace... ipSpaces); static Builder permitting(Iterable<IpSpace> ipSpaces); static Builder permitting(Stream<IpSpace> ipSpaces); static Builder rejecting(IpSpace... ipSpaces); static Builder rejecting(Iterable<IpSpace> ipSpaces); static @Nullable IpSpace union(IpSpace... ipSpaces); static @Nullable IpSpace union(Iterable<IpSpace> ipSpaces); @Override R accept(GenericIpSpaceVisitor<R> ipSpaceVisitor); @Nonnull @JsonProperty(PROP_LINES) List<AclIpSpaceLine> getLines(); @Override int hashCode(); @Override String toString();  }