@SuppressWarnings("unused") private boolean checkSetShape(Shape oldShape,Shape newShape){
  Shape currentShape=getShape();
  assert oldShape != newShape : "Wrong old shape assumption?";
  assert newShape != currentShape : "Redundant shape change? shape=" + currentShape;
  assert oldShape == currentShape || oldShape.getParent() == currentShape : "Out-of-order shape change?" + "\nparentShape=" + currentShape + "\noldShape="+ oldShape+ "\nnewShape="+ newShape;
  return true;
}

@ SuppressWarnings ( "unused" ) private boolean checkSetShape ( Shape oldShape , Shape newShape ) { Shape currentShape = getShape ( ) ; assert oldShape != newShape : "Wrong old shape assumption?" ; assert newShape != currentShape : "Redundant shape change? shape=" + currentShape ; assert oldShape == currentShape || oldShape . getParent ( ) == currentShape : "Out-of-order shape change?" + "\nparentShape=" + currentShape + "\noldShape=" + oldShape + "\nnewShape=" + newShape ; return true ; }
check whether fast transition is valid .
