code: protected static boolean elementsEquals(Object e1, Object e2) {
  		return (e1 == null && e2 == null) || e1.equals(e2);
  	}
docs: Helper-method to check if two elements are equal.
  
  @param e1
  @param e2
  @return true if both e1 and e2 are null or if e1.equals(e2).