@Test(expectedExceptions = IllegalArgumentException.class) public final void testFindElementInQueueException01() { PathUtils.findElementInQueue(pq, null); }
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; }
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; } }
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(); }
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(); static int getLength(final List<Line> path, final Line start,
                                final Line end); static int getLength(final List<Line> path); static boolean checkPathConnection(final List<Line> path); static List<Line> constructPath(final LineLinkedListElement dest); static LineLinkedListElement findElementInQueue(
            final Queue<? extends LineLinkedListElement> pq, final Line line); static Line findCommonLineInPaths(final List<? extends Line> location,
                                             final LineLinkedListElement el); }
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(); static int getLength(final List<Line> path, final Line start,
                                final Line end); static int getLength(final List<Line> path); static boolean checkPathConnection(final List<Line> path); static List<Line> constructPath(final LineLinkedListElement dest); static LineLinkedListElement findElementInQueue(
            final Queue<? extends LineLinkedListElement> pq, final Line line); static Line findCommonLineInPaths(final List<? extends Line> location,
                                             final LineLinkedListElement el);  }