Streamers { public static <S extends AnnotatedSpace<A>, A extends TypedAxis> Stream<A> axisStream(final S space) { final int dimensions = space.numDimensions(); final Builder<A> builder = Stream.builder(); for (int d = 0; d < dimensions; d++) { builder.add(space.axis(d)); } return builder.build(); } private  Streamers(); static Stream<A> axisStream(final S space); static Stream<A> spatialAxisStream(final S space);  }
@Test(expected = NullPointerException.class) public void testAxisStreamThrowsNPEIfSpaceNull() { Streamers.axisStream(null); }