overrides hashCode() function of my Power obj, because HashSet does not call equals rather hashCode()