def getIndexByID(lines, id):
    """
    Since I do not have the object "lines" but a list of object Line, this function is faking the 'getIndexByID' function of the Liens obj in lines.java
    :param lines: list of Line obj
    :param id: id of the object Line to search
    :return: the index in the list 'lines' of the searched obj
    """
    for i in range(len(lines)):
        if lines[i].getID() == id:
            return i
    return -1
