def METHOD_NAME(self, other):
    """
    The equals method.
    :param other: a different object.
    :type other: object
    :return: True if equals, otherwise False.
    :rtype: bool
    """
    if not isinstance(other, ASTWhileStmt):
        return False
    return self.get_condition().METHOD_NAME(other.get_condition()) and self.get_block().METHOD_NAME(other.get_block())