Checks if the supplied node is adjacent to the current and has the same value.

@return the {@link Direction} if the two cells touch and have the same value, else <code>null</code>.
977282
public Direction isSameValueNeighborOf( GridNode otherNode ) {
        Direction direction = isNeighborOf(otherNode);
        if (direction != null && NumericsUtilities.dEq(elevation, otherNode.elevation)) {
            return direction;
        }
        return null;
    }
903689
public Node nextSibling() {

		if (currentNode == null)
			return null;

		Node node = getNextSibling(currentNode);
		if (node != null)
			currentNode = node;

		return node;
	}
860430
public Node nextSibling() {
        if (parentNode == null)
            return null; // root

        final List<Node> siblings = parentNode.ensureChildNodes();
        final int index = siblingIndex+1;
        if (siblings.size() > index)
            return siblings.get(index);
        else
            return null;
    }
929587
public boolean nextInOrder() {
        if (mNode == null) {
            return false;
        }
        if (firstChild()) {
            return true;
        }
        if (nextSibling()) {
            return true;
        }
        AccessibilityNodeInfoRef tmp = unOwned(mNode);
        while (tmp.parent()) {
            if (tmp.nextSibling()) {
                reset(tmp);
                return true;
            }
        }
        tmp.clear();
        return false;
    }
335103
public Node nextAvailableNode() {
        if (!isInit) {
            init();
        }
        currentNodeIndex++;
        if (currentNodeIndex >= allNodes.length) {
            currentNodeIndex = 0;
        }
        return currentNode();
    }
1287758
public Node nextNode() {

		if (currentNode == null)
			return null;

		Node result = getFirstChild(currentNode);

		if (result != null) {
			currentNode = result;
			return result;
		}

		result = getNextSibling(currentNode);

		if (result != null) {
			currentNode = result;
			return result;
		}

		// return parent's 1st sibling.
		Node parent = getParentNode(currentNode);
		while (parent != null) {
			result = getNextSibling(parent);
			if (result != null) {
				currentNode = result;
				return result;
			} else {
				parent = getParentNode(parent);
			}
		}

		// end , return null
		return null;
	}
498924
@NonNull static <E> Node<E> findLast(@NonNull Node<E> node) {
    Node<E> next;
    while ((next = node.getNextRelaxed()) != null) {
      node = next;
    }
    return node;
  }
801182
@Override
    public boolean isLocalNode(INodeDesc node) {
        final String fwkNodeName = getFrameworkNodeName();
        return fwkNodeName.equals(node.getNodename());
    }
234436
public boolean nextSibling() {
        if (mNode == null) {
            return false;
        }
        AccessibilityNodeInfoCompat parent = mNode.getParent();
        if (parent == null) {
            return false;
        }
        try {
            int childCount = parent.getChildCount();
            int childNumber = getChildNumber(parent);
            if (childNumber < 0) {
                return false;
            }
            for (int i = childNumber + 1; i < childCount; ++i) {
                AccessibilityNodeInfoCompat newNode =
                        parent.getChild(i);
                if (newNode == null) {
                    return false;
                }
                if (AccessibilityNodeInfoUtils.isVisibleOrLegacy(newNode)) {
                    reset(newNode);
                    return true;
                }
                newNode.recycle();
            }
        } finally {
            parent.recycle();
        }
        return false;
    }
727191
public boolean next()
    {
        if (this.iter == null) {
            this.iter = new ArrayList<>(this.values).iterator();
        }
        final boolean ret = this.iter.hasNext();
        if (ret) {
            this.current = this.iter.next();
        }
        return ret;
    }
1075710
public boolean arrowScroll(int direction) {

		View currentFocused = findFocus();
		if (currentFocused == this) currentFocused = null;

		View nextFocused = FocusFinder.getInstance().findNextFocus(this, currentFocused, direction);

		final int maxJump = getMaxScrollAmount();

		if (nextFocused != null && isWithinDeltaOfScreen(nextFocused, maxJump, getHeight())) {
			nextFocused.getDrawingRect(mTempRect);
			offsetDescendantRectToMyCoords(nextFocused, mTempRect);
			int scrollDelta = computeScrollDeltaToGetChildRectOnScreen(mTempRect);
			doScrollY(scrollDelta);
			nextFocused.requestFocus(direction);
		} else {
			// no new focus
			int scrollDelta = maxJump;

			if (direction == View.FOCUS_UP && getScrollY() < scrollDelta) {
				scrollDelta = getScrollY();
			} else if (direction == View.FOCUS_DOWN) {
				if (getChildCount() > 0) {
					int daBottom = getChildAt(0).getBottom();
					int screenBottom = getScrollY() + getHeight() - getPaddingBottom();
					if (daBottom - screenBottom < maxJump) {
						scrollDelta = daBottom - screenBottom;
					}
				}
			}
			if (scrollDelta == 0) {
				return false;
			}
			doScrollY(direction == View.FOCUS_DOWN ? scrollDelta : -scrollDelta);
		}

		if (currentFocused != null && currentFocused.isFocused()
				&& isOffScreen(currentFocused)) {
			// previously focused item still has focus and is off screen, give
			// it up (take it back to ourselves)
			// (also, need to temporarily force FOCUS_BEFORE_DESCENDANTS so we are
			// sure to
			// get it)
			final int descendantFocusability = getDescendantFocusability();  // save
			setDescendantFocusability(ViewGroup.FOCUS_BEFORE_DESCENDANTS);
			requestFocus();
			setDescendantFocusability(descendantFocusability);  // restore
		}
		return true;
	}
131337
public Optional<Integer> getCurrentLine() {
    if (currentSegment == null) {
      return Optional.empty();
    }

    return Optional.of(currentSegment.getSource().getRow(currentSegment.getBegin()));
  }
341348
public GridNode getNodeAt( Direction direction ) {
        int newCol = col + direction.col;
        int newRow = row + direction.row;
        GridNode node = new GridNode(gridIter, cols, rows, xRes, yRes, newCol, newRow);
        return node;
    }
246599
public boolean isPreviousThan(Node node) {
        if (getEndLine() < node.getBeginLine()) {
            return true;
        } else if ((getEndLine() == node.getBeginLine()) && (getEndColumn() <= node.getBeginColumn())) {
            return true;
        }
        return false;
    }
1345895
public boolean nextIsNull(long currentRow) throws IOException {
    if (present != null) {
      seekToPresentRow(currentRow);
      valuePresent = present.next() == 1;
      if (valuePresent) {
        // Adjust numNonNulls so we know how many non-null values we'll need to skip if skip is
        // called
        numNonNulls++;
      } else {
        if (currentRow == previousRow + 1) {
          // if currentRow = previousRow + 1, and the value is null this is equivalent to going to the
          // next row.  if there's a series of nulls this prevents us from calling skipRows when
          // the next non-null value is fetched
          previousRow++;
        }
      }
    }

    return !valuePresent;
  }
790016
public Node previousSibling() {

		if (currentNode == null)
			return null;

		Node node = getPreviousSibling(currentNode);
		if (node != null)
			currentNode = node;

		return node;
	}
1355605
protected boolean isEquivalentInTheSet(Node node, boolean direction, Set<Node> set)
	{
		for (Node eq : direction == UPWARD ? node.getUpperEquivalent() : node.getLowerEquivalent())
		{
			if (set.contains(eq)) return true;
			boolean isIn = isEquivalentInTheSet(eq, direction, set);
			if (isIn) return true;
		}
		return false;
	}