boon/src/main/java/org/boon/collections/IntList.java
public static IntList toIntList(Collection<?> inputList, String propertyPath) {
        if (inputList.size() == 0) {
            return new IntList(0);
        }

        IntList outputList = new IntList(inputList.size());

        if (propertyPath.contains(".") || propertyPath.contains("[")) {

            String[] properties = StringScanner.splitByDelimiters(propertyPath, ".[]");

            for (Object o : inputList) {
                outputList.add(BeanUtils.getPropertyInt(o, properties));
            }

        } else {

            Map<String, FieldAccess> fields = BeanUtils.getFieldsFromObject(inputList.iterator().next());
            FieldAccess fieldAccess = fields.get(propertyPath);
            for (Object o : inputList) {
                outputList.add(fieldAccess.getInt(o));
            }
        }

        return outputList;
    }
public static IntList toIntList(Collection<?> inputList, String propertyPath) {
        if (inputList.size() == 0) {
            return new IntList(0);
        }

        IntList outputList = new IntList(inputList.size());

        if (propertyPath.contains(".") || propertyPath.contains("[")) {

            String[] properties = StringScanner.splitByDelimiters(propertyPath, ".[]");

            for (Object o : inputList) {
                outputList.add(BeanUtils.getPropertyInt(o, properties));
            }

        } else {

            Map<String, FieldAccess> fields = BeanUtils.getFieldsFromObject(inputList.iterator().next());
            FieldAccess fieldAccess = fields.get(propertyPath);
            for (Object o : inputList) {
                outputList.add(fieldAccess.getInt(o));
            }
        }

        return outputList;
    }
Creates a primitive list based on an input list and a property path

@param inputList    input list
@param propertyPath property path
@return primitive list