code: private static boolean relate(Point point_a, Point point_b,
  			SpatialReference sr, int relation, ProgressTracker progress_tracker) {
  		if (point_a.isEmpty() || point_b.isEmpty()) {
  			if (relation == Relation.disjoint)
  				return true; // Always true
  
  			return false; // Always false
  		}
  
  		Point2D pt_a = point_a.getXY();
  		Point2D pt_b = point_b.getXY();
  		Envelope2D env_merged = new Envelope2D();
  		env_merged.setCoords(pt_a);
  		env_merged.merge(pt_b);
  
  		double tolerance = InternalUtils.calculateToleranceFromGeometry(sr,
  				env_merged, false);
  
  		switch (relation) {
  		case Relation.disjoint:
  			return pointDisjointPoint_(pt_a, pt_b, tolerance, progress_tracker);
  
  		case Relation.within:
  			return pointContainsPoint_(pt_b, pt_a, tolerance, progress_tracker);
  
  		case Relation.contains:
  			return pointContainsPoint_(pt_a, pt_b, tolerance, progress_tracker);
  
  		case Relation.equals:
  			return pointEqualsPoint_(pt_a, pt_b, tolerance, progress_tracker);
  
  		default:
  			break; // warning fix
  		}
  
  		return false;
  	}
docs: interior, and exterior of point_a vs point_b for the given relation.