@Test public void testGetBigDecimalArray() { ValueHolder h1 = new NumberHolder(BigDecimal.ZERO); ValueHolder h2 = new NumberHolder(BigDecimal.ONE); ValueHolder[] e1 = {h1, h2}; MultiValue mv = new DefaultMultiValue(new Object[]{e1}); BigDecimal[] expectedResult = {BigDecimal.ZERO, BigDecimal.ONE}; assertArrayEquals(expectedResult, mv.getBigDecimalArray(0)); }
@Override public BigDecimal[] getBigDecimalArray(int position) { ValueHolder[] array = getArray(position); BigDecimal[] result = new BigDecimal[array.length]; for (int i = 0; i < result.length; i++) { result[i] = array[i].getBigDecimal(); } return result; }
DefaultMultiValue implements MultiValue { @Override public BigDecimal[] getBigDecimalArray(int position) { ValueHolder[] array = getArray(position); BigDecimal[] result = new BigDecimal[array.length]; for (int i = 0; i < result.length; i++) { result[i] = array[i].getBigDecimal(); } return result; } }
DefaultMultiValue implements MultiValue { @Override public BigDecimal[] getBigDecimalArray(int position) { ValueHolder[] array = getArray(position); BigDecimal[] result = new BigDecimal[array.length]; for (int i = 0; i < result.length; i++) { result[i] = array[i].getBigDecimal(); } return result; } DefaultMultiValue(Object[] values);  DefaultMultiValue(Object[] values, Map<String, Integer> indexMap);  DefaultMultiValue(ParameterEntryKey key, Object[] values, Map<String, Integer> indexMap); }
DefaultMultiValue implements MultiValue { @Override public BigDecimal[] getBigDecimalArray(int position) { ValueHolder[] array = getArray(position); BigDecimal[] result = new BigDecimal[array.length]; for (int i = 0; i < result.length; i++) { result[i] = array[i].getBigDecimal(); } return result; } DefaultMultiValue(Object[] values);  DefaultMultiValue(Object[] values, Map<String, Integer> indexMap);  DefaultMultiValue(ParameterEntryKey key, Object[] values, Map<String, Integer> indexMap); @Override ParameterEntryKey getKey(); @Override ValueHolder getHolder(int position); @SuppressWarnings("unchecked") @Override T get(int position); @Override T get(int position, Class<T> clazz); @Override String getString(int position); @Override BigDecimal getBigDecimal(int position); @Override Date getDate(int position); @Override Integer getInteger(int position); @Override Long getLong(int position); @Override Boolean getBoolean(int position); @Override ValueHolder getHolder(String name); @SuppressWarnings("unchecked") @Override T get(String name); @Override T get(String name, Class<T> clazz); @Override String getString(String name); @Override BigDecimal getBigDecimal(String name); @Override Date getDate(String name); @Override Integer getInteger(String name); @Override Long getLong(String name); @Override Boolean getBoolean(String name); @Override T getEnum(int position, Class<T> enumClass); @Override T getEnum(String name, Class<T> enumClass); @Override ValueHolder[] getArray(int position); @Override Object[] unwrap(); @Override String[] getStringArray(int position); @Override Date[] getDateArray(int position); @Override Integer[] getIntegerArray(int position); @Override Long[] getLongArray(int position); @Override Boolean[] getBooleanArray(int position); @Override BigDecimal[] getBigDecimalArray(int position); @Override ValueHolder[] getArray(String name); @Override String[] getStringArray(String name); @Override BigDecimal[] getBigDecimalArray(String name); @Override Date[] getDateArray(String name); @Override Integer[] getIntegerArray(String name); @Override Long[] getLongArray(String name); @Override Boolean[] getBooleanArray(String name); @Override String[] asStrings(); @Override BigDecimal[] asBigDecimals(); @Override String toString(); @Override String toStringInline(); @Override ValueHolder nextHolder(); @SuppressWarnings("unchecked") @Override T next(); @Override T next(Class<T> clazz); @Override String nextString(); @Override BigDecimal nextBigDecimal(); @Override Date nextDate(); @Override Integer nextInteger(); @Override Long nextLong(); @Override T nextEnum(Class<T> enumClass); @Override ValueHolder[] nextArray(); @Override String[] nextStringArray(); @Override BigDecimal[] nextBigDecimalArray(); @Override Date[] nextDateArray(); @Override Integer[] nextIntegerArray(); @Override Long[] nextLongArray(); @Override int size(); }
DefaultMultiValue implements MultiValue { @Override public BigDecimal[] getBigDecimalArray(int position) { ValueHolder[] array = getArray(position); BigDecimal[] result = new BigDecimal[array.length]; for (int i = 0; i < result.length; i++) { result[i] = array[i].getBigDecimal(); } return result; } DefaultMultiValue(Object[] values);  DefaultMultiValue(Object[] values, Map<String, Integer> indexMap);  DefaultMultiValue(ParameterEntryKey key, Object[] values, Map<String, Integer> indexMap); @Override ParameterEntryKey getKey(); @Override ValueHolder getHolder(int position); @SuppressWarnings("unchecked") @Override T get(int position); @Override T get(int position, Class<T> clazz); @Override String getString(int position); @Override BigDecimal getBigDecimal(int position); @Override Date getDate(int position); @Override Integer getInteger(int position); @Override Long getLong(int position); @Override Boolean getBoolean(int position); @Override ValueHolder getHolder(String name); @SuppressWarnings("unchecked") @Override T get(String name); @Override T get(String name, Class<T> clazz); @Override String getString(String name); @Override BigDecimal getBigDecimal(String name); @Override Date getDate(String name); @Override Integer getInteger(String name); @Override Long getLong(String name); @Override Boolean getBoolean(String name); @Override T getEnum(int position, Class<T> enumClass); @Override T getEnum(String name, Class<T> enumClass); @Override ValueHolder[] getArray(int position); @Override Object[] unwrap(); @Override String[] getStringArray(int position); @Override Date[] getDateArray(int position); @Override Integer[] getIntegerArray(int position); @Override Long[] getLongArray(int position); @Override Boolean[] getBooleanArray(int position); @Override BigDecimal[] getBigDecimalArray(int position); @Override ValueHolder[] getArray(String name); @Override String[] getStringArray(String name); @Override BigDecimal[] getBigDecimalArray(String name); @Override Date[] getDateArray(String name); @Override Integer[] getIntegerArray(String name); @Override Long[] getLongArray(String name); @Override Boolean[] getBooleanArray(String name); @Override String[] asStrings(); @Override BigDecimal[] asBigDecimals(); @Override String toString(); @Override String toStringInline(); @Override ValueHolder nextHolder(); @SuppressWarnings("unchecked") @Override T next(); @Override T next(Class<T> clazz); @Override String nextString(); @Override BigDecimal nextBigDecimal(); @Override Date nextDate(); @Override Integer nextInteger(); @Override Long nextLong(); @Override T nextEnum(Class<T> enumClass); @Override ValueHolder[] nextArray(); @Override String[] nextStringArray(); @Override BigDecimal[] nextBigDecimalArray(); @Override Date[] nextDateArray(); @Override Integer[] nextIntegerArray(); @Override Long[] nextLongArray(); @Override int size();  }