Class ModOption

    • Field Detail

      • logger

        private static final java.util.logging.Logger logger
    • Constructor Detail

      • ModOption

        public ModOption​(Specification specification)
        Creates a new ModOption.
        Parameters:
        specification - The Specification to refer to.
    • Method Detail

      • getChoices

        public final java.util.List<FreeColModFile> getChoices()
        Get the choices available for this option.
        Returns:
        A list of FreeColModFiles.
      • setValue

        protected void setValue​(java.lang.String valueString,
                                java.lang.String defaultValueString)
                         throws javax.xml.stream.XMLStreamException
        Sets the value of this option from the given string representation. Both parameters must not be null at the same time. This method does nothing. Override it if the option has a suitable string representation.
        Overrides:
        setValue in class AbstractOption<FreeColModFile>
        Parameters:
        valueString - The string representation of the value of this Option.
        defaultValueString - The string representation of the default value of this Option.
        Throws:
        javax.xml.stream.XMLStreamException - if the value is invalid.
      • isNullValueOK

        public boolean isNullValueOK()
        Is null an acceptable value for this option? Override this in subclasses where necessary.
        Overrides:
        isNullValueOK in class AbstractOption<FreeColModFile>
        Returns:
        False.
      • 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 AbstractOption<FreeColModFile>
        Parameters:
        xw - The FreeColXMLWriter to write to.
        Throws:
        javax.xml.stream.XMLStreamException - if there are any problems writing to the stream.
      • getXMLTagName

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

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