Hooke’s spring law applies to any elastic object of arbitrary complexity, as long as a single number can express the deformation and the stress.