class PathUtils {

    public static LineLinkedListElement findElementInQueue(
            final Queue<? extends LineLinkedListElement> pq, final Line line) {
        if (pq == null || line == null) {
            throw new IllegalArgumentException();
        }
        Iterator<? extends LineLinkedListElement> iter = pq.iterator();
        long id = line.getID();
        while (iter.hasNext()) {
            LineLinkedListElement next = iter.next();
            if (next.getLine().getID() == id) {
                return next;
            }
        }
        return null;
    }

    private  PathUtils();

}