chore: Add missing inline docs

This commit is contained in:
oSumAtrIX 2023-10-21 23:49:40 +02:00
parent 155e787ff4
commit f28bfe0dbd
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
10 changed files with 66 additions and 40 deletions

View File

@ -11,6 +11,7 @@ import app.revanced.patcher.patch.options.PatchOption
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @see PatchOption
*/
@ -20,8 +21,8 @@ class BooleanPatchOption private constructor(
title: String?,
description: String?,
required: Boolean,
validator: (Boolean?) -> Boolean
) : PatchOption<Boolean>(key, default, title, description, required, validator) {
validate: (Boolean?) -> Boolean
) : PatchOption<Boolean>(key, default, title, description, required, validate) {
companion object {
/**
* Create a new [BooleanPatchOption] and add it to the current [Patch].
@ -42,7 +43,7 @@ class BooleanPatchOption private constructor(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: (Boolean?) -> Boolean = { true }
) = BooleanPatchOption(key, default, title, description, required, validator).also { options.register(it) }
validate: (Boolean?) -> Boolean = { true }
) = BooleanPatchOption(key, default, title, description, required, validate).also { options.register(it) }
}
}

View File

@ -11,6 +11,7 @@ import app.revanced.patcher.patch.options.PatchOption
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @see PatchOption
*/
@ -20,8 +21,8 @@ class FloatPatchOption private constructor(
title: String?,
description: String?,
required: Boolean,
validator: (Float?) -> Boolean
) : PatchOption<Float>(key, default, title, description, required, validator) {
validate: (Float?) -> Boolean
) : PatchOption<Float>(key, default, title, description, required, validate) {
companion object {
/**
* Create a new [FloatPatchOption] and add it to the current [Patch].
@ -31,6 +32,8 @@ class FloatPatchOption private constructor(
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @return The created [FloatPatchOption].
*
* @see FloatPatchOption
@ -42,7 +45,7 @@ class FloatPatchOption private constructor(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: (Float?) -> Boolean = { true }
) = FloatPatchOption(key, default, title, description, required, validator).also { options.register(it) }
validate: (Float?) -> Boolean = { true }
) = FloatPatchOption(key, default, title, description, required, validate).also { options.register(it) }
}
}

View File

@ -11,6 +11,7 @@ import app.revanced.patcher.patch.options.PatchOption
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @see PatchOption
*/
@ -20,8 +21,8 @@ class IntPatchOption private constructor(
title: String?,
description: String?,
required: Boolean,
validator: (Int?) -> Boolean
) : PatchOption<Int>(key, default, title, description, required, validator) {
validate: (Int?) -> Boolean
) : PatchOption<Int>(key, default, title, description, required, validate) {
companion object {
/**
* Create a new [IntPatchOption] and add it to the current [Patch].
@ -31,6 +32,8 @@ class IntPatchOption private constructor(
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @return The created [IntPatchOption].
*
* @see IntPatchOption
@ -42,7 +45,7 @@ class IntPatchOption private constructor(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: (Int?) -> Boolean = { true }
) = IntPatchOption(key, default, title, description, required, validator).also { options.register(it) }
validate: (Int?) -> Boolean = { true }
) = IntPatchOption(key, default, title, description, required, validate).also { options.register(it) }
}
}

View File

@ -11,6 +11,7 @@ import app.revanced.patcher.patch.options.PatchOption
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @see PatchOption
*/
@ -20,8 +21,8 @@ class LongPatchOption private constructor(
title: String?,
description: String?,
required: Boolean,
validator: (Long?) -> Boolean
) : PatchOption<Long>(key, default, title, description, required, validator) {
validate: (Long?) -> Boolean
) : PatchOption<Long>(key, default, title, description, required, validate) {
companion object {
/**
* Create a new [LongPatchOption] and add it to the current [Patch].
@ -42,7 +43,7 @@ class LongPatchOption private constructor(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: (Long?) -> Boolean = { true }
) = LongPatchOption(key, default, title, description, required, validator).also { options.register(it) }
validate: (Long?) -> Boolean = { true }
) = LongPatchOption(key, default, title, description, required, validate).also { options.register(it) }
}
}

View File

@ -11,6 +11,7 @@ import app.revanced.patcher.patch.options.PatchOption
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @see PatchOption
*/
@ -20,8 +21,8 @@ class StringPatchOption private constructor(
title: String?,
description: String?,
required: Boolean,
validator: (String?) -> Boolean
) : PatchOption<String>(key, default, title, description, required, validator) {
validate: (String?) -> Boolean
) : PatchOption<String>(key, default, title, description, required, validate) {
companion object {
/**
* Create a new [StringPatchOption] and add it to the current [Patch].
@ -31,6 +32,8 @@ class StringPatchOption private constructor(
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @return The created [StringPatchOption].
*
* @see StringPatchOption
@ -42,7 +45,7 @@ class StringPatchOption private constructor(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: (String?) -> Boolean = { true }
) = StringPatchOption(key, default, title, description, required, validator).also { options.register(it) }
validate: (String?) -> Boolean = { true }
) = StringPatchOption(key, default, title, description, required, validate).also { options.register(it) }
}
}

View File

@ -11,6 +11,7 @@ import app.revanced.patcher.patch.options.PatchOption
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @see PatchOption
*/
@ -20,8 +21,8 @@ class BooleanArrayPatchOption private constructor(
title: String?,
description: String?,
required: Boolean,
validator: (Array<Boolean>?) -> Boolean
) : PatchOption<Array<Boolean>>(key, default, title, description, required, validator) {
validate: (Array<Boolean>?) -> Boolean
) : PatchOption<Array<Boolean>>(key, default, title, description, required, validate) {
companion object {
/**
* Create a new [BooleanArrayPatchOption] and add it to the current [Patch].
@ -31,6 +32,8 @@ class BooleanArrayPatchOption private constructor(
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @return The created [BooleanArrayPatchOption].
*
* @see BooleanArrayPatchOption
@ -42,7 +45,7 @@ class BooleanArrayPatchOption private constructor(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: (Array<Boolean>?) -> Boolean = { true }
) = BooleanArrayPatchOption(key, default, title, description, required, validator).also { options.register(it) }
validate: (Array<Boolean>?) -> Boolean = { true }
) = BooleanArrayPatchOption(key, default, title, description, required, validate).also { options.register(it) }
}
}

View File

@ -11,6 +11,7 @@ import app.revanced.patcher.patch.options.PatchOption
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @see PatchOption
*/
@ -20,8 +21,8 @@ class FloatArrayPatchOption private constructor(
title: String?,
description: String?,
required: Boolean,
validator: (Array<Float>?) -> Boolean
) : PatchOption<Array<Float>>(key, default, title, description, required, validator) {
validate: (Array<Float>?) -> Boolean
) : PatchOption<Array<Float>>(key, default, title, description, required, validate) {
companion object {
/**
* Create a new [FloatArrayPatchOption] and add it to the current [Patch].
@ -31,6 +32,8 @@ class FloatArrayPatchOption private constructor(
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @return The created [FloatArrayPatchOption].
*
* @see FloatArrayPatchOption
@ -42,7 +45,7 @@ class FloatArrayPatchOption private constructor(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: (Array<Float>?) -> Boolean = { true }
) = FloatArrayPatchOption(key, default, title, description, required, validator).also { options.register(it) }
validate: (Array<Float>?) -> Boolean = { true }
) = FloatArrayPatchOption(key, default, title, description, required, validate).also { options.register(it) }
}
}

View File

@ -11,6 +11,7 @@ import app.revanced.patcher.patch.options.PatchOption
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @see PatchOption
*/
@ -20,8 +21,8 @@ class IntArrayPatchOption private constructor(
title: String?,
description: String?,
required: Boolean,
validator: (Array<Int>?) -> Boolean
) : PatchOption<Array<Int>>(key, default, title, description, required, validator) {
validate: (Array<Int>?) -> Boolean
) : PatchOption<Array<Int>>(key, default, title, description, required, validate) {
companion object {
/**
* Create a new [IntArrayPatchOption] and add it to the current [Patch].
@ -31,6 +32,8 @@ class IntArrayPatchOption private constructor(
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @return The created [IntArrayPatchOption].
*
* @see IntArrayPatchOption
@ -42,7 +45,7 @@ class IntArrayPatchOption private constructor(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: (Array<Int>?) -> Boolean = { true }
) = IntArrayPatchOption(key, default, title, description, required, validator).also { options.register(it) }
validate: (Array<Int>?) -> Boolean = { true }
) = IntArrayPatchOption(key, default, title, description, required, validate).also { options.register(it) }
}
}

View File

@ -11,6 +11,7 @@ import app.revanced.patcher.patch.options.PatchOption
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @see PatchOption
*/
@ -20,8 +21,8 @@ class LongArrayPatchOption private constructor(
title: String?,
description: String?,
required: Boolean,
validator: (Array<Long>?) -> Boolean
) : PatchOption<Array<Long>>(key, default, title, description, required, validator) {
validate: (Array<Long>?) -> Boolean
) : PatchOption<Array<Long>>(key, default, title, description, required, validate) {
companion object {
/**
* Create a new [LongArrayPatchOption] and add it to the current [Patch].
@ -31,6 +32,8 @@ class LongArrayPatchOption private constructor(
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @return The created [LongArrayPatchOption].
*
* @see LongArrayPatchOption
@ -42,7 +45,7 @@ class LongArrayPatchOption private constructor(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: (Array<Long>?) -> Boolean = { true }
) = LongArrayPatchOption(key, default, title, description, required, validator).also { options.register(it) }
validate: (Array<Long>?) -> Boolean = { true }
) = LongArrayPatchOption(key, default, title, description, required, validate).also { options.register(it) }
}
}

View File

@ -11,6 +11,7 @@ import app.revanced.patcher.patch.options.PatchOption
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @see PatchOption
*/
@ -20,8 +21,8 @@ class StringArrayPatchOption private constructor(
title: String?,
description: String?,
required: Boolean,
validator: (Array<String>?) -> Boolean
) : PatchOption<Array<String>>(key, default, title, description, required, validator) {
validate: (Array<String>?) -> Boolean
) : PatchOption<Array<String>>(key, default, title, description, required, validate) {
companion object {
/**
* Create a new [StringArrayPatchOption] and add it to the current [Patch].
@ -31,6 +32,8 @@ class StringArrayPatchOption private constructor(
* @param title The title.
* @param description A description.
* @param required Whether the option is required.
* @param validate The function to validate values of the option.
*
* @return The created [StringArrayPatchOption].
*
* @see StringArrayPatchOption
@ -42,7 +45,7 @@ class StringArrayPatchOption private constructor(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: (Array<String>?) -> Boolean = { true }
) = StringArrayPatchOption(key, default, title, description, required, validator).also { options.register(it) }
validate: (Array<String>?) -> Boolean = { true }
) = StringArrayPatchOption(key, default, title, description, required, validate).also { options.register(it) }
}
}