public static DoubleList toDoubleList(Collection<?> inputList, String propertyPath) {
    """
	Creates a primitive list based on an input list and a property path
	
	@param inputList    input list
	@param propertyPath property path
	@return primitive list
    """
        if (inputList.size() == 0) {
            return new DoubleList(0);
        }

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

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

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

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

        } else {

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

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

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

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

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

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

        } else {

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

        return outputList;
    }
public static DoubleList toDoubleList ( Collection < ? > inputList , String propertyPath ) { if ( inputList . size ( ) == 0 ) { return new DoubleList ( 0 ) ; } DoubleList outputList = new DoubleList ( inputList . size ( ) ) ; if ( propertyPath . contains ( "." ) || propertyPath . contains ( "[" ) ) { String [ ] properties = StringScanner . splitByDelimiters ( propertyPath , ".[]" ) ; for ( Object o : inputList ) { outputList . add ( BeanUtils . getPropertyDouble ( o , properties ) ) ; } } else { Map < String , FieldAccess > fields = BeanUtils . getFieldsFromObject ( inputList . iterator ( ) . next ( ) ) ; FieldAccess fieldAccess = fields . get ( propertyPath ) ; for ( Object o : inputList ) { outputList . add ( fieldAccess . getDouble ( 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
Creates a primitive list based on an input list and a property path