public static Position beginOf(Node node){ return new Position(node.getBeginColumn(),node.getBeginColumn()); }
public boolean isPositionedAfter(int line, int column){ if (line==ABSOLUTE_BEGIN_LINE) return true; if (getBeginLine()>line){ return true; } else if (getBeginLine()==line){ return getBeginColumn()>column; } else { return false; } }
public static boolean areInOrder(Node a, Node b){ return (a.getBeginLine()<b.getBeginLine()) || (a.getBeginLine()==b.getBeginLine() && a.getBeginColumn()<b.getBeginColumn() ); } }
public boolean contains(Node other){ if (getBeginLine()>other.getBeginLine()) return false; if (getBeginLine()==other.getBeginLine() && getBeginColumn()>other.getBeginColumn()) return false; if (getEndLine()<other.getEndLine()) return false; if (getEndLine()==other.getEndLine() && getEndColumn()<other.getEndColumn()) return false; return true; }