net.sf.freecol.server.ai
Class ValuedAIObject

java.lang.Object
  extended by net.sf.freecol.common.model.FreeColObject
      extended by net.sf.freecol.server.ai.AIObject
          extended by net.sf.freecol.server.ai.ValuedAIObject
All Implemented Interfaces:
java.lang.Comparable<ValuedAIObject>
Direct Known Subclasses:
TileImprovementPlan, Wish, WorkLocationPlan

public class ValuedAIObject
extends AIObject
implements java.lang.Comparable<ValuedAIObject>


Field Summary
private  int value
          Describe value here.
 
Fields inherited from class net.sf.freecol.server.ai.AIObject
uninitialized
 
Fields inherited from class net.sf.freecol.common.model.FreeColObject
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, PARTIAL_ATTRIBUTE
 
Constructor Summary
ValuedAIObject(AIMain aiMain)
           
ValuedAIObject(AIMain aiMain, java.lang.String id)
           
 
Method Summary
 int compareTo(ValuedAIObject other)
           
 int getValue()
          Get the Value value.
 void setValue(int newValue)
          Set the Value value.
protected  void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
          This method writes an XML-representation of this object to the given stream.
 
Methods inherited from class net.sf.freecol.server.ai.AIObject
dispose, getAIMain, getAIRandom, getGame, getXMLElementTagName, isUninitialized, readFromXML
 
Methods inherited from class net.sf.freecol.common.model.FreeColObject
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAttribute, getAttribute, getAttribute, getAttribute, getId, getPropertyChangeListeners, getPropertyChangeListeners, hasAbility, hasAttribute, hasListeners, readAttributes, readChildren, readFromArrayElement, readFromArrayElement, readFromArrayElement, readFromListElement, readFromXMLElement, readFromXMLImpl, readFromXMLPartialImpl, removePropertyChangeListener, removePropertyChangeListener, setId, toArrayElement, toArrayElement, toListElement, toXML, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, toXMLPartialImpl, writeAttribute, writeAttributes, writeChildren, writeFreeColGameObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

private int value
Describe value here.

Constructor Detail

ValuedAIObject

public ValuedAIObject(AIMain aiMain)

ValuedAIObject

public ValuedAIObject(AIMain aiMain,
                      java.lang.String id)
Method Detail

getValue

public final int getValue()
Get the Value value.

Returns:
an int value

setValue

public final void setValue(int newValue)
Set the Value value.

Parameters:
newValue - The new Value value.

compareTo

public final int compareTo(ValuedAIObject other)
Specified by:
compareTo in interface java.lang.Comparable<ValuedAIObject>

toXMLImpl

protected void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
                  throws javax.xml.stream.XMLStreamException
Description copied from class: FreeColObject
This method writes an XML-representation of this object to the given stream.

Specified by:
toXMLImpl in class FreeColObject
Parameters:
out - The target stream.
Throws:
javax.xml.stream.XMLStreamException - if there are any problems writing to the stream.