package qub;

public class CommandLineParameterVerbose extends CommandLineParameterBoolean
{
    private CharacterToByteWriteStream writeStream;

    public CommandLineParameterVerbose(CharacterToByteWriteStream writeStream)
    {
        this(writeStream, false);
    }

    public CommandLineParameterVerbose(CharacterToByteWriteStream writeStream, boolean unspecifiedValue)
    {
        super("verbose", unspecifiedValue);

        PreCondition.assertNotNull(writeStream, "writeStream");

        this.writeStream = writeStream;

        this.setDescription("Whether or not to show verbose logs.");
        this.addAlias("v");
    }

    @Override
    public CommandLineParameterVerbose setDescription(String description)
    {
        super.setDescription(description);
        return this;
    }

    @Override
    public CommandLineParameterVerbose setAliases(Iterable<String> aliases)
    {
        super.setAliases(aliases);
        return this;
    }

    @Override
    public CommandLineParameterVerbose setAliases(String... aliases)
    {
        super.setAliases(aliases);
        return this;
    }

    @Override
    public CommandLineParameterVerbose addAlias(String alias)
    {
        super.addAlias(alias);
        return this;
    }

    @Override
    public CommandLineParameterVerbose addAliases(String... aliases)
    {
        super.addAliases(aliases);
        return this;
    }

    @Override
    public CommandLineParameterVerbose addAliases(Iterable<String> aliases)
    {
        super.addAliases(aliases);
        return this;
    }

    @Override
    public CommandLineParameterVerbose setValueName(String valueName)
    {
        super.setValueName(valueName);
        return this;
    }

    @Override
    public CommandLineParameterVerbose setRequired(boolean required)
    {
        super.setRequired(required);
        return this;
    }

    @Override
    public CommandLineParameterVerbose setValueRequired(boolean valueRequired)
    {
        super.setValueRequired(valueRequired);
        return this;
    }

    @Override
    public CommandLineParameterVerbose setArguments(CommandLineArguments arguments)
    {
        super.setArguments(arguments);
        return this;
    }

    public CommandLineParameterVerbose setWriteStream(CharacterToByteWriteStream writeStream)
    {
        this.writeStream = writeStream;
        return this;
    }

    public Result<VerboseCharacterToByteWriteStream> getVerboseCharacterToByteWriteStream()
    {
        return Result.create(() ->
        {
            return VerboseCharacterToByteWriteStream.create(this.writeStream)
                .setIsVerbose(this.getValue().await());
        });
    }

    public Result<Void> writeLine(String message)
    {
        PreCondition.assertNotNull(message, "message");
        PreCondition.assertNotNull(writeStream, "writeStream");
        PreCondition.assertNotDisposed(writeStream, "writeStream");

        return Result.create(() ->
        {
            if (getValue().await())
            {
                writeStream.writeLine("VERBOSE: " + message).await();
            }
        });
    }
}

@@ -98,16 +98,22 @@
 private 
+final 
 Characte
@@ -731,32 +731,68 @@
 )%0A    %7B%0A        
+return (CommandLineParameterVerbose)
 super.setDescrip
@@ -810,37 +810,16 @@
 ption);%0A
-        return this;%0A
     %7D%0A%0A 
@@ -913,32 +913,68 @@
 )%0A    %7B%0A        
+return (CommandLineParameterVerbose)
 super.setAliases
@@ -984,37 +984,16 @@
 iases);%0A
-        return this;%0A
     %7D%0A%0A 
@@ -1080,32 +1080,68 @@
 )%0A    %7B%0A        
+return (CommandLineParameterVerbose)
 super.setAliases
@@ -1151,37 +1151,16 @@
 iases);%0A
-        return this;%0A
     %7D%0A%0A 
@@ -1240,32 +1240,68 @@
 )%0A    %7B%0A        
+return (CommandLineParameterVerbose)
 super.addAlias(a
@@ -1305,37 +1305,16 @@
 s(alias)
-;%0A        return this
 ;%0A    %7D%0A
@@ -1403,32 +1403,68 @@
 )%0A    %7B%0A        
+return (CommandLineParameterVerbose)
 super.addAliases
@@ -1474,37 +1474,16 @@
 iases);%0A
-        return this;%0A
     %7D%0A%0A 
@@ -1581,24 +1581,60 @@
   %7B%0A        
+return (CommandLineParameterVerbose)
 super.addAli
@@ -1648,37 +1648,16 @@
 iases);%0A
-        return this;%0A
     %7D%0A%0A 
@@ -1745,32 +1745,68 @@
 )%0A    %7B%0A        
+return (CommandLineParameterVerbose)
 super.setValueNa
@@ -1820,37 +1820,16 @@
 eName);%0A
-        return this;%0A
     %7D%0A%0A 
@@ -1916,32 +1916,68 @@
 )%0A    %7B%0A        
+return (CommandLineParameterVerbose)
 super.setRequire
@@ -1989,37 +1989,16 @@
 uired);%0A
-        return this;%0A
     %7D%0A%0A 
@@ -2095,32 +2095,68 @@
 )%0A    %7B%0A        
+return (CommandLineParameterVerbose)
 super.setValueRe
@@ -2178,37 +2178,16 @@
 uired);%0A
-        return this;%0A
     %7D%0A%0A 
@@ -2301,226 +2301,157 @@
     
-super.setArguments(arguments);%0A        return this;%0A    %7D%0A%0A    public CommandLineParameterVerbose setWriteStream(CharacterToByteWriteStream writeStream)%0A    %7B%0A        this.writeStream = writeStream;%0A        return this
+return (CommandLineParameterVerbose)super.setArguments(arguments);%0A    %7D%0A%0A    public boolean isVerbose()%0A    %7B%0A        return this.getValue().await()
 ;%0A  
@@ -2715,471 +2715,21 @@
 his.
-getValue().await());%0A        %7D);%0A    %7D%0A%0A    public Result%3CVoid%3E writeLine(String message)%0A    %7B%0A        PreCondition.assertNotNull(message, %22message%22);%0A        PreCondition.assertNotNull(writeStream, %22writeStream%22);%0A        PreCondition.assertNotDisposed(writeStream, %22writeStream%22);%0A%0A        return Result.create(() -%3E%0A        %7B%0A            if (getValue().await())%0A            %7B%0A                writeStream.writeLine(%22VERBOSE: %22 + message).await();%0A            %7D
+isVerbose());
 %0A   

Add CommandLineParameterVerbose.isVerbose() -> boolean