GenericPath: reorganize a little
GenericPath: use Objects.hash()