Means for adjusting the length of, or for locking, the spring or damper