net.sf.freecol.common.model
Class Scope

java.lang.Object
  extended by net.sf.freecol.common.model.FreeColObject
      extended by net.sf.freecol.common.model.Scope
All Implemented Interfaces:
java.lang.Cloneable

public final class Scope
extends FreeColObject
implements java.lang.Cloneable

The Scope class determines whether a given FreeColGameObjectType fulfills certain requirements.


Field Summary
 
Fields inherited from class net.sf.freecol.common.model.FreeColObject
ID_ATTRIBUTE_TAG
 
Constructor Summary
Scope()
          Creates a new Scope instance.
Scope(javax.xml.stream.XMLStreamReader in)
          Creates a new Scope instance.
 
Method Summary
 boolean appliesTo(FreeColObject object)
          Describe appliesTo method here.
 boolean equals(java.lang.Object o)
           
 java.lang.String getAbilityID()
          Get the AbilityID value.
 java.lang.String getMethodName()
          Get the MethodName value.
 java.lang.String getMethodValue()
          Get the MethodValue value.
 java.lang.String getType()
          Get the Type value.
static java.lang.String getXMLElementTagName()
           
 int hashCode()
           
 boolean isAbilityValue()
          Get the AbilityValue value.
 boolean isMatchesNull()
          Get the MatchesNull value.
 boolean isMatchNegated()
          Get the MatchNegated value.
 void readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
          Initialize this object from an XML-representation of this object.
 void setAbilityID(java.lang.String newAbilityID)
          Set the AbilityID value.
 void setAbilityValue(boolean newAbilityValue)
          Set the AbilityValue value.
 void setMatchesNull(boolean newMatchesNull)
          Set the MatchesNull value.
 void setMatchNegated(boolean newMatchNegated)
          Set the MatchNegated value.
 void setMethodName(java.lang.String newMethodName)
          Set the MethodName value.
 void setMethodValue(java.lang.String newMethodValue)
          Set the MethodValue value.
 void setType(java.lang.String newType)
          Set the Type value.
 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.common.model.FreeColObject
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAttribute, getAttribute, getAttribute, getAttribute, getId, getPropertyChangeListeners, getPropertyChangeListeners, hasAbility, hasAttribute, hasListeners, readFromXML, readFromXMLElement, removePropertyChangeListener, removePropertyChangeListener, toXML, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, writeAttribute, writeFreeColGameObject
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scope

public Scope()
Creates a new Scope instance.


Scope

public Scope(javax.xml.stream.XMLStreamReader in)
      throws javax.xml.stream.XMLStreamException
Creates a new Scope instance.

Parameters:
in - a XMLStreamReader value
Throws:
javax.xml.stream.XMLStreamException - if an error occurs
Method Detail

isMatchesNull

public boolean isMatchesNull()
Get the MatchesNull value.

Returns:
a boolean value

setMatchesNull

public void setMatchesNull(boolean newMatchesNull)
Set the MatchesNull value.

Parameters:
newMatchesNull - The new MatchesNull value.

isMatchNegated

public boolean isMatchNegated()
Get the MatchNegated value.

Returns:
a boolean value

setMatchNegated

public void setMatchNegated(boolean newMatchNegated)
Set the MatchNegated value.

Parameters:
newMatchNegated - The new MatchNegated value.

getType

public java.lang.String getType()
Get the Type value.

Returns:
a String value

setType

public void setType(java.lang.String newType)
Set the Type value.

Parameters:
newType - The new Type value.

getAbilityID

public java.lang.String getAbilityID()
Get the AbilityID value.

Returns:
a String value

setAbilityID

public void setAbilityID(java.lang.String newAbilityID)
Set the AbilityID value.

Parameters:
newAbilityID - The new AbilityID value.

isAbilityValue

public boolean isAbilityValue()
Get the AbilityValue value.

Returns:
a boolean value

setAbilityValue

public void setAbilityValue(boolean newAbilityValue)
Set the AbilityValue value.

Parameters:
newAbilityValue - The new AbilityValue value.

getMethodName

public java.lang.String getMethodName()
Get the MethodName value.

Returns:
a String value

setMethodName

public void setMethodName(java.lang.String newMethodName)
Set the MethodName value.

Parameters:
newMethodName - The new MethodName value.

getMethodValue

public java.lang.String getMethodValue()
Get the MethodValue value.

Returns:
an String value

setMethodValue

public void setMethodValue(java.lang.String newMethodValue)
Set the MethodValue value.

Parameters:
newMethodValue - The new MethodValue value.

appliesTo

public boolean appliesTo(FreeColObject object)
Describe appliesTo method here.

Parameters:
object - a FreeColGameObjectType value
Returns:
a boolean value

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

readFromXMLImpl

public void readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
                     throws javax.xml.stream.XMLStreamException
Initialize this object from an XML-representation of this object.

Parameters:
in - The input stream with the XML.
Throws:
javax.xml.stream.XMLStreamException - if a problem was encountered during parsing.

toXMLImpl

public void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
               throws javax.xml.stream.XMLStreamException
This method writes an XML-representation of this object to the given stream.

Parameters:
out - The target stream.
Throws:
javax.xml.stream.XMLStreamException - if there are any problems writing to the stream.

getXMLElementTagName

public static java.lang.String getXMLElementTagName()