SimpleNamedKernelIntParameter

A simple implementation of a named kernel parameter that handles integer values.

Parameters

name

The name of the parameter, used for identifying it in command-line arguments.

Constructors

Link copied to clipboard
constructor(name: String)

Creates an instance of SimpleNamedKernelIntParameter and initializes it with a name and a parsing logic that converts a string argument to an integer.

Properties

Link copied to clipboard

List of alternative names for this parameter

Link copied to clipboard

Functions

Link copied to clipboard
open override fun parseValue(argValue: String, previousValue: Int?): Int

Parses a string value into a value of type T. This method is called after the parameter name has been matched and the value extracted.

Link copied to clipboard
open override fun serialize(value: Int): String?

Serializes a value to a command-line argument with the parameter's primary alias.

Link copied to clipboard
open override fun serializeValue(value: Int): String

Serializes a value of type T to a string representation (without the parameter name prefix).

Link copied to clipboard
open override fun tryParse(arg: String, previousValue: Int?): Int?

Attempts to parse a command-line argument if it matches one of this parameter's aliases. Checks if the argument starts with "-alias=" for any of the aliases.