List<Object> (List<?> content) { if (content == null || content.isEmpty()) { return Collections.emptyList(); } if (content instanceof RandomAccess) { return Collections.unmodifiableList(content); } return new ArrayList<>(content); }