def elements_of_list_same(iterator):
    """Check is all elements of an iterator are equal.

    :param iterator: a iterator
    :type iterator: ``list``
    :rtype: ``bool``

    Usage::

      >>> from haproxyadmin import utils
      >>> iterator = ['OK', 'ok']
      >>> utils.elements_of_list_same(iterator)
      False
      >>> iterator = ['OK', 'OK']
      >>> utils.elements_of_list_same(iterator)
      True
      >>> iterator = [22, 22, 22]
      >>> utils.elements_of_list_same(iterator)
      True
      >>> iterator = [22, 22, 222]
      >>> utils.elements_of_list_same(iterator)
      False
    """
    return len(set(iterator)) == 1