CanVector implements Iterable<Can<T>>, Serializable { public static <T> CanVector<T> empty() { return new CanVector<>(0); } CanVector(int size); int size(); @Override Iterator<Can<T>> iterator(); Can<T> get(int index); CanVector<T> set(int index, @NonNull Can<T> can); static CanVector<T> empty(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test void emptyCanVectors_shouldBeEqual() { assertEquals(CanVector.empty(), new CanVector<String>(0)); }
@Test void emptyCanVector_shouldBeSerializable() { SerializationTester.assertEqualsOnRoundtrip(CanVector.empty()); SerializationTester.assertEqualsOnRoundtrip(new CanVector<String>(0)); }