@staticmethod
def findEntryBeforeOrAt(entries, component):
    """
        Get the latest entry in the array whose component is less than or equal
        to component.

        :param Array<ExcludeEntry> entries: The array of ExcludeEntry.
        :param Name.Component component: The component to compare.
        :return: The index of the found entry, or -1 if not found.
        :rtype: int
        """
    i = len(entries) - 1
    while i >= 0:
        if entries[i]._component.compare(component) <= 0:
            break
        i -= 1
    return i
