There are two instances of violence here: premeditated murder of the Egyptian supervisor, fuelled by resentment and anger. That is always wrong. There is also the implied threat of violence when he saw off the shepherds to allow the young women he had met to take water form the well first – perhaps justified it it is defending a weaker party.