The maybe best way might be (as @Erica already suggested) to take the distance as the sum of the distances of the closest points, but beware, this is NOT SYMMETRIC, hence not a real distance in the mathematician way. To gain symmetric you might add it with the same sum of the other object, this will yield a mathematician distance method.
Another way would be to index the points and take the distance of the same points (when you know, there are always the same amount of points). This has the drawback, that the same points with different index is another object (you might indicate it with the distance to root and anti-clockwise for same distance to negate that effect). This also yields a mathematician distance method.
Code example for first one (one side):
double distance = 0;
for(Point x : A.getPoints()){
double distOfX = 0;
for(Point y : B.getPoints()){
double tempDist = Math.pow(x.getX()-y.getX(),2)+Math.pow(x.getY()-y.getY(),2);
distOfX = tempDist>distOfX?tempDist:distOfX;
}
distance += Math.sqrt(distOfX);
}
And for the second case (after indicating):
double distance = 0;
if(A.getPoints().length != B.getPoints().length)
distance = -1;
else{
for(int i=0; i<A.getPoints().length; i++){
distance += Math.sqrt( Math.pow(A.getPoints()[i].getX()-B.getPoints()[i].getX(),2)+Math.pow(A.getPoints()[i].getY()-B.getPoints()[i].getY(),2));
}
}