Skip to content

Index

clikt / com.github.ajalt.clikt.parameters.types

Package com.github.ajalt.clikt.parameters.types

Functions

Name Summary
choice Convert the argument based on a fixed set of values.fun <T :Any>RawArgument.choice(choices:Map<String, T>, ignoreCase:Boolean= false):ProcessedArgument<T, T>
fun <T :Any>RawArgument.choice(vararg choices:Pair<String, T>, ignoreCase:Boolean= false):ProcessedArgument<T, T>
Restrict the argument to a fixed set of values.funRawArgument.choice(vararg choices:String, ignoreCase:Boolean= false):ProcessedArgument<String,String>
Convert the option based on a fixed set of values.fun <T :Any>RawOption.choice(choices:Map<String, T>, metavar:String= mvar(choices.keys), ignoreCase:Boolean= false):NullableOption<T, T>
fun <T :Any>RawOption.choice(vararg choices:Pair<String, T>, metavar:String= mvar(choices.map { it.first }), ignoreCase:Boolean= false):NullableOption<T, T>
Restrict the option to a fixed set of values.funRawOption.choice(vararg choices:String, metavar:String= mvar(choices.asIterable()), ignoreCase:Boolean= false):NullableOption<String,String>
defaultStdin Use - as the default value for an inputStream option.funNullableOption<InputStream,InputStream>.defaultStdin():OptionWithValues<InputStream,InputStream,InputStream>
Use - as the default value for an inputStream argument.funProcessedArgument<InputStream,InputStream>.defaultStdin():ArgumentDelegate<InputStream>
defaultStdout Use - as the default value for an outputStream option.funNullableOption<OutputStream,OutputStream>.defaultStdout():OptionWithValues<OutputStream,OutputStream,OutputStream>
Use - as the default value for an outputStream argument.funProcessedArgument<OutputStream,OutputStream>.defaultStdout():ArgumentDelegate<OutputStream>
double Convert the argument values to a Double``funRawArgument.double():ProcessedArgument<Double,Double>
Convert the option values to a Double``funRawOption.double():NullableOption<Double,Double>
enum Convert the argument to the values of an enum.fun <T :Enum<T>>RawArgument.enum(ignoreCase:Boolean= true, key: (T) ->String= { it.name }):ProcessedArgument<T, T>
Convert the option to the values of an enum.fun <T :Enum<T>>RawOption.enum(ignoreCase:Boolean= true, key: (T) ->String= { it.name }):NullableOption<T, T>
file Convert the argument to a File.funRawArgument.file(mustExist:Boolean= false, canBeFile:Boolean= true, canBeDir:Boolean= true, mustBeWritable:Boolean= false, mustBeReadable:Boolean= false, canBeSymlink:Boolean= true):ProcessedArgument<File,File>
Convert the option to a File.funRawOption.file(mustExist:Boolean= false, canBeFile:Boolean= true, canBeDir:Boolean= true, mustBeWritable:Boolean= false, mustBeReadable:Boolean= false, canBeSymlink:Boolean= true):NullableOption<File,File>
float Convert the argument values to a Float``funRawArgument.float():ProcessedArgument<Float,Float>
Convert the option values to a Float``funRawOption.float():NullableOption<Float,Float>
inputStream Convert the option to an InputStream.funRawOption.inputStream(fileSystem: FileSystem = FileSystems.getDefault()):NullableOption<InputStream,InputStream>
Convert the argument to an InputStream.funRawArgument.inputStream(fileSystem: FileSystem = FileSystems.getDefault()):ProcessedArgument<InputStream,InputStream>
int Convert the argument values to an Int``funRawArgument.int():ProcessedArgument<Int,Int>
Convert the option values to an Int``funRawOption.int():NullableOption<Int,Int>
long Convert the argument values to a Long``funRawArgument.long():ProcessedArgument<Long,Long>
Convert the option values to a Long``funRawOption.long():NullableOption<Long,Long>
outputStream Convert the option to an OutputStream.funRawOption.outputStream(createIfNotExist:Boolean= true, truncateExisting:Boolean= false, fileSystem: FileSystem = FileSystems.getDefault()):NullableOption<OutputStream,OutputStream>
Convert the argument to an OutputStream.funRawArgument.outputStream(createIfNotExist:Boolean= true, truncateExisting:Boolean= false, fileSystem: FileSystem = FileSystems.getDefault()):ProcessedArgument<OutputStream,OutputStream>
path Convert the argument to a Path.funRawArgument.path(mustExist:Boolean= false, canBeFile:Boolean= true, canBeDir:Boolean= true, mustBeWritable:Boolean= false, mustBeReadable:Boolean= false, canBeSymlink:Boolean= true, fileSystem: FileSystem = FileSystems.getDefault()):ProcessedArgument<Path, Path>
Convert the option to a Path.funRawOption.path(mustExist:Boolean= false, canBeFile:Boolean= true, canBeDir:Boolean= true, mustBeWritable:Boolean= false, mustBeReadable:Boolean= false, canBeSymlink:Boolean= true, fileSystem: FileSystem = FileSystems.getDefault()):NullableOption<Path, Path>
restrictTo Restrict the argument values to fit into a range.fun <T :Comparable<T>>ProcessedArgument<T, T>.restrictTo(min: T? = null, max: T? = null, clamp:Boolean= false):ProcessedArgument<T, T>
fun <T :Comparable<T>>ProcessedArgument<T, T>.restrictTo(range:ClosedRange<T>, clamp:Boolean= false):ProcessedArgument<T, T>
Restrict the option values to fit into a range.fun <T :Comparable<T>>OptionWithValues<T?, T, T>.restrictTo(min: T? = null, max: T? = null, clamp:Boolean= false):OptionWithValues<T?, T, T>
fun <T :Comparable<T>>OptionWithValues<T?, T, T>.restrictTo(range:ClosedRange<T>, clamp:Boolean= false):OptionWithValues<T?, T, T>