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 abstract class ValuedAIObject
extends AIObject
implements java.lang.Comparable<ValuedAIObject>


Field Summary
private  int value
          The value of this AIObject.
 
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, INFINITY, NO_ID, PARTIAL_ATTRIBUTE, UNDEFINED, VALUE_TAG
 
Constructor Summary
ValuedAIObject(AIMain aiMain)
          Creates a new ValuedAIObject instance.
ValuedAIObject(AIMain aiMain, java.lang.String id)
          Creates a new ValuedAIObject instance.
 
Method Summary
 int compareTo(ValuedAIObject other)
           
 int getValue()
          Get the Value value.
 void setValue(int newValue)
          Set the Value value.
 
Methods inherited from class net.sf.freecol.server.ai.AIObject
dispose, getAIMain, getGame, getSpecification, getXMLElementTagName, isUninitialized, readFromXML
 
Methods inherited from class net.sf.freecol.common.model.FreeColObject
addPropertyChangeListener, addPropertyChangeListener, dumpObject, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getId, getPropertyChangeListeners, getPropertyChangeListeners, hasAbility, hasAttribute, hasListeners, readAttributes, readAttributes, readChild, readChild, readChildren, readChildren, readFromArrayElement, readFromArrayElement, readFromListElement, readFromXMLElement, readFromXMLImpl, readFromXMLImpl, readFromXMLPartialImpl, removePropertyChangeListener, removePropertyChangeListener, save, save, setId, setSpecification, toXML, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, toXMLImpl, toXMLPartialImpl, writeAttribute, writeAttributes, writeChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

private int value
The value of this AIObject.

Constructor Detail

ValuedAIObject

public ValuedAIObject(AIMain aiMain)
Creates a new ValuedAIObject instance.

Parameters:
aiMain - an AIMain value

ValuedAIObject

public ValuedAIObject(AIMain aiMain,
                      java.lang.String id)
Creates a new ValuedAIObject instance.

Parameters:
aiMain - an AIMain value
id - a String value
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>