code: public static Geometry snap(Geometry geometryA, Geometry geometryB, double distance) {
          if(geometryA == null||geometryB == null){
              return null;
          }
          Geometry[] snapped = GeometrySnapper.snap(geometryA, geometryB, distance);
          return snapped[0];
      }
docs: Snaps two geometries together with a given tolerance
  
  @param geometryA a geometry to snap
  @param geometryB a geometry to snap
  @param distance the tolerance to use
  @return the snapped geometries