public static List<StructField<?>> sortFields(List<StructField<?>> fields) {
        fields.sort(fieldComparator);
        return fields;
    }
In-place sort a List of StructFields accordingly to their position

@param fields
           list to sort
@return the passed list
jme3-core/src/main/java/com/jme3/util/struct/StructUtils.java