Interface Option<T>

    • Method Detail

      • cloneOption

        Option<T> cloneOption()
                       throws java.lang.CloneNotSupportedException
        Clone this option.
        Returns:
        A clone of this option.
        Throws:
        java.lang.CloneNotSupportedException - if we can not clone.
      • getGroup

        java.lang.String getGroup()
        Gets the option group identifier for this option.
        Returns:
        The option group identifier.
      • setGroup

        void setGroup​(java.lang.String group)
        Set the option group for this option.
        Parameters:
        group - The identifier for the option group.
      • getValue

        T getValue()
        Gets the value of this option.
        Returns:
        The value of this Option.
      • setValue

        void setValue​(T value)
        Sets the value of this option.
        Parameters:
        value - The new value of this Option.
      • getEnabledBy

        java.lang.String getEnabledBy()
        Gets the key of an BooleanOption that must be true for this option to be enabled.
        Returns:
        The key of the BooleanOption that needs to be enabled.
      • readFromXML

        void readFromXML​(FreeColXMLReader xr)
                  throws javax.xml.stream.XMLStreamException
        Initializes this object from an XML-representation of this object.
        Parameters:
        xr - The input stream with the XML.
        Throws:
        javax.xml.stream.XMLStreamException - if there are any problems reading the stream.
      • toXML

        void toXML​(FreeColXMLWriter xw)
            throws javax.xml.stream.XMLStreamException
        Makes an XML-representation of this object.
        Parameters:
        xw - The FreeColXMLWriter to write to.
        Throws:
        javax.xml.stream.XMLStreamException - if there are any problems writing the stream.
      • toString

        java.lang.String toString()
        Overrides:
        toString in class java.lang.Object