A friend tells you that you have “the strength of Hercules,” connecting you to the mythological figure known for his strength. What is this an example of?

This is an example of a metaphor. The friend is comparing the person's strength to that of Hercules in order to emphasize how strong they are.