docs: public static BezierCurve getInstance(int degree)
      {
          if (degree < 1)
          {
              throw new IllegalArgumentException("illegal degree");
          }
          switch (degree)
          {
              case 1:
                  return LINE;
              case 2:
                  return QUAD;
              case 3:
                  return CUBIC;
              default:
                  return new BezierCurve(degree);
          }
      }