Class BooleanOption

    • Constructor Detail

      • BooleanOption

        protected BooleanOption​(OptionManager owner,
                                String commandline,
                                String property,
                                Object defValue,
                                UserMode minUserMode)
        Initializes the option. Will always output the default value.
        Parameters:
        owner - the owner of this option
        commandline - the commandline string to identify the option
        property - the name of bean property
        defValue - the default value, if null then the owner's current state is used
        minUserMode - the minimum user mode before showing this option
      • BooleanOption

        protected BooleanOption​(OptionManager owner,
                                String commandline,
                                String property,
                                Object defValue,
                                boolean outputDefValue,
                                UserMode minUserMode)
        Initializes the option.
        Parameters:
        owner - the owner of this option
        commandline - the commandline string to identify the option
        property - the name of bean property
        defValue - the default value, if null then the owner's current state is used
        outputDefValue - whether to output the default value or not
        minUserMode - the minimum user mode before showing this option
    • Method Detail

      • toString

        public String toString​(Object obj)
        Returns a string representation of the specified object.
        Specified by:
        toString in class AbstractArgumentOption
        Parameters:
        obj - the object to turn into a string
        Returns:
        the string representation
      • compareValues

        protected boolean compareValues​(Object value,
                                        Object defValue)
        Compares the two values.
        Specified by:
        compareValues in class AbstractArgumentOption
        Parameters:
        value - the value to compare against the default value
        defValue - the default value to compare against
        Returns:
        true if both are equal