I am going to assume that you are asking about what literary and rhetorical devices are present in Hamlet's famous "To be or not to be" soliloquy. As you noted, the speech begins to the antithetical statement "to be or not to be." This statement opens the argument that Hamlet is then going to go on to elaborate in more detail. In the next lines he asks the further rhetorical question "whether it is nobler in the mind to suffer the slings and arrows of outrageous fortune, or to take arms against a sea of troubles and by opposing end them." In this quote, Shakespeare uses war and weapon imagery to convey the conflict of whether to be -- meaning to act, or not to be -- meaning to not act. From there, Shakespeare uses the extended stock metaphor of death as sleep. First he says that "by a sleep" (death is a type of sleep) "we end the heartache" of life and this is something to be wished for. Then he turns it around and says "to die -- to sleep. To sleep perchance to dream: ay, there's the rub." Here is talking about literal sleep and literal dreams, but by his diction with the word "rub" he is suggesting that dreams are not always a good thing -- they could be nightmares, or at the very least dreams are not reality. He then uses a cataloging list to delineate the long list of woes that people must endure in their lives. Within that list he again uses interesting description and diction. In his conclusion he uses the metaphor of "undiscovered country" to mean death and afterlife; he compares the dead to "travellers" who don't return from the afterlife; he compares action to being on a "current" and inaction to being "turned awry."