/** * Return the node for the specified join and index. */ private Node getNode(Join join, int idx) { if (_graph.size() <= idx) return null; Node node = (Node) _graph.get(idx); for (; node != null; node = node.next) if (node.join.equals(join)) return node; return null; }
/** * Return the node for the specified join and index. */ private Node getNode(Join join, int idx) { if (_graph.size() <= idx) return null; Node node = (Node) _graph.get(idx); for (; node != null; node = node.next) if (node.join.equals(join)) return node; return null; }
/** * Return the node for the specified join and index. */ private Node getNode(Join join, int idx) { if (_graph.size() <= idx) return null; Node node = (Node) _graph.get(idx); for (; node != null; node = node.next) if (node.join.equals(join)) return node; return null; }
/** * Return the node for the specified join and index. */ private Node getNode(Join join, int idx) { if (_graph.size() <= idx) return null; Node node = (Node) _graph.get(idx); for (; node != null; node = node.next) if (node.join.equals(join)) return node; return null; }
/** * Return the node for the specified join and index. */ private Node getNode(Join join, int idx) { if (_graph.size() <= idx) return null; Node node = (Node) _graph.get(idx); for (; node != null; node = node.next) if (node.join.equals(join)) return node; return null; }
/** * Each join is recorded one at its first index and once at its second; * remove the join at one of its indexes. */ private boolean remove(Join join, int idx) { Node node = (Node) _graph.get(idx); for (Node prev = null; node != null; prev = node, node = node.next) { if (!node.join.equals(join)) continue; if (prev != null) prev.next = node.next; else { _graph.set(idx, node.next); // trim to size while (!_graph.isEmpty() && _graph.get(idx) == null && idx == _graph.size() - 1) _graph.remove(idx--); } return true; } return false; }
/** * Each join is recorded one at its first index and once at its second; * remove the join at one of its indexes. */ private boolean remove(Join join, int idx) { Node node = (Node) _graph.get(idx); for (Node prev = null; node != null; prev = node, node = node.next) { if (!node.join.equals(join)) continue; if (prev != null) prev.next = node.next; else { _graph.set(idx, node.next); // trim to size while (!_graph.isEmpty() && _graph.get(idx) == null && idx == _graph.size() - 1) _graph.remove(idx--); } return true; } return false; }
/** * Each join is recorded one at its first index and once at its second; * remove the join at one of its indexes. */ private boolean remove(Join join, int idx) { Node node = (Node) _graph.get(idx); for (Node prev = null; node != null; prev = node, node = node.next) { if (!node.join.equals(join)) continue; if (prev != null) prev.next = node.next; else { _graph.set(idx, node.next); // trim to size while (!_graph.isEmpty() && _graph.get(idx) == null && idx == _graph.size() - 1) _graph.remove(idx--); } return true; } return false; }
/** * Each join is recorded one at its first index and once at its second; * remove the join at one of its indexes. */ private boolean remove(Join join, int idx) { Node node = (Node) _graph.get(idx); for (Node prev = null; node != null; prev = node, node = node.next) { if (!node.join.equals(join)) continue; if (prev != null) prev.next = node.next; else { _graph.set(idx, node.next); // trim to size while (!_graph.isEmpty() && _graph.get(idx) == null && idx == _graph.size() - 1) _graph.remove(idx--); } return true; } return false; }
/** * Each join is recorded one at its first index and once at its second; * remove the join at one of its indexes. */ private boolean remove(Join join, int idx) { Node node = (Node) _graph.get(idx); for (Node prev = null; node != null; prev = node, node = node.next) { if (!node.join.equals(join)) continue; if (prev != null) prev.next = node.next; else { _graph.set(idx, node.next); // trim to size while (!_graph.isEmpty() && _graph.get(idx) == null && idx == _graph.size() - 1) _graph.remove(idx--); } return true; } return false; }