protected void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context) {
    super.doGetRestorableState(rs, context);

    Iterable<? extends LatLon> iterable = this.getLocations();
    if (iterable != null) rs.addStateValueAsLatLonList(context, "locationList", iterable);

    rs.addStateValueAsBoolean(context, "closed", this.isClosed());
  }
  protected void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context) {
    super.doGetRestorableState(rs, context);

    if (this.boundaries.getContourCount() > 0) {
      RestorableSupport.StateObject so = rs.addStateObject(context, "boundaries");
      for (int i = 0; i < this.boundaries.getContourCount(); i++) {
        rs.addStateValueAsLatLonList(so, "boundary", this.boundaries.getContour(i));
      }
    }
  }