|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.common.model.FreeColObject
net.sf.freecol.common.model.FreeColGameObject
net.sf.freecol.common.model.UnitLocation
net.sf.freecol.common.model.HighSeas
public class HighSeas
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.sf.freecol.common.model.UnitLocation |
|---|
UnitLocation.NoAddReason |
| Field Summary | |
|---|---|
private java.util.List<Location> |
destinations
The destinations this HighSeas object connects. |
private static java.util.logging.Logger |
logger
|
| Fields inherited from class net.sf.freecol.common.model.FreeColGameObject |
|---|
UNITS_TAG_NAME |
| 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 | |
|---|---|
HighSeas(Game game)
|
|
HighSeas(Game game,
java.lang.String id)
|
|
HighSeas(Game game,
javax.xml.stream.XMLStreamReader in)
|
|
| Method Summary | |
|---|---|
void |
addDestination(Location destination)
Add a single destination to this HighSeas instance. |
boolean |
canAdd(Locatable locatable)
Checks whether or not the specified locatable may be added to this Location. |
java.util.List<Location> |
getDestinations()
Get the Destinations value. |
StringTemplate |
getLocationName()
Returns the name of this location. |
static java.lang.String |
getXMLElementTagName()
Returns the tag name of this Object. |
protected void |
readChild(javax.xml.stream.XMLStreamReader in)
Reads a single child object. |
protected void |
readChildren(javax.xml.stream.XMLStreamReader in)
Reads the children of this object from an XML stream. |
void |
removeDestination(Location destination)
Remove a single destination from this HighSeas instance. |
protected void |
toXMLImpl(javax.xml.stream.XMLStreamWriter out,
Player player,
boolean showAll,
boolean toSavedGame)
This method writes an XML-representation of this object to the given stream. |
protected void |
writeChildren(javax.xml.stream.XMLStreamWriter out,
Player player,
boolean showAll,
boolean toSavedGame)
Serialize the children of this UnitLocation, i.e. |
| Methods inherited from class net.sf.freecol.common.model.UnitLocation |
|---|
add, contains, dispose, disposeList, getColony, getGoodsContainer, getLocationNameFor, getNoAddReason, getSettlement, getSpaceTaken, getTile, getUnitCapacity, getUnitCount, getUnitIterator, getUnitList, isEmpty, isFull, remove, writeAttributes |
| Methods inherited from class net.sf.freecol.common.model.FreeColGameObject |
|---|
equals, equals, fundamentalDispose, getFreeColGameObject, getFreeColGameObject, getGame, getIntegerID, getSpecification, hashCode, isDisposed, isUninitialized, newLocation, readFromXML, readFromXMLPartialByClass, setDefaultId, setGame, setId, toString, toXML, toXMLImpl, toXMLPartialByClass, updateFreeColGameObject |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.sf.freecol.common.model.Location |
|---|
getId |
| Field Detail |
|---|
private static final java.util.logging.Logger logger
private java.util.List<Location> destinations
| Constructor Detail |
|---|
public HighSeas(Game game)
public HighSeas(Game game,
javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public HighSeas(Game game,
java.lang.String id)
| Method Detail |
|---|
public StringTemplate getLocationName()
getLocationName in interface LocationgetLocationName in class UnitLocationpublic final java.util.List<Location> getDestinations()
Destinations value.
List valuepublic void addDestination(Location destination)
destination - a Location valuepublic void removeDestination(Location destination)
destination - a Location valuepublic boolean canAdd(Locatable locatable)
Location.
canAdd in interface LocationcanAdd in class UnitLocationlocatable - The Locatable to add.
protected void toXMLImpl(javax.xml.stream.XMLStreamWriter out,
Player player,
boolean showAll,
boolean toSavedGame)
throws javax.xml.stream.XMLStreamException
Player will
be added to that representation if showAll is
set to false.
toXMLImpl in class FreeColGameObjectout - The target stream.player - The Player this XML-representation
should be made for, or null if
showAll == true.showAll - Only attributes visible to player
will be added to the representation if showAll
is set to false.toSavedGame - If true then information that
is only needed when saving a game is added.
javax.xml.stream.XMLStreamException - if there are any problems writing
to the stream.
protected void writeChildren(javax.xml.stream.XMLStreamWriter out,
Player player,
boolean showAll,
boolean toSavedGame)
throws javax.xml.stream.XMLStreamException
writeChildren in class UnitLocationout - a XMLStreamWriter valueplayer - a Player valueshowAll - a boolean valuetoSavedGame - a boolean value
javax.xml.stream.XMLStreamException - if an error occurs
protected void readChildren(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
readChildren in class UnitLocationin - The XML input stream.
javax.xml.stream.XMLStreamException - if a problem was encountered
during parsing.
protected void readChild(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
readChild in class UnitLocationin - The XML input stream.
javax.xml.stream.XMLStreamException - if an error occurspublic static java.lang.String getXMLElementTagName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||