RotateVect extends FixedVector<T> { private static <T> List<Scalar<T>> coords(final Vect<T> vector, final Degrees<T> angle) { final List<Scalar<T>> result = new ArrayList<>(vector.coords().length); for (int idx = 0; idx < vector.coords().length; ++idx) { result.add(RotateVect.coord(vector, angle, idx)); } return result; } RotateVect(final Vect<T> vector, final Number angle);  RotateVect(final Vect<T> vector, final Degrees<T> angle);   }
@Test public void errorsWhenEvaluatingCoordinates() { this.thrown.expect(UnsupportedOperationException.class); final Vect<Double> first = new FixedVector<>(new Scalars<>(2)); new RotateVect<>( first, Math.random() ).coords()[0].value(new SpyField<>(new Double(0.), new Double(1.))); }
@Test public void printsCoords() { final Vect<Double> vect = new RotateVect<>( new FixedVector<>(new Scalars<>(2)), Math.random() ); for (final Scalar<Double> scalar : vect.coords()) { MatcherAssert.assertThat( vect.toString(), Matchers.containsString(scalar.toString()) ); } }