Class SerializedParameterization

  • All Implemented Interfaces:
    Parameterization

    public class SerializedParameterization
    extends AbstractParameterization
    Manage a parameterization serialized as String array, e.g., from command line.

    When building parameter lists, use ListParameterization where possible.

    Since:
    0.3
    Author:
    Erich Schubert
    • Field Detail

      • OPTION_PREFIX

        public static final java.lang.String OPTION_PREFIX
        Prefix of option markers on the command line.

        The option markers are supposed to be given on the command line with leading -.

        See Also:
        Constant Field Values
      • parameters

        java.util.LinkedList<java.lang.String> parameters
        Parameter storage
    • Constructor Detail

      • SerializedParameterization

        public SerializedParameterization()
        Constructor
      • SerializedParameterization

        @SafeVarargs
        public SerializedParameterization​(java.lang.String... args)
        Constructor
        Parameters:
        args - Parameters
      • SerializedParameterization

        public SerializedParameterization​(java.util.List<java.lang.String> args)
        Constructor
        Parameters:
        args - Parameter list
    • Method Detail

      • getRemainingParameters

        public java.util.List<java.lang.String> getRemainingParameters()
        Return the yet unused parameters.
        Returns:
        Unused parameters.
      • hasUnusedParameters

        public boolean hasUnusedParameters()
        Description copied from interface: Parameterization
        Check for unused parameters
        Returns:
        true if at least one parameter was not consumed
      • logUnusedParameters

        public void logUnusedParameters()
        Log a warning if there were unused parameters.
      • setValueForOption

        public boolean setValueForOption​(Parameter<?> opt)
                                  throws ParameterException
        Description copied from interface: Parameterization
        Assign a value for an option, but not using default values and throwing exceptions on error.
        Parameters:
        opt - Parameter to set
        Returns:
        Success code
        Throws:
        ParameterException - on assignment errors.