class FieldConstraintArrayUtil {

    public static void moveUp(int index, FieldConstraint[] fieldConstraints) {

        if (index > 0) {

            final FieldConstraint first = fieldConstraints[index - 1];
            final FieldConstraint second = fieldConstraints[index];

            if (blockSwap(first, second)) {
                return;
            }

            fieldConstraints[index - 1] = second;
            fieldConstraints[index] = first;
        }
    }

    private  FieldConstraintArrayUtil();

}