Exemple #1
0
  /** {@inheritDoc} */
  @Override
  protected void writeAttributes(FreeColXMLWriter xw) throws XMLStreamException {
    super.writeAttributes(xw);

    if (value != null) {
      xw.writeAttribute(VALUE_TAG, value.getId());
    }
  }
Exemple #2
0
 /**
  * Sets the current value of this option.
  *
  * @param value The new value.
  */
 public void setValue(FreeColModFile value) {
   final FreeColModFile oldValue = this.value;
   this.value = value;
   setId(value.getId());
   if (isDefined && value != oldValue) {
     firePropertyChange(VALUE_TAG, oldValue, value);
   }
   isDefined = true;
 }
Exemple #3
0
 /** {@inheritDoc} */
 @Override
 public boolean equals(Object other) {
   if (other instanceof ModOption) {
     ModOption mod = (ModOption) other;
     return (value == null)
         ? mod.getValue() == null
         : (mod.getValue() == null) ? false : value.getId().equals(mod.getValue().getId());
   }
   return false;
 }