Metaphoris a common poetic device where an object in, or the subject of, a poem is described as being the same as another otherwise unrelated object.
A beautiful example can be seen in the first stanza ofThe Highwayman by Alfred Noyes, in the line:
The moon was a ghostly galleon tossed upon cloudy seas…