Exemplo n.º 1
0
 @Test
 public void shouldConvertToVector() {
   final Value<Integer> value = of(1, 2, 3);
   final Vector<Integer> vector = value.toVector();
   if (value.isSingleValued()) {
     assertThat(vector).isEqualTo(Vector.of(1));
   } else {
     assertThat(vector).isEqualTo(Vector.of(1, 2, 3));
   }
 }
Exemplo n.º 2
0
 @Override
 protected Vector<Byte> ofAll(byte[] array) {
   return Vector.ofAll(array);
 }
Exemplo n.º 3
0
 @Override
 protected Vector<Boolean> ofAll(boolean[] array) {
   return Vector.ofAll(array);
 }
Exemplo n.º 4
0
 @Override
 protected Vector<Integer> range(int from, int toExclusive) {
   return Vector.range(from, toExclusive);
 }
Exemplo n.º 5
0
 @Override
 protected Vector<Character> range(char from, char toExclusive) {
   return Vector.range(from, toExclusive);
 }
Exemplo n.º 6
0
 @Override
 protected <T> Vector<T> tabulate(int n, Function<? super Integer, ? extends T> f) {
   return Vector.tabulate(n, f);
 }
Exemplo n.º 7
0
 @Override
 protected Vector<Long> ofAll(long[] array) {
   return Vector.ofAll(array);
 }
Exemplo n.º 8
0
 @Override
 protected Vector<Float> ofAll(float[] array) {
   return Vector.ofAll(array);
 }
Exemplo n.º 9
0
 @Override
 protected Vector<Long> rangeClosedBy(long from, long toInclusive, long step) {
   return Vector.rangeClosedBy(from, toInclusive, step);
 }
Exemplo n.º 10
0
 @Override
 protected Vector<Long> rangeClosed(long from, long toInclusive) {
   return Vector.rangeClosed(from, toInclusive);
 }
Exemplo n.º 11
0
 @Override
 protected Vector<Integer> rangeClosedBy(int from, int toInclusive, int step) {
   return Vector.rangeClosedBy(from, toInclusive, step);
 }
Exemplo n.º 12
0
 @Override
 protected Vector<Integer> rangeClosed(int from, int toInclusive) {
   return Vector.rangeClosed(from, toInclusive);
 }
Exemplo n.º 13
0
 @Override
 protected Vector<Double> rangeClosedBy(double from, double toInclusive, double step) {
   return Vector.rangeClosedBy(from, toInclusive, step);
 }
Exemplo n.º 14
0
 @Override
 protected Vector<Character> rangeClosed(char from, char toInclusive) {
   return Vector.rangeClosed(from, toInclusive);
 }
Exemplo n.º 15
0
 @Override
 protected Vector<Long> range(long from, long toExclusive) {
   return Vector.range(from, toExclusive);
 }
Exemplo n.º 16
0
 @Override
 protected Vector<Character> ofAll(char[] array) {
   return Vector.ofAll(array);
 }
Exemplo n.º 17
0
 @Override
 protected Vector<Double> ofAll(double[] array) {
   return Vector.ofAll(array);
 }
Exemplo n.º 18
0
 @Override
 protected <T> Collector<T, ArrayList<T>, Vector<T>> collector() {
   return Vector.collector();
 }
Exemplo n.º 19
0
 @Override
 protected Vector<Integer> ofAll(int[] array) {
   return Vector.ofAll(array);
 }
Exemplo n.º 20
0
 @Override
 protected <T> Vector<T> empty() {
   return Vector.empty();
 }
Exemplo n.º 21
0
 @Override
 protected Vector<Short> ofAll(short[] array) {
   return Vector.ofAll(array);
 }
Exemplo n.º 22
0
 @Override
 protected <T> Vector<T> of(T element) {
   return Vector.of(element);
 }
Exemplo n.º 23
0
 @Override
 protected <T> Vector<T> fill(int n, Supplier<? extends T> s) {
   return Vector.fill(n, s);
 }
Exemplo n.º 24
0
 @SuppressWarnings("varargs")
 @SafeVarargs
 @Override
 protected final <T> Vector<T> of(T... elements) {
   return Vector.of(elements);
 }
Exemplo n.º 25
0
 @Override
 protected Vector<Character> rangeBy(char from, char toExclusive, int step) {
   return Vector.rangeBy(from, toExclusive, step);
 }
Exemplo n.º 26
0
 @Override
 protected <T> Vector<T> ofAll(Iterable<? extends T> elements) {
   return Vector.ofAll(elements);
 }