In As You Like It, these four men are two pairs of brothers. Their relationships are rather similar in that in each pair, one brother is badly mistreating the other. Orlando and Duke Senior, both on the receiving end of the abuse, are also similar in being homeless and hanging out in the Forest of Arden.
Following the death of Orlando's and Oliver's father, Oliver first neglects Orlando's upbringing then drives him away from court. Orlando says his brother treats the pigs better than him. After leaving home, Orlando ends up in the forest.
Duke Frederick and Duke Senior have a power struggle. Duke Senior rules their dukedom, then Frederick successfully—but not honorably—challenges him. The usurper banishes his brother and the nobles who remain loyal to him to the Forest of Arden. Senior makes the best of their rural idyll, praising the simple life.
By the end, however, Oliver has recanted and become a changed man. Celia's love is a good influence, and she pairs up with him as her cousin Rosalind is matched to Orlando.