public interface NodeWithRange<N>
| Modifier and Type | Method and Description |
|---|---|
default boolean |
containsWithin(Node other)
Deprecated.
use
containsWithinRange(Node) instead. |
default boolean |
containsWithinRange(Node other)
Checks whether the range of the given
Node is contained within the range of this NodeWithRange. |
default Optional<Position> |
getBegin()
The begin position of this node in the source file.
|
default Optional<Position> |
getEnd()
The end position of this node in the source file.
|
Optional<Range> |
getRange() |
N |
setRange(Range range) |
@Deprecated default boolean containsWithin(Node other)
containsWithinRange(Node) instead.default boolean containsWithinRange(Node other)
Node is contained within the range of this NodeWithRange.
Note that any range contains itself, i.e., for any node n, we have that
n.containsWithinRange(n) == true.
Notice: This method compares two nodes based on their ranges only, but not based on the
storage unit of the two nodes. Therefore, this method may return true for a node that is contained in a
different file than this NodeWithRange. You may wish to use Node.isAncestorOf(Node) instead.other - the node whose range should be compared with this node's range.true if the given node's range is contained within this node's range, and false
otherwise.Copyright © 2007–2019. All rights reserved.