Class ImmutableExampleConfig

    • Constructor Detail

      • ImmutableExampleConfig

        public ImmutableExampleConfig​(Properties props)
      • ImmutableExampleConfig

        public ImmutableExampleConfig​(Map<String,​String> props)
    • Method Detail

      • mandatoryString

        public String mandatoryString()
        This is a mandatory string that must be specified in the config file.

        The application will not start without it.

        Specified by:
        mandatoryString in interface ExampleConfig
        Returns:
        the config value for mandatorString
      • optionalInt

        public OptionalInt optionalInt()
        An optional int that may be specified, but may also be left off.

        The application can run without it.3 Und hier ist das @mittendrin enthalten.

        Specified by:
        optionalInt in interface ExampleConfig
        Returns:
        the config value for optionalInt
      • charsetWithDefault

        public Charset charsetWithDefault()
        The charset to use. If not specified it defaults to UTF-8.
        Specified by:
        charsetWithDefault in interface ExampleConfig
        Returns:
        the config value for charsetWithDefault
      • optionalInetAddress

        public Optional<InetAddress> optionalInetAddress()
        An InetAddress that may be specified.

        The value from the config file must conform to the same rules as the InetAddress constructor. Basically that means that IP addresses or hostnames can be specified.

        Specified by:
        optionalInetAddress in interface ExampleConfig
        Returns:
        the config value for optionalInetAddress