Class NationSummary

    • Field Detail

      • stance

        private Stance stance
        The stance of the player toward the requesting player.
      • numberOfSettlements

        private int numberOfSettlements
        The number of settlements this player has.
      • numberOfUnits

        private int numberOfUnits
        The number of units this (European) player has.
      • militaryStrength

        private int militaryStrength
        The military strength of this (European) player.
      • navalStrength

        private int navalStrength
        The naval strength of this (European) player.
      • gold

        private int gold
        The gold this (European) player has.
      • soL

        private int soL
        The (European) player SoL.
      • foundingFathers

        private int foundingFathers
        The number of founding fathers this (European) player has.
      • tax

        private int tax
        The tax rate of this (European) player.
      • FOUNDING_FATHERS_TAG

        private static final java.lang.String FOUNDING_FATHERS_TAG
        See Also:
        Constant Field Values
      • MILITARY_STRENGTH_TAG

        private static final java.lang.String MILITARY_STRENGTH_TAG
        See Also:
        Constant Field Values
      • NAVAL_STRENGTH_TAG

        private static final java.lang.String NAVAL_STRENGTH_TAG
        See Also:
        Constant Field Values
      • NUMBER_OF_SETTLEMENTS_TAG

        private static final java.lang.String NUMBER_OF_SETTLEMENTS_TAG
        See Also:
        Constant Field Values
      • NUMBER_OF_UNITS_TAG

        private static final java.lang.String NUMBER_OF_UNITS_TAG
        See Also:
        Constant Field Values
    • Constructor Detail

      • NationSummary

        public NationSummary()
        Trivial constructor allowing creation by Game.newInstance().
      • NationSummary

        public NationSummary​(Player player,
                             Player requester)
        Creates a nation summary for the specified player.
        Parameters:
        player - The Player to create the summary for.
        requester - The Player making the request.
    • Method Detail

      • getStance

        public Stance getStance()
      • getNumberOfSettlements

        public int getNumberOfSettlements()
      • getNumberOfUnits

        public int getNumberOfUnits()
      • getMilitaryStrength

        public int getMilitaryStrength()
      • getNavalStrength

        public int getNavalStrength()
      • getGold

        public int getGold()
      • getFoundingFathers

        public int getFoundingFathers()
      • getSoL

        public int getSoL()
      • getTax

        public int getTax()
      • copyIn

        public <T extends FreeColObject> boolean copyIn​(T other)
        Copy another FreeColObject into this one if it is compatible.
        Overrides:
        copyIn in class FreeColObject
        Type Parameters:
        T - The FreeColObject subclass of the object to copy in.
        Parameters:
        other - The other object.
        Returns:
        True if the copy in is succesful.
      • writeAttributes

        protected void writeAttributes​(FreeColXMLWriter xw)
                                throws javax.xml.stream.XMLStreamException
        Write the attributes of this object to a stream. To be overridden if required by any object that has attributes and uses the toXML(FreeColXMLWriter, String) call.
        Overrides:
        writeAttributes in class FreeColObject
        Parameters:
        xw - The FreeColXMLWriter to write to.
        Throws:
        javax.xml.stream.XMLStreamException - if there are any problems writing to the stream.
      • readAttributes

        protected void readAttributes​(FreeColXMLReader xr)
                               throws javax.xml.stream.XMLStreamException
        Reads the attributes of this object from an XML stream.
        Overrides:
        readAttributes in class FreeColObject
        Parameters:
        xr - The FreeColXMLReader to read from.
        Throws:
        javax.xml.stream.XMLStreamException - if there is a problem reading the stream.
      • getXMLTagName

        public java.lang.String getXMLTagName()
        Get the serialization tag for this object.
        Specified by:
        getXMLTagName in class FreeColObject
        Returns:
        The tag.