class DefaultMultiValue implements MultiValue {

    @Override
    public Object[] unwrap() {
        Object[] result = new Object[values.length];

        for (int i = 0; i < values.length; i++) {
            Object val = values[i];

            // if object at i is holder
            if (val instanceof ValueHolder) {
                ValueHolder cell = (ValueHolder) val;
                result[i] = cell.getValue();
            }

            // if object at i is holder array
            if (val instanceof ValueHolder[]) {
                ValueHolder[] cell = (ValueHolder[]) val;
                Object[] array = new Object[cell.length];
                for (int j = 0; j < cell.length; j++) {
                    array[j] = cell[j].getValue();
                }
                result[i] = array;
            }
        }

        return result;
    }

    public  DefaultMultiValue(Object[] values);
    public  DefaultMultiValue(Object[] values, Map<String, Integer> indexMap);
    public  DefaultMultiValue(ParameterEntryKey key, Object[] values, Map<String, Integer> indexMap);

}