code: public static void toKMLPolygon(Polygon polygon, ExtrudeMode extrude, int altitudeModeEnum, StringBuilder sb) {
          sb.append("<Polygon>");
          appendExtrude(extrude, sb);
          appendAltitudeMode(altitudeModeEnum, sb);
          sb.append("<outerBoundaryIs>");
          toKMLLinearRing(polygon.getExteriorRing(), extrude, altitudeModeEnum, sb);
          sb.append("</outerBoundaryIs>");
          for (int i = 0; i < polygon.getNumInteriorRing(); i++) {
              sb.append("<innerBoundaryIs>");
              toKMLLinearRing(polygon.getInteriorRingN(i), extrude, altitudeModeEnum, sb);
              sb.append("</innerBoundaryIs>");
          }
          sb.append("</Polygon>");
      }
docs: A Polygon is defined by an outer boundary and 0 or more inner boundaries.
  The boundaries, in turn, are defined by LinearRings.
  
  Syntax :
  
  <Polygon id="ID">
  <!-- specific to Polygon -->
  <extrude>0</extrude> <!-- boolean -->
  <tessellate>0</tessellate> <!-- boolean -->
  <altitudeMode>clampToGround</altitudeMode>
  <!-- kml:altitudeModeEnum: clampToGround, relativeToGround, or absolute
  -->
  <!-- or, substitute gx:altitudeMode: clampToSeaFloor, relativeToSeaFloor
  -->
  <outerBoundaryIs>
  <LinearRing>
  <coordinates>...</coordinates> <!-- lon,lat[,alt] -->
  </LinearRing>
  </outerBoundaryIs>
  <innerBoundaryIs>
  <LinearRing>
  <coordinates>...</coordinates> <!-- lon,lat[,alt] -->
  </LinearRing>
  </innerBoundaryIs>
  </Polygon>
  
  Supported syntax :
  
  <Polygon>
  <extrude>0</extrude>
  <altitudeMode>clampToGround</altitudeMode>
  <outerBoundaryIs>
  <LinearRing>
  <coordinates>...</coordinates> <!-- lon,lat[,alt] -->
  </LinearRing>
  </outerBoundaryIs>
  <innerBoundaryIs>
  <LinearRing>
  <coordinates>...</coordinates> <!-- lon,lat[,alt] -->
  </LinearRing>
  </innerBoundaryIs>
  </Polygon>
  
  @param polygon