@staticmethod
def as_sorted_list(options):
    """
        Returns all options in a list sorted according to their option numbers.

        :return: the sorted list
        """
    if len(options) > 0:
        options = sorted(options, key=lambda o: o.number)
    return options
