The analogy is a logical method. It is a form of indirect inference that starts from a particular or an individual and concludes on a special or singular similarity. It is also described as a comparison between two things. In word analogy, there are many examples in literary devices such as metaphor, simile, allegory, parable, and exemplification.
In this example, the hair of a girl is compared to the sunshine. The hair and the sunshine are both blithely.