@Override
		public int compare(Scalar o1, Scalar o2) {

			// @formatter:off
			if (o1 == o2)   { return 0;}
			if (o1 == null) { return 1; }
			if (o2 == null) { return -1; }
			// @formatter:on

			// sort unsigned before signed
			if (o1.isSigned() != o2.isSigned()) {
				return (o1.isSigned() ? 1 : -1);
			}

			return o1.isSigned() ? Long.compare(o1.getSignedValue(), o2.getSignedValue())
					: Long.compareUnsigned(o1.getUnsignedValue(), o2.getUnsignedValue());
		}
Model that backs the table associated with the {@link ScalarSearchProvider}
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/scalartable/ScalarSearchModel.java