@Override
		public int compare(TreePath p1, TreePath p2) {
			if (p1.equals(p2)) {
				return 0;
			}

			ProgramNode node1 = (ProgramNode) p1.getLastPathComponent();
			ProgramNode node2 = (ProgramNode) p2.getLastPathComponent();
			int index1 = nodeList.indexOf(node1);
			int index2 = nodeList.indexOf(node2);
			if (index1 < index2) {
				return -1;
			}
			return 1;

		}
Return negative, 0, or positive number if p1 is less than
equal to, or greater than p2.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramDnDTree.java