@staticmethod
def _compare_bool(b1: bool, b2: bool):
    """
        Compares two booleans in the same way as Java's Boolean.compare method.

        :param b1:  The first bool.
        :param b2:  The second bool.
        :return:    -1, 0, +1 if b1 is smaller than, equal to, or larger than b2.
        """
    return 0 if b1 == b2 else 1 if b1 else -1
