private void moveToTop(List<String> keys, String propertyName) {

        if (keys.contains(propertyName)) {
            keys.remove(propertyName);
            keys.add(0, propertyName);
        }
    }
private void moveToTop ( List < String > keys , String propertyName ) { if ( keys . contains ( propertyName ) ) { keys . remove ( propertyName ) ; keys . add ( 0 , propertyName ) ; } }
Moves the given property name to the top of the keys if present.<p>

@param keys the list of keys
@param propertyName the property name to move