示例#1
0
文件: Wish.java 项目: vardars/FreeCol
  /** {@inheritDoc} */
  @Override
  protected void readAttributes(FreeColXMLReader xr) throws XMLStreamException {
    super.readAttributes(xr);

    final AIMain aiMain = getAIMain();

    destination = xr.getLocationAttribute(aiMain.getGame(), DESTINATION_TAG, false);

    // Delegate transportable one level down
  }
示例#2
0
文件: Wish.java 项目: vardars/FreeCol
  /** {@inheritDoc} */
  @Override
  protected void writeAttributes(FreeColXMLWriter xw) throws XMLStreamException {
    super.writeAttributes(xw);

    // Write identifier, Location will match Object
    if (destination != null) {
      xw.writeAttribute(DESTINATION_TAG, destination.getId());

      if (transportable != null) {
        xw.writeAttribute(TRANSPORTABLE_TAG, transportable.getId());
      }
    }
  }
示例#3
0
文件: Wish.java 项目: vardars/FreeCol
 /** Disposes of this <code>AIObject</code> by removing any references to this object. */
 @Override
 public void dispose() {
   this.destination = null;
   this.transportable = null;
   super.dispose();
 }