public static Object convertIntoObjectValueType(FacesContext context, DataTable table, List<?> value) {
        Class<?> expectedType = ELUtils.getType(context, table.getValueExpression("value"));
        if (expectedType != null && DataModel.class.isAssignableFrom(expectedType)) {
            try {
                if (ListDataModel.class.isAssignableFrom(expectedType)) {
                    return expectedType.getConstructor(List.class).newInstance(value);
                }
                else if (CollectionDataModel.class.isAssignableFrom(expectedType)) {
                    return expectedType.getConstructor(Collection.class).newInstance(value);
                }
                else if (IterableDataModel.class.isAssignableFrom(expectedType)) {
                    return expectedType.getConstructor(Iterable.class).newInstance(value);
                }
                else if (ArrayDataModel.class.isAssignableFrom(expectedType)) {
                    return expectedType.getConstructor(Object[].class).newInstance(value.toArray());
                }
            }
            catch (ReflectiveOperationException e) {
                LOGGER.log(Level.SEVERE, e.getMessage());
            }
        }

        return value;
    }
Recalculates filteredValue after adding, updating or removing rows to/from a filtered DataTable.
NOTE: this is only supported for non-lazy DataTables, eg bound to a java.util.List.
primefaces/src/main/java/org/primefaces/component/datatable/DataTable.java