private static int gap(ConstraintWidget widget1,Direction direction1,ConstraintWidget widget2,Direction direction2){
switch (direction1) {
case NORTH:
case WEST:
    return getPos(widget1,direction1) - getPos(widget2,direction2);
case SOUTH:
case EAST:
  return getPos(widget2,direction2) - getPos(widget1,direction1);
}
return 0;
}

private static int gap ( ConstraintWidget widget1 , Direction direction1 , ConstraintWidget widget2 , Direction direction2 ) { switch ( direction1 ) { case NORTH : case WEST : return getPos ( widget1 , direction1 ) - getPos ( widget2 , direction2 ) ; case SOUTH : case EAST : return getPos ( widget2 , direction2 ) - getPos ( widget1 , direction1 ) ; } return 0 ; }
get the gap between two specific edges of widgets
