From 5714aef444cc9b366bc20e9ad3a617b4c63faa27 Mon Sep 17 00:00:00 2001 From: minglipro Date: Sat, 7 Nov 2026 13:54:46 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E5=85=A8=E9=A1=B9=E7=9B=AE=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=20Tab=20=E7=BC=A9=E8=BF=9B=E5=B9=B6=E8=A1=A5=E5=85=A8?= =?UTF-8?q?=E5=B0=BE=E9=9A=8F=E9=80=97=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mingliqiye/utils/aes/AesUtils.kt | 94 +- .../utils/annotation/AutoService.kt | 2 +- .../utils/annotation/DateTimeJsonFormat.kt | 6 +- .../utils/annotation/UUIDJsonFormat.kt | 4 +- .../processor/AutoServiceProcessor.kt | 122 +- .../com/mingliqiye/utils/array/ArrayUtils.kt | 96 +- .../com/mingliqiye/utils/base/Base10Codec.kt | 66 +- .../com/mingliqiye/utils/base/Base16Codec.kt | 44 +- .../com/mingliqiye/utils/base/Base256Codec.kt | 552 +- .../com/mingliqiye/utils/base/Base2Codec.kt | 64 +- .../com/mingliqiye/utils/base/Base64Codec.kt | 56 +- .../mingliqiye/utils/base/Base64UrlCodec.kt | 56 +- .../com/mingliqiye/utils/base/Base91Codec.kt | 718 +- .../com/mingliqiye/utils/base/BaseCodec.kt | 258 +- .../com/mingliqiye/utils/base/BaseType.kt | 18 +- .../mingliqiye/utils/base/code/BaseCodes.kt | 14 +- .../com/mingliqiye/utils/bcrypt/BCrypt.kt | 12 +- .../utils/buffer/ByteBufferWrapper.kt | 2502 +- .../convertor/ByteBufferWrapperConvertor.kt | 288 +- .../mingliqiye/utils/bytes/ByteBufferUtils.kt | 148 +- .../mingliqiye/utils/bytes/ByteConvertible.kt | 30 +- .../com/mingliqiye/utils/bytes/ByteFlags.kt | 792 +- .../com/mingliqiye/utils/bytes/ByteUtils.kt | 20 +- .../com/mingliqiye/utils/bytes/StreamUtils.kt | 56 +- .../com/mingliqiye/utils/clone/CloneUtils.kt | 44 +- .../mingliqiye/utils/collection/Collection.kt | 430 +- .../mingliqiye/utils/concurrent/IsChanged.kt | 116 +- .../utils/configuration/ConfigurationProp.kt | 384 +- .../utils/data/ThreadLocalDataHolder.kt | 114 +- .../com/mingliqiye/utils/dto/DtoUtils.kt | 131 +- .../utils/exception/BadGatewayException.kt | 4 +- .../utils/exception/BadRequestException.kt | 4 +- .../utils/exception/CodecException.kt | 8 +- .../utils/exception/ConflictException.kt | 4 +- .../utils/exception/EmptyJsonException.kt | 8 +- .../utils/exception/ForbiddenException.kt | 4 +- .../utils/exception/FoundException.kt | 4 +- .../exception/GatewayTimeoutException.kt | 4 +- .../utils/exception/GoneException.kt | 4 +- .../utils/exception/HttpException.kt | 8 +- .../utils/exception/HttpStatusException.kt | 10 +- .../utils/exception/HttpUrlException.kt | 8 +- .../HttpVersionNotSupportedException.kt | 4 +- .../exception/InternalServerErrorException.kt | 4 +- .../utils/exception/InvalidJsonException.kt | 8 +- .../utils/exception/JsonException.kt | 8 +- .../exception/JsonObjectCastException.kt | 8 +- .../utils/exception/JsonParserException.kt | 8 +- .../utils/exception/JsonTypeException.kt | 8 +- .../exception/LengthRequiredException.kt | 4 +- .../exception/MethodNotAllowedException.kt | 4 +- .../exception/MingLiUtilsBaseException.kt | 8 +- .../exception/MovedPermanentlyException.kt | 4 +- .../exception/MultipleChoicesException.kt | 4 +- .../utils/exception/NotAcceptableException.kt | 4 +- .../utils/exception/NotFoundException.kt | 4 +- .../exception/NotFoundResourceException.kt | 8 +- .../exception/NotImplementedException.kt | 4 +- .../utils/exception/NotModifiedException.kt | 4 +- .../exception/PaymentRequiredException.kt | 4 +- .../exception/PreconditionFailedException.kt | 4 +- .../ProxyAuthenticationRequiredException.kt | 4 +- .../RequestEntityTooLargeException.kt | 4 +- .../exception/RequestTimeoutException.kt | 4 +- .../exception/RequestUriTooLargeException.kt | 4 +- .../RequestedRangeNotSatisfiableException.kt | 4 +- .../utils/exception/SeeOtherException.kt | 4 +- .../exception/ServiceUnavailableException.kt | 4 +- .../exception/TemporaryRedirectException.kt | 4 +- .../utils/exception/UnauthorizedException.kt | 4 +- .../UnsupportedMediaTypeException.kt | 4 +- .../utils/exception/UseProxyException.kt | 4 +- .../com/mingliqiye/utils/file/FileUtils.kt | 840 +- .../com/mingliqiye/utils/foreach/ForEach.kt | 324 +- .../mingliqiye/utils/functions/Debouncer.kt | 90 +- .../mingliqiye/utils/functions/Functions.kt | 1012 +- .../mingliqiye/utils/functions/Pipeline.kt | 478 +- .../com/mingliqiye/utils/hash/HashUtils.kt | 32 +- .../com/mingliqiye/utils/http/BaseResponse.kt | 30 +- .../com/mingliqiye/utils/http/MediaType.kt | 4504 ++-- .../com/mingliqiye/utils/http/PageData.kt | 58 +- .../mingliqiye/utils/http/PagedResponse.kt | 334 +- .../com/mingliqiye/utils/http/Response.kt | 298 +- .../utils/http/okhttp/OkHttpUtils.kt | 284 +- .../mingliqiye/utils/io/InputStreamUtils.kt | 4 +- .../kotlin/com/mingliqiye/utils/io/SIO.kt | 426 +- .../mingliqiye/utils/jna/FieldStructure.kt | 56 +- .../com/mingliqiye/utils/json/api/JSONA.kt | 1102 +- .../utils/json/api/Jackson3JsonApi.kt | 410 +- .../utils/json/api/JacksonJsonApi.kt | 578 +- .../mingliqiye/utils/json/api/base/JsonApi.kt | 1014 +- .../utils/json/api/type/JsonTypeReference.kt | 252 +- .../utils/json/api/type/JsonTypeUtils.kt | 186 +- .../utils/json/api/type/TypeReference.kt | 96 +- .../json/converters/DateTimeJsonConverter.kt | 122 +- .../json/converters/UUIDJsonConverter.kt | 118 +- .../json/converters/base/AnnotationGetter.kt | 94 +- .../base/BaseJsonBigDecimalConverter.kt | 22 +- .../base/BaseJsonBigIntegerConverter.kt | 18 +- .../base/BaseJsonBooleanConverter.kt | 22 +- .../converters/base/BaseJsonByteConverter.kt | 16 +- .../base/BaseJsonDoubleConverter.kt | 16 +- .../converters/base/BaseJsonFloatConverter.kt | 22 +- .../converters/base/BaseJsonIntConverter.kt | 22 +- .../converters/base/BaseJsonLongConverter.kt | 16 +- .../converters/base/BaseJsonShortConverter.kt | 22 +- .../base/BaseJsonStringConverter.kt | 22 +- .../converters/base/JackJson3Deserializer.kt | 48 +- .../converters/base/JackJson3Serializer.kt | 62 +- .../converters/base/JackJsonDeserializer.kt | 48 +- .../converters/base/JackJsonSerializer.kt | 94 +- .../json/converters/base/JsonConverter.kt | 104 +- .../converters/base/JsonConverterUtils.kt | 48 +- .../utils/json/objects/base/JsonObject.kt | 352 +- .../mingliqiye/utils/logger/MingLiLogger.kt | 674 +- .../utils/logger/MingLiLoggerFactory.kt | 122 +- .../utils/logger/MingLiLoggerLevel.kt | 10 +- .../kotlin/com/mingliqiye/utils/map/Maps.kt | 134 +- .../com/mingliqiye/utils/math/MathUtils.kt | 10 +- .../com/mingliqiye/utils/metadata/MetaData.kt | 42 +- .../utils/metadata/MingliUtilsMetaData.kt | 14 +- .../com/mingliqiye/utils/mybatis/CallType.kt | 30 +- .../utils/mybatis/QuickBaseTypeHandler.kt | 162 +- .../datetime/DateTimeTypeHandler.kt | 60 +- .../mysql/uuid/MysqlUUIDBinaryTypeHandler.kt | 88 +- .../pgsql/uuid/PgsqlUUIDTypeHandler.kt | 50 +- .../utils/mybatisplus/FastBaseIService.kt | 1508 +- .../utils/mybatisplus/FastBaseMapper.kt | 1636 +- .../mingliqiye/utils/netty/ByteArrayCodec.kt | 70 +- .../utils/netty/ClientScheduleReconnect.kt | 334 +- .../netty/NamedMultiThreadIoEventLoopGroup.kt | 22 +- .../utils/netty/NamedNioEventLoopGroup.kt | 18 +- .../utils/netty/NamedThreadFactory.kt | 136 +- .../mingliqiye/utils/netty/NettyBaseCodec.kt | 124 +- .../utils/netty/NettyBaseDecoder.kt | 114 +- .../utils/netty/NettyBaseEncoder.kt | 142 +- .../com/mingliqiye/utils/netty/NettyUtils.kt | 140 +- .../utils/network/NetworkAddress.kt | 368 +- .../utils/network/NetworkEndpoint.kt | 324 +- .../utils/network/NetworkException.kt | 24 +- .../mingliqiye/utils/network/NetworkPort.kt | 108 +- .../mingliqiye/utils/objects/BooleanUtils.kt | 20 +- .../com/mingliqiye/utils/objects/NullUtils.kt | 24 +- .../com/mingliqiye/utils/path/OsPath.kt | 110 +- .../com/mingliqiye/utils/pool/ObjectPool.kt | 278 +- .../mingliqiye/utils/pool/ObjectPoolData.kt | 12 +- .../kotlin/com/mingliqiye/utils/pool/Pool.kt | 72 +- .../com/mingliqiye/utils/random/Random.kt | 478 +- .../mingliqiye/utils/reflect/ReflectUtils.kt | 36 +- .../RequireLayzExceptionConstructor.kt | 2 +- .../require/RequireLayzMessageConstructor.kt | 2 +- .../mingliqiye/utils/require/RequireTrue.kt | 198 +- .../utils/resource/ResourceUtils.kt | 244 +- .../com/mingliqiye/utils/security/AesUtils.kt | 22 +- .../mingliqiye/utils/security/SecureUtils.kt | 16 +- .../com/mingliqiye/utils/sleep/SleepUtils.kt | 92 +- .../annotation/ApplicationDestroyedRunner.kt | 2 +- .../annotation/ApplicationStartedRunner.kt | 2 +- .../utils/springboot/annotation/Listener.kt | 4 +- .../autoconfigure/AutoConfiguration.kt | 22 +- .../Jackson3AutoConfiguration.kt | 62 +- .../Jackson3JsonApiAutoConfiguration.kt | 74 +- .../JacksonJsonApiAutoConfiguration.kt | 52 +- .../JacksonJsonAutoConfiguration.kt | 46 +- .../autoconfigure/Okhttp3AutoConfiguration.kt | 112 +- .../autoconfigure/builder/OkhttpBuilder.kt | 2 +- .../utils/springboot/bean/SpringBeanUtils.kt | 120 +- .../converters/DateTimeToStringConverter.kt | 6 +- .../converters/StringToDateTimeConverter.kt | 6 +- .../converters/StringToUUIDConverter.kt | 6 +- .../converters/UUIDToStringConverter.kt | 6 +- .../listener/ApplicationListener.kt | 120 +- .../listener/ApplicationRunnerData.kt | 8 +- .../utils/stream/SuprtStreamUtils.kt | 162 +- .../mingliqiye/utils/string/StringUtils.kt | 252 +- .../com/mingliqiye/utils/system/SystemUtil.kt | 128 +- .../com/mingliqiye/utils/thread/AsyncTasks.kt | 114 +- .../utils/thread/GlobalThreadPool.kt | 90 +- .../mingliqiye/utils/thread/ThreadEvent.kt | 208 +- .../com/mingliqiye/utils/thread/ThreadExt.kt | 96 +- .../utils/thread/ThreadLocalDelegates.kt | 16 +- .../utils/thread/ThreadPoolBuilder.kt | 234 +- .../mingliqiye/utils/thread/ThreadPoolExt.kt | 72 +- .../utils/thread/ThreadPoolMonitor.kt | 116 +- .../mingliqiye/utils/thread/ThreadRunner.kt | 134 +- .../mingliqiye/utils/thread/ThreadUtils.kt | 194 +- .../com/mingliqiye/utils/time/DateTime.kt | 898 +- .../mingliqiye/utils/time/DateTimeOffset.kt | 180 +- .../com/mingliqiye/utils/time/Formatter.kt | 118 +- .../com/mingliqiye/utils/tuple/Tuple.kt | 20200 +++++++-------- .../com/mingliqiye/utils/tuple/Tuples.kt | 20426 ++++++++-------- .../com/mingliqiye/utils/uuid/MysqlUUIDv1.kt | 28 +- .../kotlin/com/mingliqiye/utils/uuid/UUID.kt | 1460 +- .../mingliqiye/utils/uuid/UUIDFormatType.kt | 40 +- .../mingliqiye/utils/version/VersionUtils.kt | 53 +- 195 files changed, 37684 insertions(+), 37406 deletions(-) diff --git a/src/main/kotlin/com/mingliqiye/utils/aes/AesUtils.kt b/src/main/kotlin/com/mingliqiye/utils/aes/AesUtils.kt index 9d20421..b740beb 100644 --- a/src/main/kotlin/com/mingliqiye/utils/aes/AesUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/aes/AesUtils.kt @@ -50,30 +50,30 @@ val SECURE_RANDOM = SecureRandom() */ @Throws(GeneralSecurityException::class) fun encrypt(sSrc: String, sKey: String?): String? { - if (sKey == null) { - return null - } + if (sKey == null) { + return null + } - // 生成密钥 - val secretKeySpec = createSecretKey(sKey) + // 生成密钥 + val secretKeySpec = createSecretKey(sKey) - // 生成安全随机IV - val iv = ByteArray(GCM_IV_LENGTH) - SECURE_RANDOM.nextBytes(iv) + // 生成安全随机IV + val iv = ByteArray(GCM_IV_LENGTH) + SECURE_RANDOM.nextBytes(iv) - // 初始化加密器 - val cipher = Cipher.getInstance(TRANSFORMATION) - val gcmParameterSpec = GCMParameterSpec( - GCM_TAG_LENGTH * 8, iv - ) - cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, gcmParameterSpec) + // 初始化加密器 + val cipher = Cipher.getInstance(TRANSFORMATION) + val gcmParameterSpec = GCMParameterSpec( + GCM_TAG_LENGTH * 8, iv + ) + cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, gcmParameterSpec) - val encrypted = cipher.doFinal( - sSrc.toByteArray(StandardCharsets.UTF_8) - ) - return BaseType.BASE64.encode( - "${BaseType.BASE64.encode(iv)}:${BaseType.BASE64.encode(encrypted)}".toByteArray() - ) + val encrypted = cipher.doFinal( + sSrc.toByteArray(StandardCharsets.UTF_8) + ) + return BaseType.BASE64.encode( + "${BaseType.BASE64.encode(iv)}:${BaseType.BASE64.encode(encrypted)}".toByteArray() + ) } /** @@ -83,29 +83,29 @@ fun encrypt(sSrc: String, sKey: String?): String? { * @return 解密后的原始字符串 */ fun decrypt(sSrc: String, sKey: String): String? { - try { - // 分割IV和加密数据 - val sSrcs = String(BaseType.BASE64.decode(sSrc)) - val parts: Array = sSrcs.split(":".toRegex(), limit = 2).toTypedArray() - if (parts.size != 2) { - return null - } - val iv = BaseType.BASE64.decode(parts[0]!!) - val encryptedData = BaseType.BASE64.decode(parts[1]!!) - if (iv.size != GCM_IV_LENGTH) { - return null - } - val secretKeySpec = createSecretKey(sKey) - val cipher = Cipher.getInstance(TRANSFORMATION) - val gcmParameterSpec = GCMParameterSpec( - GCM_TAG_LENGTH * 8, iv - ) - cipher.init(Cipher.DECRYPT_MODE, secretKeySpec, gcmParameterSpec) - val original = cipher.doFinal(encryptedData) - return String(original, StandardCharsets.UTF_8) - } catch (e: Exception) { - return null - } + try { + // 分割IV和加密数据 + val sSrcs = String(BaseType.BASE64.decode(sSrc)) + val parts: Array = sSrcs.split(":".toRegex(), limit = 2).toTypedArray() + if (parts.size != 2) { + return null + } + val iv = BaseType.BASE64.decode(parts[0]!!) + val encryptedData = BaseType.BASE64.decode(parts[1]!!) + if (iv.size != GCM_IV_LENGTH) { + return null + } + val secretKeySpec = createSecretKey(sKey) + val cipher = Cipher.getInstance(TRANSFORMATION) + val gcmParameterSpec = GCMParameterSpec( + GCM_TAG_LENGTH * 8, iv + ) + cipher.init(Cipher.DECRYPT_MODE, secretKeySpec, gcmParameterSpec) + val original = cipher.doFinal(encryptedData) + return String(original, StandardCharsets.UTF_8) + } catch (e: Exception) { + return null + } } /** @@ -116,8 +116,8 @@ fun decrypt(sSrc: String, sKey: String): String? { */ @Throws(Exception::class) private fun createSecretKey(sKey: String): SecretKeySpec { - val key = sKey.toByteArray(StandardCharsets.UTF_8) - val md = MessageDigest.getInstance("MD5") - val digest = md.digest(key) - return SecretKeySpec(digest, ALGORITHM) + val key = sKey.toByteArray(StandardCharsets.UTF_8) + val md = MessageDigest.getInstance("MD5") + val digest = md.digest(key) + return SecretKeySpec(digest, ALGORITHM) } diff --git a/src/main/kotlin/com/mingliqiye/utils/annotation/AutoService.kt b/src/main/kotlin/com/mingliqiye/utils/annotation/AutoService.kt index 1eee2b2..c1a5788 100644 --- a/src/main/kotlin/com/mingliqiye/utils/annotation/AutoService.kt +++ b/src/main/kotlin/com/mingliqiye/utils/annotation/AutoService.kt @@ -37,5 +37,5 @@ import kotlin.reflect.KClass @Target(AnnotationTarget.CLASS) @Retention(AnnotationRetention.SOURCE) annotation class AutoService( - val value: Array> = [] + val value: Array> = [], ) diff --git a/src/main/kotlin/com/mingliqiye/utils/annotation/DateTimeJsonFormat.kt b/src/main/kotlin/com/mingliqiye/utils/annotation/DateTimeJsonFormat.kt index a2b0466..8dd2722 100644 --- a/src/main/kotlin/com/mingliqiye/utils/annotation/DateTimeJsonFormat.kt +++ b/src/main/kotlin/com/mingliqiye/utils/annotation/DateTimeJsonFormat.kt @@ -33,7 +33,7 @@ import com.mingliqiye.utils.time.Formatter */ @Target(AnnotationTarget.FIELD) annotation class DateTimeJsonFormat( - val value: Formatter = Formatter.NONE, - val formatter: String = "", - val repcZero: Boolean = true, + val value: Formatter = Formatter.NONE, + val formatter: String = "", + val repcZero: Boolean = true, ) diff --git a/src/main/kotlin/com/mingliqiye/utils/annotation/UUIDJsonFormat.kt b/src/main/kotlin/com/mingliqiye/utils/annotation/UUIDJsonFormat.kt index 7492fab..3d653c8 100644 --- a/src/main/kotlin/com/mingliqiye/utils/annotation/UUIDJsonFormat.kt +++ b/src/main/kotlin/com/mingliqiye/utils/annotation/UUIDJsonFormat.kt @@ -33,6 +33,6 @@ import com.mingliqiye.utils.uuid.UUIDFormatType */ @Target(AnnotationTarget.FIELD) annotation class UUIDJsonFormat( - val value: UUIDFormatType = UUIDFormatType.NO_UPPER_SPACE, - val base: BaseType = BaseType.BASE16 + val value: UUIDFormatType = UUIDFormatType.NO_UPPER_SPACE, + val base: BaseType = BaseType.BASE16, ) diff --git a/src/main/kotlin/com/mingliqiye/utils/annotation/processor/AutoServiceProcessor.kt b/src/main/kotlin/com/mingliqiye/utils/annotation/processor/AutoServiceProcessor.kt index 5e107ff..ae824c9 100644 --- a/src/main/kotlin/com/mingliqiye/utils/annotation/processor/AutoServiceProcessor.kt +++ b/src/main/kotlin/com/mingliqiye/utils/annotation/processor/AutoServiceProcessor.kt @@ -35,70 +35,70 @@ import javax.tools.StandardLocation @SupportedAnnotationTypes("com.mingliqiye.utils.annotation.AutoService") class AutoServiceProcessor : AbstractProcessor() { - override fun init(processingEnv: ProcessingEnvironment) { - super.init(processingEnv) - } + override fun init(processingEnv: ProcessingEnvironment) { + super.init(processingEnv) + } - override fun process( - annotations: Set, - roundEnv: RoundEnvironment, - ): Boolean { + override fun process( + annotations: Set, + roundEnv: RoundEnvironment, + ): Boolean { - val service = mutableMapOf>() - val elements = roundEnv.getElementsAnnotatedWith(AutoService::class.java) - if (elements.isEmpty()) return false - for (element in elements) { - val autoServiceAnnotation = element.getAnnotation(AutoService::class.java) - var asd = (try { - autoServiceAnnotation!!.value.map { it.java.name } - } catch (e: MirroredTypesException) { - e.typeMirrors.map(TypeMirror::toString) - }) + val service = mutableMapOf>() + val elements = roundEnv.getElementsAnnotatedWith(AutoService::class.java) + if (elements.isEmpty()) return false + for (element in elements) { + val autoServiceAnnotation = element.getAnnotation(AutoService::class.java) + var asd = (try { + autoServiceAnnotation!!.value.map { it.java.name } + } catch (e: MirroredTypesException) { + e.typeMirrors.map(TypeMirror::toString) + }) - if (asd.isEmpty()) { - if (element is TypeElement) { - asd = element.interfaces.map { it.toString() } - } - } - for (data in asd) { - var ldata: MutableList? = service[data] - if (ldata == null) { - ldata = mutableListOf() - service[data] = ldata - } - ldata.add(element.toString()) - } - } - processClassAnnotation(service) - return true - } + if (asd.isEmpty()) { + if (element is TypeElement) { + asd = element.interfaces.map { it.toString() } + } + } + for (data in asd) { + var ldata: MutableList? = service[data] + if (ldata == null) { + ldata = mutableListOf() + service[data] = ldata + } + ldata.add(element.toString()) + } + } + processClassAnnotation(service) + return true + } - fun processClassAnnotation(map: Map>) { - map.forEach { (interfaceName, implementations) -> - if (implementations.isEmpty()) { - println("警告: $interfaceName 的实现列表为空!") - return@forEach - } - try { - val serviceFile = processingEnv.filer.createResource( - StandardLocation.CLASS_OUTPUT, - "", - "META-INF/services/$interfaceName" - ) - val content = StringBuilder() - serviceFile.openWriter().use { writer -> - implementations.forEach { impl -> - val line = "$impl\n" - content.append(line) - writer.write(line) - } - writer.flush() - } + fun processClassAnnotation(map: Map>) { + map.forEach { (interfaceName, implementations) -> + if (implementations.isEmpty()) { + println("警告: $interfaceName 的实现列表为空!") + return@forEach + } + try { + val serviceFile = processingEnv.filer.createResource( + StandardLocation.CLASS_OUTPUT, + "", + "META-INF/services/$interfaceName" + ) + val content = StringBuilder() + serviceFile.openWriter().use { writer -> + implementations.forEach { impl -> + val line = "$impl\n" + content.append(line) + writer.write(line) + } + writer.flush() + } - } catch (e: Exception) { - println("文件创建失败: ${e.javaClass.name} - ${e.message}") - e.printStackTrace() - } - } - } + } catch (e: Exception) { + println("文件创建失败: ${e.javaClass.name} - ${e.message}") + e.printStackTrace() + } + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/array/ArrayUtils.kt b/src/main/kotlin/com/mingliqiye/utils/array/ArrayUtils.kt index 4764fbc..07f82e0 100644 --- a/src/main/kotlin/com/mingliqiye/utils/array/ArrayUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/array/ArrayUtils.kt @@ -61,7 +61,7 @@ fun String.toHexByteArray(): ByteArray = BaseType.BASE16.decode(this.lowercase() */ @JvmName("arrayCopy") fun Array.copyTo(dest: Array, srcPos: Int, distPos: Int, len: Int): Array = this.also { - System.arraycopy(this, srcPos, dest, distPos, len) + System.arraycopy(this, srcPos, dest, distPos, len) } /** @@ -76,12 +76,12 @@ fun Array.copyTo(dest: Array, srcPos: Int, distPos: Int, len: Int): Ar */ @JvmName("arrayCopy") fun Array.copyTo(srcPos: Int, distPos: Int, len: Int): Array = - java.lang.reflect.Array.newInstance(this.javaClass.componentType, len).also { - System.arraycopy(this, srcPos, it, distPos, len) - }.let { - @Suppress("UNCHECKED_CAST") - it as Array - } + java.lang.reflect.Array.newInstance(this.javaClass.componentType, len).also { + System.arraycopy(this, srcPos, it, distPos, len) + }.let { + @Suppress("UNCHECKED_CAST") + it as Array + } /** * 将源数组的指定范围复制到当前数组 @@ -96,7 +96,7 @@ fun Array.copyTo(srcPos: Int, distPos: Int, len: Int): Array = */ @JvmName("arrayCopyFrom") fun Array.copyFrom(src: Array, srcPos: Int, distPos: Int, len: Int): Array = this.also { - System.arraycopy(src, srcPos, this, distPos, len) + System.arraycopy(src, srcPos, this, distPos, len) } /* ==================== BooleanArray 扩展 ==================== */ @@ -107,7 +107,7 @@ fun Array.copyFrom(src: Array, srcPos: Int, distPos: Int, len: Int): A */ @JvmName("arrayCopy") fun BooleanArray.copyTo(dest: BooleanArray, srcPos: Int, distPos: Int, len: Int): BooleanArray = this.also { - System.arraycopy(this, srcPos, dest, distPos, len) + System.arraycopy(this, srcPos, dest, distPos, len) } /** @@ -116,9 +116,9 @@ fun BooleanArray.copyTo(dest: BooleanArray, srcPos: Int, distPos: Int, len: Int) */ @JvmName("arrayCopy") fun BooleanArray.copyTo(srcPos: Int, distPos: Int, len: Int): BooleanArray = - BooleanArray(len).also { newArray -> - System.arraycopy(this, srcPos, newArray, distPos, len) - } + BooleanArray(len).also { newArray -> + System.arraycopy(this, srcPos, newArray, distPos, len) + } /** * @see Array.copyFrom @@ -126,7 +126,7 @@ fun BooleanArray.copyTo(srcPos: Int, distPos: Int, len: Int): BooleanArray = */ @JvmName("arrayCopyFrom") fun BooleanArray.copyFrom(src: BooleanArray, srcPos: Int, distPos: Int, len: Int): BooleanArray = this.also { - System.arraycopy(src, srcPos, this, distPos, len) + System.arraycopy(src, srcPos, this, distPos, len) } /* ==================== ByteArray 扩展 ==================== */ @@ -137,7 +137,7 @@ fun BooleanArray.copyFrom(src: BooleanArray, srcPos: Int, distPos: Int, len: Int */ @JvmName("arrayCopy") fun ByteArray.copyTo(dest: ByteArray, srcPos: Int, distPos: Int, len: Int): ByteArray = this.also { - System.arraycopy(this, srcPos, dest, distPos, len) + System.arraycopy(this, srcPos, dest, distPos, len) } /** @@ -146,9 +146,9 @@ fun ByteArray.copyTo(dest: ByteArray, srcPos: Int, distPos: Int, len: Int): Byte */ @JvmName("arrayCopy") fun ByteArray.copyTo(srcPos: Int, distPos: Int, len: Int): ByteArray = - ByteArray(len).also { newArray -> - System.arraycopy(this, srcPos, newArray, distPos, len) - } + ByteArray(len).also { newArray -> + System.arraycopy(this, srcPos, newArray, distPos, len) + } /** * @see Array.copyFrom @@ -156,7 +156,7 @@ fun ByteArray.copyTo(srcPos: Int, distPos: Int, len: Int): ByteArray = */ @JvmName("arrayCopyFrom") fun ByteArray.copyFrom(src: ByteArray, srcPos: Int, distPos: Int, len: Int): ByteArray = this.also { - System.arraycopy(src, srcPos, this, distPos, len) + System.arraycopy(src, srcPos, this, distPos, len) } /* ==================== CharArray 扩展 ==================== */ @@ -167,7 +167,7 @@ fun ByteArray.copyFrom(src: ByteArray, srcPos: Int, distPos: Int, len: Int): Byt */ @JvmName("arrayCopy") fun CharArray.copyTo(dest: CharArray, srcPos: Int, distPos: Int, len: Int): CharArray = this.also { - System.arraycopy(this, srcPos, dest, distPos, len) + System.arraycopy(this, srcPos, dest, distPos, len) } /** @@ -176,9 +176,9 @@ fun CharArray.copyTo(dest: CharArray, srcPos: Int, distPos: Int, len: Int): Char */ @JvmName("arrayCopy") fun CharArray.copyTo(srcPos: Int, distPos: Int, len: Int): CharArray = - CharArray(len).also { newArray -> - System.arraycopy(this, srcPos, newArray, distPos, len) - } + CharArray(len).also { newArray -> + System.arraycopy(this, srcPos, newArray, distPos, len) + } /** * @see Array.copyFrom @@ -186,7 +186,7 @@ fun CharArray.copyTo(srcPos: Int, distPos: Int, len: Int): CharArray = */ @JvmName("arrayCopyFrom") fun CharArray.copyFrom(src: CharArray, srcPos: Int, distPos: Int, len: Int): CharArray = this.also { - System.arraycopy(src, srcPos, this, distPos, len) + System.arraycopy(src, srcPos, this, distPos, len) } /* ==================== DoubleArray 扩展 ==================== */ @@ -197,7 +197,7 @@ fun CharArray.copyFrom(src: CharArray, srcPos: Int, distPos: Int, len: Int): Cha */ @JvmName("arrayCopy") fun DoubleArray.copyTo(dest: DoubleArray, srcPos: Int, distPos: Int, len: Int): DoubleArray = this.also { - System.arraycopy(this, srcPos, dest, distPos, len) + System.arraycopy(this, srcPos, dest, distPos, len) } /** @@ -206,9 +206,9 @@ fun DoubleArray.copyTo(dest: DoubleArray, srcPos: Int, distPos: Int, len: Int): */ @JvmName("arrayCopy") fun DoubleArray.copyTo(srcPos: Int, distPos: Int, len: Int): DoubleArray = - DoubleArray(len).also { newArray -> - System.arraycopy(this, srcPos, newArray, distPos, len) - } + DoubleArray(len).also { newArray -> + System.arraycopy(this, srcPos, newArray, distPos, len) + } /** * @see Array.copyFrom @@ -216,7 +216,7 @@ fun DoubleArray.copyTo(srcPos: Int, distPos: Int, len: Int): DoubleArray = */ @JvmName("arrayCopyFrom") fun DoubleArray.copyFrom(src: DoubleArray, srcPos: Int, distPos: Int, len: Int): DoubleArray = this.also { - System.arraycopy(src, srcPos, this, distPos, len) + System.arraycopy(src, srcPos, this, distPos, len) } /* ==================== FloatArray 扩展 ==================== */ @@ -227,7 +227,7 @@ fun DoubleArray.copyFrom(src: DoubleArray, srcPos: Int, distPos: Int, len: Int): */ @JvmName("arrayCopy") fun FloatArray.copyTo(dest: FloatArray, srcPos: Int, distPos: Int, len: Int): FloatArray = this.also { - System.arraycopy(this, srcPos, dest, distPos, len) + System.arraycopy(this, srcPos, dest, distPos, len) } /** @@ -236,9 +236,9 @@ fun FloatArray.copyTo(dest: FloatArray, srcPos: Int, distPos: Int, len: Int): Fl */ @JvmName("arrayCopy") fun FloatArray.copyTo(srcPos: Int, distPos: Int, len: Int): FloatArray = - FloatArray(len).also { newArray -> - System.arraycopy(this, srcPos, newArray, distPos, len) - } + FloatArray(len).also { newArray -> + System.arraycopy(this, srcPos, newArray, distPos, len) + } /** * @see Array.copyFrom @@ -246,7 +246,7 @@ fun FloatArray.copyTo(srcPos: Int, distPos: Int, len: Int): FloatArray = */ @JvmName("arrayCopyFrom") fun FloatArray.copyFrom(src: FloatArray, srcPos: Int, distPos: Int, len: Int): FloatArray = this.also { - System.arraycopy(src, srcPos, this, distPos, len) + System.arraycopy(src, srcPos, this, distPos, len) } /* ==================== IntArray 扩展 ==================== */ @@ -257,7 +257,7 @@ fun FloatArray.copyFrom(src: FloatArray, srcPos: Int, distPos: Int, len: Int): F */ @JvmName("arrayCopy") fun IntArray.copyTo(dest: IntArray, srcPos: Int, distPos: Int, len: Int): IntArray = this.also { - System.arraycopy(this, srcPos, dest, distPos, len) + System.arraycopy(this, srcPos, dest, distPos, len) } /** @@ -266,9 +266,9 @@ fun IntArray.copyTo(dest: IntArray, srcPos: Int, distPos: Int, len: Int): IntArr */ @JvmName("arrayCopy") fun IntArray.copyTo(srcPos: Int, distPos: Int, len: Int): IntArray = - IntArray(len).also { newArray -> - System.arraycopy(this, srcPos, newArray, distPos, len) - } + IntArray(len).also { newArray -> + System.arraycopy(this, srcPos, newArray, distPos, len) + } /** * @see Array.copyFrom @@ -276,7 +276,7 @@ fun IntArray.copyTo(srcPos: Int, distPos: Int, len: Int): IntArray = */ @JvmName("arrayCopyFrom") fun IntArray.copyFrom(src: IntArray, srcPos: Int, distPos: Int, len: Int): IntArray = this.also { - System.arraycopy(src, srcPos, this, distPos, len) + System.arraycopy(src, srcPos, this, distPos, len) } /* ==================== LongArray 扩展 ==================== */ @@ -287,7 +287,7 @@ fun IntArray.copyFrom(src: IntArray, srcPos: Int, distPos: Int, len: Int): IntAr */ @JvmName("arrayCopy") fun LongArray.copyTo(dest: LongArray, srcPos: Int, distPos: Int, len: Int): LongArray = this.also { - System.arraycopy(this, srcPos, dest, distPos, len) + System.arraycopy(this, srcPos, dest, distPos, len) } /** @@ -296,9 +296,9 @@ fun LongArray.copyTo(dest: LongArray, srcPos: Int, distPos: Int, len: Int): Long */ @JvmName("arrayCopy") fun LongArray.copyTo(srcPos: Int, distPos: Int, len: Int): LongArray = - LongArray(len).also { newArray -> - System.arraycopy(this, srcPos, newArray, distPos, len) - } + LongArray(len).also { newArray -> + System.arraycopy(this, srcPos, newArray, distPos, len) + } /** * @see Array.copyFrom @@ -306,7 +306,7 @@ fun LongArray.copyTo(srcPos: Int, distPos: Int, len: Int): LongArray = */ @JvmName("arrayCopyFrom") fun LongArray.copyFrom(src: LongArray, srcPos: Int, distPos: Int, len: Int): LongArray = this.also { - System.arraycopy(src, srcPos, this, distPos, len) + System.arraycopy(src, srcPos, this, distPos, len) } /* ==================== ShortArray 扩展 ==================== */ @@ -317,7 +317,7 @@ fun LongArray.copyFrom(src: LongArray, srcPos: Int, distPos: Int, len: Int): Lon */ @JvmName("arrayCopy") fun ShortArray.copyTo(dest: ShortArray, srcPos: Int, distPos: Int, len: Int): ShortArray = this.also { - System.arraycopy(this, srcPos, dest, distPos, len) + System.arraycopy(this, srcPos, dest, distPos, len) } /** @@ -326,9 +326,9 @@ fun ShortArray.copyTo(dest: ShortArray, srcPos: Int, distPos: Int, len: Int): Sh */ @JvmName("arrayCopy") fun ShortArray.copyTo(srcPos: Int, distPos: Int, len: Int): ShortArray = - ShortArray(len).also { newArray -> - System.arraycopy(this, srcPos, newArray, distPos, len) - } + ShortArray(len).also { newArray -> + System.arraycopy(this, srcPos, newArray, distPos, len) + } /** * @see Array.copyFrom @@ -336,5 +336,5 @@ fun ShortArray.copyTo(srcPos: Int, distPos: Int, len: Int): ShortArray = */ @JvmName("arrayCopyFrom") fun ShortArray.copyFrom(src: ShortArray, srcPos: Int, distPos: Int, len: Int): ShortArray = this.also { - System.arraycopy(src, srcPos, this, distPos, len) + System.arraycopy(src, srcPos, this, distPos, len) } diff --git a/src/main/kotlin/com/mingliqiye/utils/base/Base10Codec.kt b/src/main/kotlin/com/mingliqiye/utils/base/Base10Codec.kt index 15a78fd..484e643 100644 --- a/src/main/kotlin/com/mingliqiye/utils/base/Base10Codec.kt +++ b/src/main/kotlin/com/mingliqiye/utils/base/Base10Codec.kt @@ -26,43 +26,43 @@ import java.math.BigInteger internal class Base10Codec : BaseCodec { - /** - * 将字节数组编码为Base10字符串(十进制) - * - * @param bytes 需要编码的字节数组 - * @return 编码后的Base10字符串(十进制数字) - */ - override fun encode(bytes: ByteArray): String { - if (bytes.isEmpty()) return "0" + /** + * 将字节数组编码为Base10字符串(十进制) + * + * @param bytes 需要编码的字节数组 + * @return 编码后的Base10字符串(十进制数字) + */ + override fun encode(bytes: ByteArray): String { + if (bytes.isEmpty()) return "0" - // 将字节数组转换为正的大整数 - val bigInt = BigInteger(1, bytes) // 参数1表示正数 - return bigInt.toString(10) // 转换为10进制字符串 - } + // 将字节数组转换为正的大整数 + val bigInt = BigInteger(1, bytes) // 参数1表示正数 + return bigInt.toString(10) // 转换为10进制字符串 + } - /** - * 将Base10字符串解码为字节数组 - * - * @param string 需要解码的Base10字符串(十进制数字) - * @return 解码后的字节数组 - */ - override fun decode(string: String): ByteArray { - // 验证输入是否为有效的十进制数字 - if (!string.matches(Regex("\\d+"))) { - throw IllegalArgumentException("Base10字符串只能包含数字0-9") - } + /** + * 将Base10字符串解码为字节数组 + * + * @param string 需要解码的Base10字符串(十进制数字) + * @return 解码后的字节数组 + */ + override fun decode(string: String): ByteArray { + // 验证输入是否为有效的十进制数字 + if (!string.matches(Regex("\\d+"))) { + throw IllegalArgumentException("Base10字符串只能包含数字0-9") + } - val bigInt = BigInteger(string, 10) // 从10进制解析 + val bigInt = BigInteger(string, 10) // 从10进制解析 - // 转换为字节数组,并确保保留前导零 - var byteArray = bigInt.toByteArray() + // 转换为字节数组,并确保保留前导零 + var byteArray = bigInt.toByteArray() - // BigInteger.toByteArray() 可能会添加一个符号字节 - // 对于正数,如果第一个字节是0,需要移除它 - if (byteArray.isNotEmpty() && byteArray[0] == 0.toByte()) { - byteArray = byteArray.copyOfRange(1, byteArray.size) - } + // BigInteger.toByteArray() 可能会添加一个符号字节 + // 对于正数,如果第一个字节是0,需要移除它 + if (byteArray.isNotEmpty() && byteArray[0] == 0.toByte()) { + byteArray = byteArray.copyOfRange(1, byteArray.size) + } - return byteArray - } + return byteArray + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/base/Base16Codec.kt b/src/main/kotlin/com/mingliqiye/utils/base/Base16Codec.kt index f4f6125..c0955c6 100644 --- a/src/main/kotlin/com/mingliqiye/utils/base/Base16Codec.kt +++ b/src/main/kotlin/com/mingliqiye/utils/base/Base16Codec.kt @@ -27,28 +27,28 @@ package com.mingliqiye.utils.base * 提供字节数组与十六进制字符串之间的相互转换功能 */ internal class Base16Codec : BaseCodec { - /** - * 将字节数组编码为十六进制字符串 - * @param bytes 待编码的字节数组 - * @return 编码后的十六进制字符串,每个字节对应两位十六进制字符 - */ - override fun encode(bytes: ByteArray): String { - // 将每个字节转换为两位十六进制字符串并拼接 - return bytes.joinToString("") { - it.toInt().and(0xff).toString(16).padStart(2, '0') - } - } + /** + * 将字节数组编码为十六进制字符串 + * @param bytes 待编码的字节数组 + * @return 编码后的十六进制字符串,每个字节对应两位十六进制字符 + */ + override fun encode(bytes: ByteArray): String { + // 将每个字节转换为两位十六进制字符串并拼接 + return bytes.joinToString("") { + it.toInt().and(0xff).toString(16).padStart(2, '0') + } + } - /** - * 将十六进制字符串解码为字节数组 - * @param string 待解码的十六进制字符串 - * @return 解码后的字节数组 - */ - override fun decode(string: String): ByteArray { - // 按每两个字符分组,转换为字节 - return string.chunked(2).map { - it.toInt(16).toByte() - }.toByteArray() - } + /** + * 将十六进制字符串解码为字节数组 + * @param string 待解码的十六进制字符串 + * @return 解码后的字节数组 + */ + override fun decode(string: String): ByteArray { + // 按每两个字符分组,转换为字节 + return string.chunked(2).map { + it.toInt(16).toByte() + }.toByteArray() + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/base/Base256Codec.kt b/src/main/kotlin/com/mingliqiye/utils/base/Base256Codec.kt index 92c6e79..aeec2ea 100644 --- a/src/main/kotlin/com/mingliqiye/utils/base/Base256Codec.kt +++ b/src/main/kotlin/com/mingliqiye/utils/base/Base256Codec.kt @@ -32,282 +32,282 @@ package com.mingliqiye.utils.base */ internal class Base256Codec : BaseCodec { - companion object { - val code = arrayOf( - '!', - '#', - '$', - '%', - '&', - '(', - ')', - '*', - '+', - ',', - '-', - '.', - '/', - '0', - '1', - '2', - '3', - '4', - '5', - '6', - '7', - '8', - '9', - ':', - ';', - '<', - '=', - '>', - '?', - '@', - 'A', - 'B', - 'C', - 'D', - 'E', - 'F', - 'G', - 'H', - 'I', - 'J', - 'K', - 'L', - 'M', - 'N', - 'O', - 'P', - 'Q', - 'R', - 'S', - 'T', - 'U', - 'V', - 'W', - 'X', - 'Y', - 'Z', - '[', - ']', - '^', - '_', - '`', - 'a', - 'b', - 'c', - 'd', - 'e', - 'f', - 'g', - 'h', - 'i', - 'j', - 'k', - 'l', - 'm', - 'n', - 'o', - 'p', - 'q', - 'r', - 's', - 't', - 'u', - 'v', - 'w', - 'x', - 'y', - 'z', - '{', - '|', - '}', - '~', - '§', - '±', - '×', - '÷', - '←', - '↑', - '→', - '↓', - '⇒', - '⇔', - '∀', - '∃', - '∅', - '∆', - '∇', - '∈', - '∉', - '∋', - '∌', - '∏', - '∑', - '−', - '∓', - '∕', - '∗', - '∘', - '∙', - '√', - '∛', - '∜', - '∞', - '∟', - '∠', - '∣', - '∥', - '∧', - '∨', - '∩', - '∪', - '∫', - '∬', - '∭', - '∮', - '∯', - '∰', - '∱', - '∲', - '∳', - '∴', - '∵', - '∶', - '∷', - '≈', - '≠', - '≡', - '≤', - '≥', - '≦', - '≧', - '≪', - '≫', - '≺', - '≻', - '⊂', - '⊃', - '⊆', - '⊇', - '⊈', - '⊉', - '⊊', - '⊋', - '⊕', - '⊖', - '⊗', - '⊘', - '⊙', - '⊚', - '⊛', - '⊜', - '⊝', - '⊞', - '⊟', - '⊠', - '⊡', - '⊢', - '⊣', - '⊤', - '⊥', - '⊦', - '⊧', - '⊨', - '⊩', - '⊪', - '⊫', - '⊬', - '⊭', - '⊮', - '⊯', - '⋀', - '⋁', - '⋂', - '⋃', - '⋄', - '⋅', - '⋆', - '⋇', - '⋈', - '⋉', - '⋊', - '⋋', - '⋌', - '⋍', - '⋎', - '⋏', - '⋐', - '⋑', - '⋒', - '⋓', - '⋔', - '⋕', - '⋖', - '⋗', - '⋘', - '⋙', - '⋚', - '⋛', - '⋜', - '⋝', - '⋞', - '⋟', - '⋠', - '⋡', - '⋢', - '⋣', - '⋤', - '⋥', - '⋦', - '⋧', - '⋨', - '⋩', - '▁', - '▂', - '▃', - '▄', - '▅', - '▆', - '▇', - '█', - '▉', - '▊', - '▋', - '▌', - '▍', - '▎', - '▏', - '▐', - '░', - '▒', - '▓', - '▔', - '▕', - '▖', - '▗', - '▘', - '▙' - ) - val codeMap = code.mapIndexed { index, c -> c to index }.toMap() - } + companion object { + val code = arrayOf( + '!', + '#', + '$', + '%', + '&', + '(', + ')', + '*', + '+', + ',', + '-', + '.', + '/', + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + ':', + ';', + '<', + '=', + '>', + '?', + '@', + 'A', + 'B', + 'C', + 'D', + 'E', + 'F', + 'G', + 'H', + 'I', + 'J', + 'K', + 'L', + 'M', + 'N', + 'O', + 'P', + 'Q', + 'R', + 'S', + 'T', + 'U', + 'V', + 'W', + 'X', + 'Y', + 'Z', + '[', + ']', + '^', + '_', + '`', + 'a', + 'b', + 'c', + 'd', + 'e', + 'f', + 'g', + 'h', + 'i', + 'j', + 'k', + 'l', + 'm', + 'n', + 'o', + 'p', + 'q', + 'r', + 's', + 't', + 'u', + 'v', + 'w', + 'x', + 'y', + 'z', + '{', + '|', + '}', + '~', + '§', + '±', + '×', + '÷', + '←', + '↑', + '→', + '↓', + '⇒', + '⇔', + '∀', + '∃', + '∅', + '∆', + '∇', + '∈', + '∉', + '∋', + '∌', + '∏', + '∑', + '−', + '∓', + '∕', + '∗', + '∘', + '∙', + '√', + '∛', + '∜', + '∞', + '∟', + '∠', + '∣', + '∥', + '∧', + '∨', + '∩', + '∪', + '∫', + '∬', + '∭', + '∮', + '∯', + '∰', + '∱', + '∲', + '∳', + '∴', + '∵', + '∶', + '∷', + '≈', + '≠', + '≡', + '≤', + '≥', + '≦', + '≧', + '≪', + '≫', + '≺', + '≻', + '⊂', + '⊃', + '⊆', + '⊇', + '⊈', + '⊉', + '⊊', + '⊋', + '⊕', + '⊖', + '⊗', + '⊘', + '⊙', + '⊚', + '⊛', + '⊜', + '⊝', + '⊞', + '⊟', + '⊠', + '⊡', + '⊢', + '⊣', + '⊤', + '⊥', + '⊦', + '⊧', + '⊨', + '⊩', + '⊪', + '⊫', + '⊬', + '⊭', + '⊮', + '⊯', + '⋀', + '⋁', + '⋂', + '⋃', + '⋄', + '⋅', + '⋆', + '⋇', + '⋈', + '⋉', + '⋊', + '⋋', + '⋌', + '⋍', + '⋎', + '⋏', + '⋐', + '⋑', + '⋒', + '⋓', + '⋔', + '⋕', + '⋖', + '⋗', + '⋘', + '⋙', + '⋚', + '⋛', + '⋜', + '⋝', + '⋞', + '⋟', + '⋠', + '⋡', + '⋢', + '⋣', + '⋤', + '⋥', + '⋦', + '⋧', + '⋨', + '⋩', + '▁', + '▂', + '▃', + '▄', + '▅', + '▆', + '▇', + '█', + '▉', + '▊', + '▋', + '▌', + '▍', + '▎', + '▏', + '▐', + '░', + '▒', + '▓', + '▔', + '▕', + '▖', + '▗', + '▘', + '▙' + ) + val codeMap = code.mapIndexed { index, c -> c to index }.toMap() + } - override fun encode(bytes: ByteArray): String { - val result = CharArray(bytes.size) - for (i in bytes.indices) { - val unsignedByte = bytes[i].toInt() and 0xFF - result[i] = code[unsignedByte] - } - return String(result) - } + override fun encode(bytes: ByteArray): String { + val result = CharArray(bytes.size) + for (i in bytes.indices) { + val unsignedByte = bytes[i].toInt() and 0xFF + result[i] = code[unsignedByte] + } + return String(result) + } - override fun decode(string: String): ByteArray { - val result = ByteArray(string.length) - for (i in string.indices) { - result[i] = codeMap[string[i]]!!.toByte() - } - return result - } + override fun decode(string: String): ByteArray { + val result = ByteArray(string.length) + for (i in string.indices) { + result[i] = codeMap[string[i]]!!.toByte() + } + return result + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/base/Base2Codec.kt b/src/main/kotlin/com/mingliqiye/utils/base/Base2Codec.kt index 1232267..f34da80 100644 --- a/src/main/kotlin/com/mingliqiye/utils/base/Base2Codec.kt +++ b/src/main/kotlin/com/mingliqiye/utils/base/Base2Codec.kt @@ -23,37 +23,37 @@ package com.mingliqiye.utils.base internal class Base2Codec : BaseCodec { - override fun encode(bytes: ByteArray): String { - if (bytes.isEmpty()) return "" - val result = StringBuilder() - for ((index, byte) in bytes.withIndex()) { - val unsignedByte = byte.toInt() and 0xFF - val binary = unsignedByte.toString(2).padStart(8, '0') - result.append(binary) - } - return result.toString() - } + override fun encode(bytes: ByteArray): String { + if (bytes.isEmpty()) return "" + val result = StringBuilder() + for ((index, byte) in bytes.withIndex()) { + val unsignedByte = byte.toInt() and 0xFF + val binary = unsignedByte.toString(2).padStart(8, '0') + result.append(binary) + } + return result.toString() + } - override fun decode(string: String): ByteArray { - if (string.length % 8 != 0) { - throw IllegalArgumentException( - "BASE1字符串长度必须是8的倍数,当前长度: ${string.length}" - ) - } - if (!string.matches(Regex("[01]+"))) { - throw IllegalArgumentException( - "BASE1字符串只能包含字符'0'和'1'" - ) - } - val byteCount = string.length / 8 - val result = ByteArray(byteCount) - for (i in 0 until byteCount) { - val startIndex = i * 8 - val endIndex = startIndex + 8 - val binaryStr = string.substring(startIndex, endIndex) - val byteValue = binaryStr.toInt(2) - result[i] = byteValue.toByte() - } - return result - } + override fun decode(string: String): ByteArray { + if (string.length % 8 != 0) { + throw IllegalArgumentException( + "BASE1字符串长度必须是8的倍数,当前长度: ${string.length}" + ) + } + if (!string.matches(Regex("[01]+"))) { + throw IllegalArgumentException( + "BASE1字符串只能包含字符'0'和'1'" + ) + } + val byteCount = string.length / 8 + val result = ByteArray(byteCount) + for (i in 0 until byteCount) { + val startIndex = i * 8 + val endIndex = startIndex + 8 + val binaryStr = string.substring(startIndex, endIndex) + val byteValue = binaryStr.toInt(2) + result[i] = byteValue.toByte() + } + return result + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/base/Base64Codec.kt b/src/main/kotlin/com/mingliqiye/utils/base/Base64Codec.kt index eeae1a7..a8d1b81 100644 --- a/src/main/kotlin/com/mingliqiye/utils/base/Base64Codec.kt +++ b/src/main/kotlin/com/mingliqiye/utils/base/Base64Codec.kt @@ -30,35 +30,35 @@ import java.util.* */ internal class Base64Codec : BaseCodec { - /* - * Base64编码器实例 - * 用于执行字节数组到Base64字符串的编码操作 - */ - val encoder: Base64.Encoder = Base64.getEncoder() + /* + * Base64编码器实例 + * 用于执行字节数组到Base64字符串的编码操作 + */ + val encoder: Base64.Encoder = Base64.getEncoder() - /* - * Base64解码器实例 - * 用于执行Base64字符串到字节数组的解码操作 - */ - val decoder: Base64.Decoder = Base64.getDecoder() + /* + * Base64解码器实例 + * 用于执行Base64字符串到字节数组的解码操作 + */ + val decoder: Base64.Decoder = Base64.getDecoder() - /* - * 将字节数组编码为Base64字符串 - * - * @param bytes 待编码的字节数组 - * @return 编码后的Base64字符串 - */ - override fun encode(bytes: ByteArray): String { - return encoder.encodeToString(bytes) - } + /* + * 将字节数组编码为Base64字符串 + * + * @param bytes 待编码的字节数组 + * @return 编码后的Base64字符串 + */ + override fun encode(bytes: ByteArray): String { + return encoder.encodeToString(bytes) + } - /* - * 将Base64字符串解码为字节数组 - * - * @param string 待解码的Base64字符串 - * @return 解码后的字节数组 - */ - override fun decode(string: String): ByteArray { - return decoder.decode(string) - } + /* + * 将Base64字符串解码为字节数组 + * + * @param string 待解码的Base64字符串 + * @return 解码后的字节数组 + */ + override fun decode(string: String): ByteArray { + return decoder.decode(string) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/base/Base64UrlCodec.kt b/src/main/kotlin/com/mingliqiye/utils/base/Base64UrlCodec.kt index aad6cf6..63dbc82 100644 --- a/src/main/kotlin/com/mingliqiye/utils/base/Base64UrlCodec.kt +++ b/src/main/kotlin/com/mingliqiye/utils/base/Base64UrlCodec.kt @@ -26,35 +26,35 @@ import java.util.* internal class Base64UrlCodec : BaseCodec { - /* - * Base64编码器实例 - * 用于执行字节数组到Base64字符串的编码操作 - */ - val encoder: Base64.Encoder = Base64.getUrlEncoder() + /* + * Base64编码器实例 + * 用于执行字节数组到Base64字符串的编码操作 + */ + val encoder: Base64.Encoder = Base64.getUrlEncoder() - /* - * Base64解码器实例 - * 用于执行Base64字符串到字节数组的解码操作 - */ - val decoder: Base64.Decoder = Base64.getUrlDecoder() + /* + * Base64解码器实例 + * 用于执行Base64字符串到字节数组的解码操作 + */ + val decoder: Base64.Decoder = Base64.getUrlDecoder() - /* - * 将字节数组编码为Base64字符串 - * - * @param bytes 待编码的字节数组 - * @return 编码后的Base64字符串 - */ - override fun encode(bytes: ByteArray): String { - return encoder.encodeToString(bytes) - } + /* + * 将字节数组编码为Base64字符串 + * + * @param bytes 待编码的字节数组 + * @return 编码后的Base64字符串 + */ + override fun encode(bytes: ByteArray): String { + return encoder.encodeToString(bytes) + } - /* - * 将Base64字符串解码为字节数组 - * - * @param string 待解码的Base64字符串 - * @return 解码后的字节数组 - */ - override fun decode(string: String): ByteArray { - return decoder.decode(string) - } + /* + * 将Base64字符串解码为字节数组 + * + * @param string 待解码的Base64字符串 + * @return 解码后的字节数组 + */ + override fun decode(string: String): ByteArray { + return decoder.decode(string) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/base/Base91Codec.kt b/src/main/kotlin/com/mingliqiye/utils/base/Base91Codec.kt index a60b372..14961bc 100644 --- a/src/main/kotlin/com/mingliqiye/utils/base/Base91Codec.kt +++ b/src/main/kotlin/com/mingliqiye/utils/base/Base91Codec.kt @@ -29,376 +29,376 @@ package com.mingliqiye.utils.base */ internal class Base91Codec : BaseCodec { - companion object { - /** - * Base91 编码表,共 91 个可打印 ASCII 字符。 - */ - val ENCODING_TABLE: CharArray = charArrayOf( - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', - 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', - 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', - 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '!', '#', '$', - '%', '&', '(', ')', '*', '+', ',', '.', '/', ':', ';', '<', '=', - '>', '?', '@', '[', ']', '^', '_', '`', '{', '|', '}', '~', '"' - ) + companion object { + /** + * Base91 编码表,共 91 个可打印 ASCII 字符。 + */ + val ENCODING_TABLE: CharArray = charArrayOf( + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', + 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', + 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '!', '#', '$', + '%', '&', '(', ')', '*', '+', ',', '.', '/', ':', ';', '<', '=', + '>', '?', '@', '[', ']', '^', '_', '`', '{', '|', '}', '~', '"' + ) - /** - * Base91 解码表,大小为 256,用于快速查找字符对应的数值。 - * 初始化时将所有元素设为 -1,表示无效字符;然后根据 ENCODING_TABLE 填充有效字符的索引。 - */ - val DECODING_TABLE: Array = arrayOf( - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - 62, - 90, - 63, - 64, - 65, - 66, - -1, - 67, - 68, - 69, - 70, - 71, - -1, - 72, - 73, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 81, - -1, - 82, - 83, - 84, - 85, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 86, - 87, - 88, - 89, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1 - ) - } + /** + * Base91 解码表,大小为 256,用于快速查找字符对应的数值。 + * 初始化时将所有元素设为 -1,表示无效字符;然后根据 ENCODING_TABLE 填充有效字符的索引。 + */ + val DECODING_TABLE: Array = arrayOf( + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + 62, + 90, + 63, + 64, + 65, + 66, + -1, + 67, + 68, + 69, + 70, + 71, + -1, + 72, + 73, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 81, + -1, + 82, + 83, + 84, + 85, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 86, + 87, + 88, + 89, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 + ) + } - /** - * 将字节数组编码为 Base91 字符串。 - * - * @param bytes 待编码的字节数组 - * @return 编码后的 Base91 字符串 - */ - override fun encode(bytes: ByteArray): String { - if (bytes.isEmpty()) return "" - val sb = StringBuilder() - var ebq = 0 // 编码缓冲区,用于暂存待处理的位数据 - var en = 0 // 当前缓冲区中的有效位数 + /** + * 将字节数组编码为 Base91 字符串。 + * + * @param bytes 待编码的字节数组 + * @return 编码后的 Base91 字符串 + */ + override fun encode(bytes: ByteArray): String { + if (bytes.isEmpty()) return "" + val sb = StringBuilder() + var ebq = 0 // 编码缓冲区,用于暂存待处理的位数据 + var en = 0 // 当前缓冲区中的有效位数 - for (b in bytes) { - // 将当前字节加入缓冲区 - ebq = ebq or ((b.toInt() and 0xFF) shl en) - en += 8 + for (b in bytes) { + // 将当前字节加入缓冲区 + ebq = ebq or ((b.toInt() and 0xFF) shl en) + en += 8 - // 每当缓冲区中有超过 13 位的数据时,尝试进行编码 - if (en > 13) { - var ev = ebq and 0x1FFF // 取出低 13 位作为候选值 - if (ev > 88) { - // 如果候选值大于 88,则使用 13 位编码 - ebq = ebq shr 13 - en -= 13 - } else { - // 否则使用 14 位编码 - ev = ebq and 0x3FFF - ebq = ebq shr 14 - en -= 14 - } - // 将两个字符追加到结果中 - sb.append(ENCODING_TABLE[ev % 91]) - sb.append(ENCODING_TABLE[ev / 91]) - } - } + // 每当缓冲区中有超过 13 位的数据时,尝试进行编码 + if (en > 13) { + var ev = ebq and 0x1FFF // 取出低 13 位作为候选值 + if (ev > 88) { + // 如果候选值大于 88,则使用 13 位编码 + ebq = ebq shr 13 + en -= 13 + } else { + // 否则使用 14 位编码 + ev = ebq and 0x3FFF + ebq = ebq shr 14 + en -= 14 + } + // 将两个字符追加到结果中 + sb.append(ENCODING_TABLE[ev % 91]) + sb.append(ENCODING_TABLE[ev / 91]) + } + } - // 处理剩余未编码的数据 - if (en > 0) { - sb.append(ENCODING_TABLE[ebq % 91]) - if (en > 7 || ebq > 90) { - sb.append(ENCODING_TABLE[ebq / 91]) - } - } + // 处理剩余未编码的数据 + if (en > 0) { + sb.append(ENCODING_TABLE[ebq % 91]) + if (en > 7 || ebq > 90) { + sb.append(ENCODING_TABLE[ebq / 91]) + } + } - return sb.toString() - } + return sb.toString() + } - /** - * 将 Base91 字符串解码为原始字节数组。 - * - * @param string 待解码的 Base91 字符串 - * @return 解码后的字节数组 - */ - override fun decode(string: String): ByteArray { - if (string.isEmpty()) return ByteArray(0) - var dbq = 0 // 解码缓冲区,用于暂存待处理的位数据 - var dn = 0 // 当前缓冲区中的有效位数 - var dv = -1 // 当前读取到的 Base91 值 - val buffer = ByteArray(string.length * 13 / 8) // 预分配输出缓冲区 - var index = 0 // 输出缓冲区写入位置 + /** + * 将 Base91 字符串解码为原始字节数组。 + * + * @param string 待解码的 Base91 字符串 + * @return 解码后的字节数组 + */ + override fun decode(string: String): ByteArray { + if (string.isEmpty()) return ByteArray(0) + var dbq = 0 // 解码缓冲区,用于暂存待处理的位数据 + var dn = 0 // 当前缓冲区中的有效位数 + var dv = -1 // 当前读取到的 Base91 值 + val buffer = ByteArray(string.length * 13 / 8) // 预分配输出缓冲区 + var index = 0 // 输出缓冲区写入位置 - for (c in string.toCharArray()) { - // 忽略不在编码表中的字符 - if (DECODING_TABLE[c.code] == -1) continue + for (c in string.toCharArray()) { + // 忽略不在编码表中的字符 + if (DECODING_TABLE[c.code] == -1) continue - if (dv == -1) { - // 第一次读取字符,保存为 dv - dv = DECODING_TABLE[c.code] - } else { - // 第二次读取字符,组合成完整的 Base91 值 - dv += DECODING_TABLE[c.code] * 91 - dbq = dbq or (dv shl dn) - // 根据值大小判断是 13 位还是 14 位编码 - dn += if ((dv and 0x1FFF) > 88) 13 else 14 + if (dv == -1) { + // 第一次读取字符,保存为 dv + dv = DECODING_TABLE[c.code] + } else { + // 第二次读取字符,组合成完整的 Base91 值 + dv += DECODING_TABLE[c.code] * 91 + dbq = dbq or (dv shl dn) + // 根据值大小判断是 13 位还是 14 位编码 + dn += if ((dv and 0x1FFF) > 88) 13 else 14 - // 将缓冲区中完整的字节写入输出数组 - do { - buffer[index++] = (dbq and 0xFF).toByte() - dbq = dbq shr 8 - dn -= 8 - } while (dn > 7) + // 将缓冲区中完整的字节写入输出数组 + do { + buffer[index++] = (dbq and 0xFF).toByte() + dbq = dbq shr 8 + dn -= 8 + } while (dn > 7) - dv = -1 // 重置 dv,准备下一轮读取 - } - } + dv = -1 // 重置 dv,准备下一轮读取 + } + } - // 处理最后剩余的一个字符(如果存在) - if (dv != -1) { - buffer[index++] = ((dbq or (dv shl dn)) and 0xFF).toByte() - } + // 处理最后剩余的一个字符(如果存在) + if (dv != -1) { + buffer[index++] = ((dbq or (dv shl dn)) and 0xFF).toByte() + } - // 返回实际使用的部分 - return buffer.copyOf(index) - } + // 返回实际使用的部分 + return buffer.copyOf(index) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/base/BaseCodec.kt b/src/main/kotlin/com/mingliqiye/utils/base/BaseCodec.kt index c5f977d..22ddad9 100644 --- a/src/main/kotlin/com/mingliqiye/utils/base/BaseCodec.kt +++ b/src/main/kotlin/com/mingliqiye/utils/base/BaseCodec.kt @@ -33,146 +33,146 @@ import java.nio.file.Path */ interface BaseCodec { - /** - * 对字节数组进行编码,并捕获可能发生的异常。 - * - * @param bytes 需要编码的字节数组 - * @return 编码后的字符串结果 - * @throws CodecException 如果编码过程中发生异常 - */ - fun catchEncode(bytes: ByteArray) = try { - encode(bytes) - } catch (e: Exception) { - throw CodecException(throwable = e) - } + /** + * 对字节数组进行编码,并捕获可能发生的异常。 + * + * @param bytes 需要编码的字节数组 + * @return 编码后的字符串结果 + * @throws CodecException 如果编码过程中发生异常 + */ + fun catchEncode(bytes: ByteArray) = try { + encode(bytes) + } catch (e: Exception) { + throw CodecException(throwable = e) + } - /** - * 对字符串进行解码,并捕获可能发生的异常。 - * - * @param string 需要解码的字符串 - * @return 解码后的字节数组结果 - * @throws CodecException 如果解码过程中发生异常 - */ - fun catchDecode(string: String) = try { - decode(string) - } catch (e: Exception) { - throw CodecException(throwable = e) - } + /** + * 对字符串进行解码,并捕获可能发生的异常。 + * + * @param string 需要解码的字符串 + * @return 解码后的字节数组结果 + * @throws CodecException 如果解码过程中发生异常 + */ + fun catchDecode(string: String) = try { + decode(string) + } catch (e: Exception) { + throw CodecException(throwable = e) + } - /** - * 将字节数组编码为字符串。 - * - * @param bytes 需要编码的字节数组 - * @return 编码后的字符串结果 - */ - fun encode(bytes: ByteArray): String + /** + * 将字节数组编码为字符串。 + * + * @param bytes 需要编码的字节数组 + * @return 编码后的字符串结果 + */ + fun encode(bytes: ByteArray): String - /** - * 将字符串解码为字节数组。 - * - * @param string 需要解码的字符串 - * @return 解码后的字节数组结果 - */ - fun decode(string: String): ByteArray + /** + * 将字符串解码为字节数组。 + * + * @param string 需要解码的字符串 + * @return 解码后的字节数组结果 + */ + fun decode(string: String): ByteArray - /** - * 对文件内容进行编码。 - * - * @param file 需要编码的文件对象 - * @return 文件内容编码后的字符串结果 - */ - fun encode(file: File) = catchEncode(file.readBytes()) + /** + * 对文件内容进行编码。 + * + * @param file 需要编码的文件对象 + * @return 文件内容编码后的字符串结果 + */ + fun encode(file: File) = catchEncode(file.readBytes()) - /** - * 将字符串解码后写入指定文件。 - * - * @param file 目标文件对象 - * @param string 需要解码的字符串 - */ - fun decode(file: File, string: String) = - file.writeBytes(catchDecode(string)) + /** + * 将字符串解码后写入指定文件。 + * + * @param file 目标文件对象 + * @param string 需要解码的字符串 + */ + fun decode(file: File, string: String) = + file.writeBytes(catchDecode(string)) - /** - * 安全地对文件内容进行编码,如果发生异常则返回 null。 - * - * @param file 需要编码的文件对象 - * @return 文件内容编码后的字符串结果,若失败则返回 null - */ - fun encodeSafe(file: File) = try { - encode(file) - } catch (_: Exception) { - null - } + /** + * 安全地对文件内容进行编码,如果发生异常则返回 null。 + * + * @param file 需要编码的文件对象 + * @return 文件内容编码后的字符串结果,若失败则返回 null + */ + fun encodeSafe(file: File) = try { + encode(file) + } catch (_: Exception) { + null + } - /** - * 安全地将字符串解码并写入指定文件,如果成功则返回 true,否则返回 false。 - * - * @param file 目标文件对象 - * @param string 需要解码的字符串 - * @return 操作是否成功的布尔值 - */ - fun decodeSafe(file: File, string: String) = try { - decode(file, string) - true - } catch (_: Exception) { - false - } + /** + * 安全地将字符串解码并写入指定文件,如果成功则返回 true,否则返回 false。 + * + * @param file 目标文件对象 + * @param string 需要解码的字符串 + * @return 操作是否成功的布尔值 + */ + fun decodeSafe(file: File, string: String) = try { + decode(file, string) + true + } catch (_: Exception) { + false + } - /** - * 对路径指向的文件内容进行编码。 - * - * @param path 需要编码的文件路径 - * @return 文件内容编码后的字符串结果 - */ - fun encode(path: Path) = catchEncode(path.toFile().readBytes()) + /** + * 对路径指向的文件内容进行编码。 + * + * @param path 需要编码的文件路径 + * @return 文件内容编码后的字符串结果 + */ + fun encode(path: Path) = catchEncode(path.toFile().readBytes()) - /** - * 将字符串解码后写入指定路径的文件。 - * - * @param path 目标文件路径 - * @param string 需要解码的字符串 - */ - fun decode(path: Path, string: String) = path.toFile().writeBytes(catchDecode(string)) + /** + * 将字符串解码后写入指定路径的文件。 + * + * @param path 目标文件路径 + * @param string 需要解码的字符串 + */ + fun decode(path: Path, string: String) = path.toFile().writeBytes(catchDecode(string)) - /** - * 安全地对路径指向的文件内容进行编码,如果发生异常则返回 null。 - * - * @param path 需要编码的文件路径 - * @return 文件内容编码后的字符串结果,若失败则返回 null - */ - fun encodeSafe(path: Path) = try { - encode(path) - } catch (_: Exception) { - null - } + /** + * 安全地对路径指向的文件内容进行编码,如果发生异常则返回 null。 + * + * @param path 需要编码的文件路径 + * @return 文件内容编码后的字符串结果,若失败则返回 null + */ + fun encodeSafe(path: Path) = try { + encode(path) + } catch (_: Exception) { + null + } - /** - * 安全地将字符串解码并写入指定路径的文件,如果成功则返回 true,否则返回 false。 - * - * @param path 目标文件路径 - * @param string 需要解码的字符串 - * @return 操作是否成功的布尔值 - */ - fun decodeSafe(path: Path, string: String) = try { - decode(path, string) - true - } catch (_: Exception) { - false - } + /** + * 安全地将字符串解码并写入指定路径的文件,如果成功则返回 true,否则返回 false。 + * + * @param path 目标文件路径 + * @param string 需要解码的字符串 + * @return 操作是否成功的布尔值 + */ + fun decodeSafe(path: Path, string: String) = try { + decode(path, string) + true + } catch (_: Exception) { + false + } - /** - * 对字符串进行编码。 - * - * @param string 需要编码的字符串 - * @return 编码后的字符串结果 - */ - fun encode(string: String) = catchEncode(string.toByteArray()) + /** + * 对字符串进行编码。 + * + * @param string 需要编码的字符串 + * @return 编码后的字符串结果 + */ + fun encode(string: String) = catchEncode(string.toByteArray()) - /** - * 将字符串解码为 UTF-8 格式的字符串。 - * - * @param string 需要解码的字符串 - * @return 解码后的 UTF-8 字符串结果 - */ - fun decodetoString(string: String) = catchDecode(string).toString(Charsets.UTF_8) + /** + * 将字符串解码为 UTF-8 格式的字符串。 + * + * @param string 需要解码的字符串 + * @return 解码后的 UTF-8 字符串结果 + */ + fun decodetoString(string: String) = catchDecode(string).toString(Charsets.UTF_8) } diff --git a/src/main/kotlin/com/mingliqiye/utils/base/BaseType.kt b/src/main/kotlin/com/mingliqiye/utils/base/BaseType.kt index 02d0d74..06e71be 100644 --- a/src/main/kotlin/com/mingliqiye/utils/base/BaseType.kt +++ b/src/main/kotlin/com/mingliqiye/utils/base/BaseType.kt @@ -24,15 +24,15 @@ package com.mingliqiye.utils.base enum class BaseType(val baseCodec: BaseCodec) : BaseCodec { - BASE2(com.mingliqiye.utils.base.code.BASE2), - BASE10(com.mingliqiye.utils.base.code.BASE10), - BASE16(com.mingliqiye.utils.base.code.BASE16), - BASE64(com.mingliqiye.utils.base.code.BASE64), - BASE64URL(com.mingliqiye.utils.base.code.BASE64URL), - BASE91(com.mingliqiye.utils.base.code.BASE91), - BASE256(com.mingliqiye.utils.base.code.BASE256); + BASE2(com.mingliqiye.utils.base.code.BASE2), + BASE10(com.mingliqiye.utils.base.code.BASE10), + BASE16(com.mingliqiye.utils.base.code.BASE16), + BASE64(com.mingliqiye.utils.base.code.BASE64), + BASE64URL(com.mingliqiye.utils.base.code.BASE64URL), + BASE91(com.mingliqiye.utils.base.code.BASE91), + BASE256(com.mingliqiye.utils.base.code.BASE256); - override fun encode(bytes: ByteArray) = baseCodec.encode(bytes) - override fun decode(string: String) = baseCodec.decode(string) + override fun encode(bytes: ByteArray) = baseCodec.encode(bytes) + override fun decode(string: String) = baseCodec.decode(string) } diff --git a/src/main/kotlin/com/mingliqiye/utils/base/code/BaseCodes.kt b/src/main/kotlin/com/mingliqiye/utils/base/code/BaseCodes.kt index e5e9c63..e3b8923 100644 --- a/src/main/kotlin/com/mingliqiye/utils/base/code/BaseCodes.kt +++ b/src/main/kotlin/com/mingliqiye/utils/base/code/BaseCodes.kt @@ -32,7 +32,7 @@ import com.mingliqiye.utils.base.* */ @get:JvmName("base2") val BASE2: BaseCodec by lazy { - Base2Codec() + Base2Codec() } /** @@ -41,7 +41,7 @@ val BASE2: BaseCodec by lazy { */ @get:JvmName("base10") val BASE10: BaseCodec by lazy { - Base10Codec() + Base10Codec() } /** @@ -50,7 +50,7 @@ val BASE10: BaseCodec by lazy { */ @get:JvmName("base16") val BASE16: BaseCodec by lazy { - Base16Codec() + Base16Codec() } /** @@ -59,12 +59,12 @@ val BASE16: BaseCodec by lazy { */ @get:JvmName("base64") val BASE64: BaseCodec by lazy { - Base64Codec() + Base64Codec() } @get:JvmName("base64Url") val BASE64URL: BaseCodec by lazy { - Base64UrlCodec() + Base64UrlCodec() } /** @@ -73,7 +73,7 @@ val BASE64URL: BaseCodec by lazy { */ @get:JvmName("base91") val BASE91: BaseCodec by lazy { - Base91Codec() + Base91Codec() } /** @@ -82,5 +82,5 @@ val BASE91: BaseCodec by lazy { */ @get:JvmName("base256") val BASE256: BaseCodec by lazy { - Base256Codec() + Base256Codec() } diff --git a/src/main/kotlin/com/mingliqiye/utils/bcrypt/BCrypt.kt b/src/main/kotlin/com/mingliqiye/utils/bcrypt/BCrypt.kt index 7780a71..35d0d06 100644 --- a/src/main/kotlin/com/mingliqiye/utils/bcrypt/BCrypt.kt +++ b/src/main/kotlin/com/mingliqiye/utils/bcrypt/BCrypt.kt @@ -30,30 +30,30 @@ import org.mindrot.jbcrypt.BCrypt as JBCrypt fun hashpw(string: String): String { - return hashpw(string, gensalt()) + return hashpw(string, gensalt()) } fun hashpw(string: String, salt: String = gensalt()): String { - return JBCrypt.hashpw(string, salt) + return JBCrypt.hashpw(string, salt) } fun checkpw(string: String, bcrypted: String): Boolean { - return JBCrypt.checkpw(string, bcrypted) + return JBCrypt.checkpw(string, bcrypted) } fun gensalt(): String { - return JBCrypt.gensalt() + return JBCrypt.gensalt() } fun gensalt(long: Int): String { - return JBCrypt.gensalt(long) + return JBCrypt.gensalt(long) } fun gensalt(long: Int, secureRandom: SecureRandom): String { - return JBCrypt.gensalt(long, secureRandom) + return JBCrypt.gensalt(long, secureRandom) } diff --git a/src/main/kotlin/com/mingliqiye/utils/buffer/ByteBufferWrapper.kt b/src/main/kotlin/com/mingliqiye/utils/buffer/ByteBufferWrapper.kt index c9d768f..490f69a 100644 --- a/src/main/kotlin/com/mingliqiye/utils/buffer/ByteBufferWrapper.kt +++ b/src/main/kotlin/com/mingliqiye/utils/buffer/ByteBufferWrapper.kt @@ -66,1255 +66,1255 @@ import java.util.concurrent.ConcurrentHashMap * @param buffer 底层的 ByteBuffer 实例(私有构造,通过工厂方法创建) */ class ByteBufferWrapper private constructor(private val buffer: ByteBuffer) { - /** - * 缓冲区容量(总大小) - */ - @get:JvmName("capacity") - val capacity: Int get() = buffer.capacity() - - /** - * 当前位置(读写位置) - */ - @get:JvmName("position") - val position: Int get() = buffer.position() - - /** - * 剩余可读写字节数 - */ - @get:JvmName("remaining") - val remaining: Int get() = buffer.remaining() - - /** - * 是否还有剩余字节 - */ - @get:JvmName("hasRemaining") - val hasRemaining: Boolean get() = buffer.hasRemaining() - - /** - * 限制位置 - */ - @get:JvmName("limit") - val limit: Int get() = buffer.limit() - - /** - * 标记位置(实际 ByteBuffer 没有直接获取 mark 的方法,这里返回当前position) - */ - @get:JvmName("mark") - val mark: Int get() = remaining - - /** - * 是否具有可访问的底层数组 - */ - @get:JvmName("hasArray") - val hasArray: Boolean get() = buffer.hasArray() - - /** - * 获取底层数组(如果存在) - * - * @return 底层字节数组 - * @throws UnsupportedOperationException 如果没有底层数组(如直接缓冲区) - */ - @get:JvmName("array") - val array: ByteArray get() = buffer.array() - - /** - * 转换为整个字节数组 - * - * @return 数组偏移量 - * @throws UnsupportedOperationException 如果没有底层数组 - */ - fun toByteArray(): ByteArray = getByteArray(remaining) - - /** - * 获取底层数组的偏移量 - * - * @return 数组偏移量 - * @throws UnsupportedOperationException 如果没有底层数组 - */ - - @get:JvmName("arrayOffset") - val arrayOffset: Int get() = buffer.arrayOffset() - - /** - * 是否为只读缓冲区 - */ - @get:JvmName("isReadOnly") - val isReadOnly: Boolean get() = buffer.isReadOnly - - /** - * 是否为直接缓冲区(堆外内存) - */ - @get:JvmName("isDirect") - val isDirect: Boolean get() = buffer.isDirect - - /** - * 当前字节序(大端/小端) - */ - @get:JvmName("order") - val byteOrder: ByteOrder get() = buffer.order() - - /** - * 是否为大端字节序 - */ - @get:JvmName("isBigEndian") - val isBigEndian: Boolean get() = byteOrder == ByteOrder.BIG_ENDIAN - - /** - * 是否为小端字节序 - */ - @get:JvmName("isLittleEndian") - val isLittleEndian: Boolean get() = byteOrder == ByteOrder.LITTLE_ENDIAN - - /** - * 缓冲区是否为空(无剩余字节) - */ - @get:JvmName("isEmpty") - val isEmpty: Boolean get() = !hasRemaining - - /** - * 缓冲区是否已满(position == capacity) - */ - @get:JvmName("isFull") - val isFull: Boolean get() = position == capacity - - /** - * 当前位置是否在限制之内 - */ - @get:JvmName("isWithinLimit") - val isWithinLimit: Boolean get() = position < limit - - /** - * 是否已到达限制位置 - */ - @get:JvmName("isAtLimit") - val isAtLimit: Boolean get() = position == limit - - /** - * 获取缓冲区的字符串表示 - * - * @return 格式化的字符串信息 - */ - override fun toString(): String { - return "ByteBufferWrapper(capacity=$capacity, position=$position, limit=$limit, remaining=$remaining)#${hashCode()}" - } - - companion object { - /** - * 包装现有的 ByteBuffer - * - * @param buffer 要包装的 ByteBuffer - * @return 新的 ByteBufferWrapper 实例 - */ - @JvmStatic - fun wrap(buffer: ByteBuffer): ByteBufferWrapper { - return ByteBufferWrapper(buffer) - } - - /** - * 包装现有的 ByteBuf - * - * @param buffer 要包装的 ByteBuf - * @return 新的 ByteBufferWrapper 实例 - */ - @JvmStatic - fun wrap(buffer: ByteBuf): ByteBufferWrapper { - return ByteBufferWrapper(buffer.toByteBuffer()) - } - - /** - * 包装字节数组 - * - * @param array 要包装的字节数组 - * @return 新的 ByteBufferWrapper 实例 - */ - @JvmStatic - fun wrap(array: ByteArray): ByteBufferWrapper { - return ByteBufferWrapper(ByteBuffer.wrap(array)) - } - - /** - * 包装字节数组的一部分 - * - * @param array 要包装的字节数组 - * @param offset 起始偏移量 - * @param length 长度 - * @return 新的 ByteBufferWrapper 实例 - */ - @JvmStatic - fun wrap(array: ByteArray, offset: Int, length: Int): ByteBufferWrapper { - return ByteBufferWrapper(ByteBuffer.wrap(array, offset, length)) - } - - /** - * 分配堆内缓冲区 - * - * @param capacity 缓冲区容量 - * @return 新的 ByteBufferWrapper 实例 - */ - @JvmStatic - fun allocate(capacity: Int): ByteBufferWrapper { - return ByteBufferWrapper(ByteBuffer.allocate(capacity)) - } - - /** - * 分配直接缓冲区(堆外内存) - * 适用于高性能 I/O 场景,但分配和释放成本较高 - * - * @param capacity 缓冲区容量 - * @return 新的 ByteBufferWrapper 实例 - */ - @JvmStatic - fun allocateDirect(capacity: Int): ByteBufferWrapper { - return ByteBufferWrapper(ByteBuffer.allocateDirect(capacity)) - } - - /** - * 添加转换器到映射表,转换器内部通过 getType() 提供自己的类型信息 - * - * @param byteBufferWrapperConvertor 要添加的转换器实例,其泛型类型信息通过 getType() 方法获取 - */ - @JvmStatic - fun addConvertor(byteBufferWrapperConvertor: ByteBufferWrapperConvertor<*>) { - _ByteBufferWrapperConvertorMap[byteBufferWrapperConvertor.getType().kotlin.javaObjectType] = - byteBufferWrapperConvertor - } - - @JvmName("inline_addConvertor") - inline fun > addConvertor() { - addConvertor(ByteBufferWrapperConvertor.getInstantiation()) - } - - /** - * 添加转换器到映射表,显式指定要处理的类型 Class - * - * @param clazz 要处理的类型对应的 Class 对象 - * @param byteBufferWrapperConvertor 与指定类型匹配的转换器实例 - * @param T 要处理的数据类型 - */ - @JvmStatic - fun addConvertor(clazz: Class, byteBufferWrapperConvertor: ByteBufferWrapperConvertor) { - _ByteBufferWrapperConvertorMap[clazz.kotlin.javaObjectType] = byteBufferWrapperConvertor - } - - /** - * 根据类型 Class 从映射表中获取对应的转换器,并进行类型转换 - * - * @param clazz 要获取转换器的类型对应的 Class 对象 - * @param T 要处理的数据类型 - * @return 与指定类型匹配的转换器实例,如果不存在则返回 null - */ - @JvmStatic - @Suppress("UNCHECKED_CAST") - fun getConvertor(clazz: Class): ByteBufferWrapperConvertor? { - return _ByteBufferWrapperConvertorMap[clazz] as? ByteBufferWrapperConvertor - } - - /** - * 从映射表中移除指定类型的转换器 - * - * @param clazz 要移除转换器的类型对应的 Class 对象 - */ - @JvmStatic - fun delectConvertor(clazz: Class<*>) { - _ByteBufferWrapperConvertorMap.remove(clazz) - } - - /** - * 存储类型与转换器映射关系的线程安全哈希表 - * 键:要处理的类型 Class<*> - * 值:对应的转换器实例 ByteBufferWrapperConvertor<*> - */ - private val _ByteBufferWrapperConvertorMap = - ConcurrentHashMap, ByteBufferWrapperConvertor<*>>(64, 1.5f) - - - init { - ByteBufferWrapperConvertor.defaultConvertorInstall() - } - } - - - /** - * 将对象写入 ByteBufferWrapper - * - * 根据对象的实际类型获取对应的转换器,使用该转换器将对象写入当前的 ByteBufferWrapper - * 支持方法链调用(返回 this) - * - * @param obj 要写入的对象,类型为 T - * @return 当前的 ByteBufferWrapper 实例,支持链式调用 - * @throws IllegalArgumentException 如果该对象类型没有注册对应的转换器 - */ - fun putObject(obj: Any): ByteBufferWrapper { - val convertor = getConvertor(obj.javaClass) - ?: throw IllegalArgumentException("${obj.javaClass.canonicalName} does not convertor exist") - convertor.write(obj, this) - return this - } - - /** - * 将一个字节写入缓冲区。 - * - * @param byte 要写入的字节值 - * @return 当前包装器实例,支持链式调用 - */ - fun put(byte: Byte): ByteBufferWrapper = putByte(byte) - - /** - * 将一个字符写入缓冲区(2字节)。 - * - * @param char 要写入的字符值 - * @return 当前包装器实例,支持链式调用 - */ - fun put(char: Char): ByteBufferWrapper = putChar(char) - - /** - * 将一个短整数写入缓冲区(2字节)。 - * - * @param short 要写入的短整数 - * @return 当前包装器实例,支持链式调用 - */ - fun put(short: Short): ByteBufferWrapper = putShort(short) - - /** - * 将一个整数写入缓冲区(4字节)。 - * - * @param int 要写入的长整数 - * @return 当前包装器实例,支持链式调用 - */ - fun put(int: Int): ByteBufferWrapper = putInt(int) - - /** - * 将一个长整数写入缓冲区(8字节)。 - * - * @param long 要写入的长整数 - * @return 当前包装器实例,支持链式调用 - */ - fun put(long: Long): ByteBufferWrapper = putLong(long) - - /** - * 将一个布尔值写入缓冲区(1字节)。 - * 通常编码为:true = 0x01,false = 0x00。 - * - * @param boolean 要写入的布尔值 - * @return 当前包装器实例,支持链式调用 - */ - fun put(boolean: Boolean): ByteBufferWrapper = putBoolean(boolean) - - /** - * 将一个单精度浮点数写入缓冲区(4字节)。 - * - * @param float 要写入的单精度浮点数 - * @return 当前包装器实例,支持链式调用 - */ - fun put(float: Float): ByteBufferWrapper = putFloat(float) - - /** - * 将一个双精度浮点数写入缓冲区(8字节)。 - * - * @param double 要写入的双精度浮点数 - * @return 当前包装器实例,支持链式调用 - */ - fun put(double: Double): ByteBufferWrapper = putDouble(double) - - /** - * 将字节数组完整写入缓冲区。 - * - * @param byteArray 要写入的字节数组 - * @return 当前包装器实例,支持链式调用 - */ - fun put(byteArray: ByteArray): ByteBufferWrapper = putByteArray(byteArray) - - /** - * 将字符数组完整写入缓冲区(每个字符2字节)。 - * - * @param charArray 要写入的字符数组 - * @return 当前包装器实例,支持链式调用 - */ - fun put(charArray: CharArray): ByteBufferWrapper = putCharArray(charArray) - - /** - * 将短整数数组完整写入缓冲区(每个短整数2字节)。 - * - * @param shortArray 要写入的短整数数组 - * @return 当前包装器实例,支持链式调用 - */ - fun put(shortArray: ShortArray): ByteBufferWrapper = putShortArray(shortArray) - - /** - * 将整数数组完整写入缓冲区(每个长整数4字节)。 - * - * @param intArray 要写入的长整数数组 - * @return 当前包装器实例,支持链式调用 - */ - fun put(intArray: IntArray): ByteBufferWrapper = putIntArray(intArray) - - /** - * 将长整数数组完整写入缓冲区(每个长整数8字节)。 - * - * @param longArray 要写入的长整数数组 - * @return 当前包装器实例,支持链式调用 - */ - fun put(longArray: LongArray): ByteBufferWrapper = putLongArray(longArray) - - /** - * 将布尔数组完整写入缓冲区(每个布尔值1字节)。 - * - * @param booleanArray 要写入的布尔数组 - * @return 当前包装器实例,支持链式调用 - */ - fun put(booleanArray: BooleanArray): ByteBufferWrapper = putBooleanArray(booleanArray) - - /** - * 将单精度浮点数数组完整写入缓冲区(每个浮点数4字节)。 - * - * @param floatArray 要写入的单精度浮点数数组 - * @return 当前包装器实例,支持链式调用 - */ - fun put(floatArray: FloatArray): ByteBufferWrapper = putFloatArray(floatArray) - - /** - * 将双精度浮点数数组完整写入缓冲区(每个双精度浮点数8字节)。 - * - * @param doubleArray 要写入的双精度浮点数数组 - * @return 当前包装器实例,支持链式调用 - */ - fun put(doubleArray: DoubleArray): ByteBufferWrapper = putDoubleArray(doubleArray) - - /** - * 将 DateTime 对象写入缓冲区。 - * - * @param dateTime 要写入的 DateTime 对象 - * @return 当前包装器实例,支持链式调用 - */ - fun put(dateTime: DateTime): ByteBufferWrapper = putDateTime(dateTime) - - /** - * 将 LocalDateTime 对象写入缓冲区。 - * - * @param localDateTime 要写入的 LocalDateTime 对象 - * @return 当前包装器实例,支持链式调用 - */ - fun put(localDateTime: LocalDateTime): ByteBufferWrapper = putLocalDateTime(localDateTime) - - /** - * 将 Date 对象写入缓冲区。 - * - * @param date 要写入的 Date 对象 - * @return 当前包装器实例,支持链式调用 - */ - fun put(date: Date): ByteBufferWrapper = putDate(date) - - /** - * 将字符串写入缓冲区。 - * - * @param string 要写入的字符串 - * @return 当前包装器实例,支持链式调用 - */ - fun put(string: String): ByteBufferWrapper = putString(string) - - /** - * 将 ByteFlags 标志位对象写入缓冲区。 - * - * @param byteFlags 要写入的标志位对象 - * @return 当前包装器实例,支持链式调用 - */ - fun put(byteFlags: ByteFlags): ByteBufferWrapper = putFlag(byteFlags) - - /** - * 从 ByteBufferWrapper 中读取指定类型的对象 - * - * 根据指定的类型获取对应的转换器,使用该转换器从当前的 ByteBufferWrapper 中读取对象 - * - * @param clazz 要读取的对象类型对应的 Class 对象 - * @param T 要读取的对象类型 - * @return 读取并转换后的 T 类型对象 - * @throws IllegalArgumentException 如果该类型没有注册对应的转换器 - */ - fun getObject(clazz: Class, parameters: Array): T { - - val convertor = - getConvertor(clazz) ?: throw IllegalArgumentException("${clazz.canonicalName} does not convertor exist") - return convertor.read(this, parameters) - } - - fun getObject(clazz: Class): T { - return getObject(clazz, emptyArray()) - } - - fun getObject(clazz: Class, size: Int): T { - return getObject(clazz, arrayOf(size)) - } - - @JvmName("inline_getObject") - inline fun getObject(parameters: Array): T { - return getObject(T::class.java, parameters) - } - - @JvmName("inline_getObject") - inline fun getObject(size: Int): T { - return getObject(T::class.java, size) - } - - @JvmName("inline_getObject") - inline fun getObject(): T { - return getObject(T::class.java) - } - - - /** - * 写入字节数组 - * - * @param byteArray 要写入的字节数组 - * @param offset 起始偏移量(默认为0) - * @param length 写入长度(默认为数组长度) - * @return 当前对象(支持链式调用) - */ - fun putByteArray(byteArray: ByteArray, offset: Int = 0, length: Int = byteArray.size): ByteBufferWrapper { - buffer.put(byteArray, offset, length) - return this - } - - fun putByteArray(size: Int, init: (Int) -> Byte): ByteBufferWrapper { - buffer.put(ByteArray(size, init)) - return this - } - - fun putCharArray(charArray: CharArray): ByteBufferWrapper { - putByteArray(charArray.size) { - charArray[it].code.toByte() - } - return this - } - - fun getCharArray(size: Int): CharArray { - return getByteArray(size).let { - CharArray(it.size) { s -> - it[s].toInt().toChar() - } - } - } - - fun putIntArray(intArray: IntArray): ByteBufferWrapper { - intArray.forEach(::putInt) - return this - } - - fun getIntArray(size: Int): IntArray { - return IntArray(size) { getInt() } - } - - fun putShortArray(shortArray: ShortArray): ByteBufferWrapper { - shortArray.forEach(::putShort) - return this - } - - fun getShortArray(size: Int): ShortArray { - return ShortArray(size) { getShort() } - } - - fun putLongArray(longArray: LongArray): ByteBufferWrapper { - longArray.forEach(::putLong) - return this - } - - fun getLongArray(size: Int): LongArray { - return LongArray(size) { getLong() } - } - - - fun putDoubleArray(doubleArray: DoubleArray): ByteBufferWrapper { - doubleArray.forEach(::putDouble) - return this - } - - fun getDoubleArray(size: Int): DoubleArray { - return DoubleArray(size) { getDouble() } - } - - fun putFloatArray(floatArray: FloatArray): ByteBufferWrapper { - floatArray.forEach(::putFloat) - return this - } - - fun getFloatArray(size: Int): FloatArray { - return FloatArray(size) { getFloat() } - } - - fun putBooleanArray(booleanArray: BooleanArray): ByteBufferWrapper { - putByteArray(booleanArray.size) { - if (booleanArray[it]) 0x01 else 0x00 - } - return this - } - - fun getBooleanArray(size: Int): BooleanArray { - return getByteArray(size).let { - BooleanArray(it.size) { index -> - when (val itm = it[index]) { - 0x00.toByte() -> false - 0x01.toByte() -> true - else -> throw IllegalArgumentException("$itm not Boolean") - } - } - } - } - - /** - * 写入单个字节 - * - * @param byte 要写入的字节 - * @return 当前对象(支持链式调用) - */ - fun putByte(byte: Byte): ByteBufferWrapper { - buffer.put(byte) - return this - } - - /** - * 写入字符(2字节) - * - * @param char 要写入的字符 - * @return 当前对象(支持链式调用) - */ - fun putChar(char: Char): ByteBufferWrapper { - buffer.putChar(char) - return this - } - - /** - * 写入短整数(2字节) - * - * @param short 要写入的短整数 - * @return 当前对象(支持链式调用) - */ - fun putShort(short: Short): ByteBufferWrapper { - buffer.putShort(short) - return this - } - - /** - * 写入整数(4字节) - * - * @param int 要写入的整数 - * @return 当前对象(支持链式调用) - */ - fun putInt(int: Int): ByteBufferWrapper { - buffer.putInt(int) - return this - } - - /** - * 写入长整数(8字节) - * - * @param long 要写入的长整数 - * @return 当前对象(支持链式调用) - */ - fun putLong(long: Long): ByteBufferWrapper { - buffer.putLong(long) - return this - } - - /** - * 写入 BigInteger(大整数) - * 格式:[长度:4字节] + [] - * - * @param bigInteger 要写入的 BigInteger - * @return 当前对象(支持链式调用) - */ - fun putBigInteger(bigInteger: BigInteger): ByteBufferWrapper { - val byteArray = bigInteger.toByteArray() - putInt(byteArray.size) - buffer.put(byteArray) - return this - } - - /** - * 写入单精度浮点数(4字节) - * - * @param float 要写入的浮点数 - * @return 当前对象(支持链式调用) - */ - fun putFloat(float: Float): ByteBufferWrapper { - buffer.putFloat(float) - return this - } - - /** - * 写入双精度浮点数(8字节) - * - * @param double 要写入的双精度浮点数 - * @return 当前对象(支持链式调用) - */ - fun putDouble(double: Double): ByteBufferWrapper { - buffer.putDouble(double) - return this - } - - /** - * 写入 BigDecimal(高精度小数) - * 格式:[scale:4字节] + [BigInteger] - * - * @param bigDecimal 要写入的 BigDecimal - * @return 当前对象(支持链式调用) - */ - fun putBigDecimal(bigDecimal: BigDecimal): ByteBufferWrapper { - putInt(bigDecimal.scale()) - putBigInteger(bigDecimal.unscaledValue()) - return this - } - - /** - * 写入布尔值(1字节) - * 0x00 = false, 0x01 = true - * - * @param boolean 要写入的布尔值 - * @return 当前对象(支持链式调用) - */ - fun putBoolean(boolean: Boolean): ByteBufferWrapper { - putByte(if (boolean) 0x01 else 0x00) - return this - } - - /** - * 写入标志位(ByteFlags) - * - * @param flags 要写入的标志位 - * @return 当前对象(支持链式调用) - */ - fun putFlag(flags: ByteFlags): ByteBufferWrapper { - putByte(flags.toByte()) - return this - } - - /** - * 写入字符串(带长度前缀) - * 格式:[长度:变长] + [UTF-8字节数组] - * - * @param string 要写入的字符串 - * @param charset 字符集(默认 UTF-8) - * @return 当前对象(支持链式调用) - */ - fun putString(string: String, charset: Charset = Charsets.UTF_8): ByteBufferWrapper { - buffer.putString(string, charset) - return this - } - - /** - * 写入变长编码的短整数 - * 使用 VarInt 编码节省空间 - * - * @param varShort 要写入的短整数 - * @return 当前对象(支持链式调用) - */ - fun putVarShort(varShort: Short): ByteBufferWrapper { - buffer.putVarShort(varShort) - return this - } - - /** - * 写入变长编码的整数 - * 使用 VarInt 编码节省空间 - * - * @param varInt 要写入的整数 - * @return 当前对象(支持链式调用) - */ - fun putVarInt(varInt: Int): ByteBufferWrapper { - buffer.putVarInt(varInt) - return this - } - - /** - * 写入变长编码的长整数 - * 使用 VarLong 编码节省空间 - * - * @param varLong 要写入的长整数 - * @return 当前对象(支持链式调用) - */ - fun putVarLong(varLong: Long): ByteBufferWrapper { - buffer.putVarLong(varLong) - return this - } - - /** - * 写入 Instant(时间戳) - * 格式:[seconds:8字节] + [nanos:4字节] - * - * @param instant 要写入的 Instant - * @return 当前对象(支持链式调用) - */ - fun putInstant(instant: Instant): ByteBufferWrapper { - putLong(instant.epochSecond) - putInt(instant.nano) - return this - } - - /** - * 写入 DateTime(Joda-Time) - * - * @param dateTime 要写入的 DateTime - * @return 当前对象(支持链式调用) - */ - fun putDateTime(dateTime: DateTime): ByteBufferWrapper { - putInstant(dateTime.toInstant()) - return this - } - - /** - * 写入 LocalDateTime(Java 8 时间) - * - * @param localDateTime 要写入的 LocalDateTime - * @return 当前对象(支持链式调用) - */ - fun putLocalDateTime(localDateTime: LocalDateTime): ByteBufferWrapper { - putDateTime(localDateTime.toDateTime()) - return this - } - - /** - * 写入 Date(传统 Java 日期) - * - * @param date 要写入的 Date - * @return 当前对象(支持链式调用) - */ - fun putDate(date: Date): ByteBufferWrapper { - putDateTime(date.toDateTime()) - return this - } - - /** - * 写入自定义 UUID - * - * @param uuid 要写入的 UUID - * @return 当前对象(支持链式调用) - */ - fun putUUID(uuid: UUID): ByteBufferWrapper { - putByteArray(uuid.toBytes()) - return this - } - - /** - * 写入 Java UUID - * - * @param uuid 要写入的 Java UUID - * @return 当前对象(支持链式调用) - */ - fun putUUID(uuid: java.util.UUID): ByteBufferWrapper { - putByteArray(uuid.toMLUUID().toBytes()) - return this - } - - /** - * 读取字节数组 - * - * @param size 要读取的字节数 - * @return 读取的字节数组 - */ - fun getByteArray(size: Int): ByteArray { - return ByteArray(size).let { - buffer.get(it) - it - } - } - - /** - * 读取单个字节 - * - * @return 读取的字节 - */ - fun getByte(): Byte { - return buffer.get() - } - - /** - * 读取字符 - * - * @return 读取的字符 - */ - fun getChar(): Char { - return buffer.getChar() - } - - /** - * 读取短整数 - * - * @return 读取的短整数 - */ - fun getShort(): Short { - return buffer.getShort() - } - - /** - * 读取整数 - * - * @return 读取的整数 - */ - fun getInt(): Int { - return buffer.getInt() - } - - /** - * 读取长整数 - * - * @return 读取的长整数 - */ - fun getLong(): Long { - return buffer.getLong() - } - - /** - * 读取 BigInteger - * - * @return 读取的 BigInteger - */ - fun getBigInteger(): BigInteger { - return BigInteger(getByteArray(getInt())) - } - - /** - * 读取单精度浮点数 - * - * @return 读取的浮点数 - */ - fun getFloat(): Float { - return buffer.getFloat() - } - - /** - * 读取双精度浮点数 - * - * @return 读取的双精度浮点数 - */ - fun getDouble(): Double { - return buffer.getDouble() - } - - /** - * 读取 BigDecimal - * - * @return 读取的 BigDecimal - */ - fun getBigDecimal(): BigDecimal { - val scale = getInt() - return BigDecimal(getBigInteger(), scale) - } - - /** - * 读取布尔值 - * - * @return 读取的布尔值 - * @throws IllegalArgumentException 如果字节值不是 0x00 或 0x01 - */ - fun getBoolean(): Boolean { - return when (getByte()) { - 0x00.toByte() -> false - 0x01.toByte() -> true - else -> throw java.lang.IllegalArgumentException("Not a boolean") - } - } - - /** - * 读取标志位 - * - * @return 读取的 ByteFlags - */ - fun getFlag(): ByteFlags { - return ByteFlags(getByte()) - } - - /** - * 读取字符串 - * - * @param charset 字符集(默认 UTF-8) - * @return 读取的字符串 - */ - fun getString(charset: Charset = Charsets.UTF_8): String { - return buffer.getString(charset) - } - - /** - * 读取变长编码的短整数 - * - * @return 读取的短整数 - */ - fun getVarShort(): Short { - return buffer.getVarShort() - } - - /** - * 读取变长编码的整数 - * - * @return 读取的整数 - */ - fun getVarInt(): Int { - return buffer.getVarInt() - } - - /** - * 读取变长编码的长整数 - * - * @return 读取的长整数 - */ - fun getVarLong(): Long { - return buffer.getVarLong() - } - - /** - * 读取 Instant - * - * @return 读取的 Instant - */ - fun getInstant(): Instant { - return Instant.ofEpochSecond(getLong(), getInt().toLong()) - } - - /** - * 读取 DateTime(Joda-Time) - * - * @param zoneId 时区(默认系统时区) - * @return 读取的 DateTime - */ - fun getDateTime(zoneId: ZoneId = ZoneId.systemDefault()): DateTime { - return DateTime.of(getInstant(), zoneId) - } - - /** - * 读取 LocalDateTime - * - * @param zoneId 时区(默认系统时区) - * @return 读取的 LocalDateTime - */ - fun getLocalDateTime(zoneId: ZoneId = ZoneId.systemDefault()): LocalDateTime { - return getDateTime(zoneId).toLocalDateTime() - } - - /** - * 读取 Date - * - * @param zoneId 时区(默认系统时区) - * @return 读取的 Date - */ - fun getDate(zoneId: ZoneId = ZoneId.systemDefault()): Date { - return getDateTime(zoneId).toDate() - } - - /** - * 读取自定义 UUID - * - * @return 读取的 UUID - */ - fun getUUID(): UUID { - return getByteArray(16).let { - UUID.of(it) - } - } - - /** - * 读取 Java UUID - * - * @return 读取的 Java UUID - */ - fun getJUUID(): java.util.UUID { - return getByteArray(16).let { - UUID.of(it).getUuid() - } - } - - /** - * 创建当前缓冲区的副本 - * 共享内容但拥有独立的位置、限制和标记 - * - * @return 新的 ByteBufferWrapper 实例 - */ - fun duplicate(): ByteBufferWrapper { - return ByteBufferWrapper(buffer.duplicate()) - } - - /** - * 创建当前缓冲区的只读视图 - * - * @return 只读的 ByteBufferWrapper 实例 - */ - fun asReadOnly(): ByteBufferWrapper { - return ByteBufferWrapper(buffer.asReadOnlyBuffer()) - } - - /** - * 创建当前缓冲区的切片 - * 从当前位置到限制的共享视图 - * - * @return 新的 ByteBufferWrapper 实例 - */ - fun slice(): ByteBufferWrapper { - return ByteBufferWrapper(buffer.slice()) - } - - /** - * 设置位置 - * - * @param newPosition 新的位置 - * @return 当前对象(支持链式调用) - * @throws IllegalArgumentException 如果位置超出范围 - */ - fun position(newPosition: Int): ByteBufferWrapper { - buffer.position(newPosition) - return this - } - - /** - * 设置限制 - * - * @param newLimit 新的限制 - * @return 当前对象(支持链式调用) - * @throws IllegalArgumentException 如果限制超出范围 - */ - fun limit(newLimit: Int): ByteBufferWrapper { - buffer.limit(newLimit) - return this - } - - /** - * 设置标记位置 - * - * @return 当前对象(支持链式调用) - */ - fun mark(): ByteBufferWrapper { - buffer.mark() - return this - } - - /** - * 重置到标记位置 - * - * @return 当前对象(支持链式调用) - * @throws java.nio.InvalidMarkException 如果没有标记 - */ - fun reset(): ByteBufferWrapper { - buffer.reset() - return this - } - - /** - * 设置字节序 - * - * @param byteOrder 字节序(BIG_ENDIAN 或 LITTLE_ENDIAN) - * @return 当前对象(支持链式调用) - */ - fun order(byteOrder: ByteOrder): ByteBufferWrapper { - buffer.order(byteOrder) - return this - } - - /** - * 设置为大端字节序 - * - * @return 当前对象(支持链式调用) - */ - fun asBigEndian(): ByteBufferWrapper { - buffer.order(ByteOrder.BIG_ENDIAN) - return this - } - - /** - * 设置为小端字节序 - * - * @return 当前对象(支持链式调用) - */ - fun asLittleEndian(): ByteBufferWrapper { - buffer.order(ByteOrder.LITTLE_ENDIAN) - return this - } - - /** - * 清除缓冲区 - * position = 0, limit = capacity, mark = -1 - * 准备重新写入 - * - * @return 当前对象(支持链式调用) - */ - fun clear(): ByteBufferWrapper { - buffer.clear() - return this - } - - /** - * 翻转缓冲区 - * limit = position, position = 0, mark = -1 - * 用于从写入模式切换到读取模式 - * - * @return 当前对象(支持链式调用) - */ - fun flip(): ByteBufferWrapper { - buffer.flip() - return this - } - - /** - * 重绕缓冲区 - * position = 0, mark = -1 - * 准备重新读取 - * - * @return 当前对象(支持链式调用) - */ - fun rewind(): ByteBufferWrapper { - buffer.rewind() - return this - } - - /** - * 压缩缓冲区 - * 将未读数据移到开头,position = 剩余字节数,limit = capacity - * 适用于部分读取后想继续写入的场景 - * - * @return 当前对象(支持链式调用) - */ - fun compact(): ByteBufferWrapper { - buffer.compact() - return this - } - - /** - * 跳过指定字节数 - * 相当于 position += bytes - * - * @param bytes 要跳过的字节数 - * @return 当前对象(支持链式调用) - * @throws IllegalArgumentException 如果跳过的字节数超出范围 - */ - fun skip(bytes: Int): ByteBufferWrapper { - buffer.position(buffer.position() + bytes) - return this - } - - /** - * 跳转到指定位置 - * - * @param newPosition 目标位置 - * @return 当前对象(支持链式调用) - */ - fun jumpTo(newPosition: Int): ByteBufferWrapper { - buffer.position(newPosition) - return this - } - - /** - * 回到开头 - * position = 0 - * - * @return 当前对象(支持链式调用) - */ - fun rewindToStart(): ByteBufferWrapper { - buffer.position(0) - return this - } - - /** - * 跳到末尾 - * position = limit - * - * @return 当前对象(支持链式调用) - */ - fun jumpToEnd(): ByteBufferWrapper { - buffer.position(buffer.limit()) - return this - } + /** + * 缓冲区容量(总大小) + */ + @get:JvmName("capacity") + val capacity: Int get() = buffer.capacity() + + /** + * 当前位置(读写位置) + */ + @get:JvmName("position") + val position: Int get() = buffer.position() + + /** + * 剩余可读写字节数 + */ + @get:JvmName("remaining") + val remaining: Int get() = buffer.remaining() + + /** + * 是否还有剩余字节 + */ + @get:JvmName("hasRemaining") + val hasRemaining: Boolean get() = buffer.hasRemaining() + + /** + * 限制位置 + */ + @get:JvmName("limit") + val limit: Int get() = buffer.limit() + + /** + * 标记位置(实际 ByteBuffer 没有直接获取 mark 的方法,这里返回当前position) + */ + @get:JvmName("mark") + val mark: Int get() = remaining + + /** + * 是否具有可访问的底层数组 + */ + @get:JvmName("hasArray") + val hasArray: Boolean get() = buffer.hasArray() + + /** + * 获取底层数组(如果存在) + * + * @return 底层字节数组 + * @throws UnsupportedOperationException 如果没有底层数组(如直接缓冲区) + */ + @get:JvmName("array") + val array: ByteArray get() = buffer.array() + + /** + * 转换为整个字节数组 + * + * @return 数组偏移量 + * @throws UnsupportedOperationException 如果没有底层数组 + */ + fun toByteArray(): ByteArray = getByteArray(remaining) + + /** + * 获取底层数组的偏移量 + * + * @return 数组偏移量 + * @throws UnsupportedOperationException 如果没有底层数组 + */ + + @get:JvmName("arrayOffset") + val arrayOffset: Int get() = buffer.arrayOffset() + + /** + * 是否为只读缓冲区 + */ + @get:JvmName("isReadOnly") + val isReadOnly: Boolean get() = buffer.isReadOnly + + /** + * 是否为直接缓冲区(堆外内存) + */ + @get:JvmName("isDirect") + val isDirect: Boolean get() = buffer.isDirect + + /** + * 当前字节序(大端/小端) + */ + @get:JvmName("order") + val byteOrder: ByteOrder get() = buffer.order() + + /** + * 是否为大端字节序 + */ + @get:JvmName("isBigEndian") + val isBigEndian: Boolean get() = byteOrder == ByteOrder.BIG_ENDIAN + + /** + * 是否为小端字节序 + */ + @get:JvmName("isLittleEndian") + val isLittleEndian: Boolean get() = byteOrder == ByteOrder.LITTLE_ENDIAN + + /** + * 缓冲区是否为空(无剩余字节) + */ + @get:JvmName("isEmpty") + val isEmpty: Boolean get() = !hasRemaining + + /** + * 缓冲区是否已满(position == capacity) + */ + @get:JvmName("isFull") + val isFull: Boolean get() = position == capacity + + /** + * 当前位置是否在限制之内 + */ + @get:JvmName("isWithinLimit") + val isWithinLimit: Boolean get() = position < limit + + /** + * 是否已到达限制位置 + */ + @get:JvmName("isAtLimit") + val isAtLimit: Boolean get() = position == limit + + /** + * 获取缓冲区的字符串表示 + * + * @return 格式化的字符串信息 + */ + override fun toString(): String { + return "ByteBufferWrapper(capacity=$capacity, position=$position, limit=$limit, remaining=$remaining)#${hashCode()}" + } + + companion object { + /** + * 包装现有的 ByteBuffer + * + * @param buffer 要包装的 ByteBuffer + * @return 新的 ByteBufferWrapper 实例 + */ + @JvmStatic + fun wrap(buffer: ByteBuffer): ByteBufferWrapper { + return ByteBufferWrapper(buffer) + } + + /** + * 包装现有的 ByteBuf + * + * @param buffer 要包装的 ByteBuf + * @return 新的 ByteBufferWrapper 实例 + */ + @JvmStatic + fun wrap(buffer: ByteBuf): ByteBufferWrapper { + return ByteBufferWrapper(buffer.toByteBuffer()) + } + + /** + * 包装字节数组 + * + * @param array 要包装的字节数组 + * @return 新的 ByteBufferWrapper 实例 + */ + @JvmStatic + fun wrap(array: ByteArray): ByteBufferWrapper { + return ByteBufferWrapper(ByteBuffer.wrap(array)) + } + + /** + * 包装字节数组的一部分 + * + * @param array 要包装的字节数组 + * @param offset 起始偏移量 + * @param length 长度 + * @return 新的 ByteBufferWrapper 实例 + */ + @JvmStatic + fun wrap(array: ByteArray, offset: Int, length: Int): ByteBufferWrapper { + return ByteBufferWrapper(ByteBuffer.wrap(array, offset, length)) + } + + /** + * 分配堆内缓冲区 + * + * @param capacity 缓冲区容量 + * @return 新的 ByteBufferWrapper 实例 + */ + @JvmStatic + fun allocate(capacity: Int): ByteBufferWrapper { + return ByteBufferWrapper(ByteBuffer.allocate(capacity)) + } + + /** + * 分配直接缓冲区(堆外内存) + * 适用于高性能 I/O 场景,但分配和释放成本较高 + * + * @param capacity 缓冲区容量 + * @return 新的 ByteBufferWrapper 实例 + */ + @JvmStatic + fun allocateDirect(capacity: Int): ByteBufferWrapper { + return ByteBufferWrapper(ByteBuffer.allocateDirect(capacity)) + } + + /** + * 添加转换器到映射表,转换器内部通过 getType() 提供自己的类型信息 + * + * @param byteBufferWrapperConvertor 要添加的转换器实例,其泛型类型信息通过 getType() 方法获取 + */ + @JvmStatic + fun addConvertor(byteBufferWrapperConvertor: ByteBufferWrapperConvertor<*>) { + _ByteBufferWrapperConvertorMap[byteBufferWrapperConvertor.getType().kotlin.javaObjectType] = + byteBufferWrapperConvertor + } + + @JvmName("inline_addConvertor") + inline fun > addConvertor() { + addConvertor(ByteBufferWrapperConvertor.getInstantiation()) + } + + /** + * 添加转换器到映射表,显式指定要处理的类型 Class + * + * @param clazz 要处理的类型对应的 Class 对象 + * @param byteBufferWrapperConvertor 与指定类型匹配的转换器实例 + * @param T 要处理的数据类型 + */ + @JvmStatic + fun addConvertor(clazz: Class, byteBufferWrapperConvertor: ByteBufferWrapperConvertor) { + _ByteBufferWrapperConvertorMap[clazz.kotlin.javaObjectType] = byteBufferWrapperConvertor + } + + /** + * 根据类型 Class 从映射表中获取对应的转换器,并进行类型转换 + * + * @param clazz 要获取转换器的类型对应的 Class 对象 + * @param T 要处理的数据类型 + * @return 与指定类型匹配的转换器实例,如果不存在则返回 null + */ + @JvmStatic + @Suppress("UNCHECKED_CAST") + fun getConvertor(clazz: Class): ByteBufferWrapperConvertor? { + return _ByteBufferWrapperConvertorMap[clazz] as? ByteBufferWrapperConvertor + } + + /** + * 从映射表中移除指定类型的转换器 + * + * @param clazz 要移除转换器的类型对应的 Class 对象 + */ + @JvmStatic + fun delectConvertor(clazz: Class<*>) { + _ByteBufferWrapperConvertorMap.remove(clazz) + } + + /** + * 存储类型与转换器映射关系的线程安全哈希表 + * 键:要处理的类型 Class<*> + * 值:对应的转换器实例 ByteBufferWrapperConvertor<*> + */ + private val _ByteBufferWrapperConvertorMap = + ConcurrentHashMap, ByteBufferWrapperConvertor<*>>(64, 1.5f) + + + init { + ByteBufferWrapperConvertor.defaultConvertorInstall() + } + } + + + /** + * 将对象写入 ByteBufferWrapper + * + * 根据对象的实际类型获取对应的转换器,使用该转换器将对象写入当前的 ByteBufferWrapper + * 支持方法链调用(返回 this) + * + * @param obj 要写入的对象,类型为 T + * @return 当前的 ByteBufferWrapper 实例,支持链式调用 + * @throws IllegalArgumentException 如果该对象类型没有注册对应的转换器 + */ + fun putObject(obj: Any): ByteBufferWrapper { + val convertor = getConvertor(obj.javaClass) + ?: throw IllegalArgumentException("${obj.javaClass.canonicalName} does not convertor exist") + convertor.write(obj, this) + return this + } + + /** + * 将一个字节写入缓冲区。 + * + * @param byte 要写入的字节值 + * @return 当前包装器实例,支持链式调用 + */ + fun put(byte: Byte): ByteBufferWrapper = putByte(byte) + + /** + * 将一个字符写入缓冲区(2字节)。 + * + * @param char 要写入的字符值 + * @return 当前包装器实例,支持链式调用 + */ + fun put(char: Char): ByteBufferWrapper = putChar(char) + + /** + * 将一个短整数写入缓冲区(2字节)。 + * + * @param short 要写入的短整数 + * @return 当前包装器实例,支持链式调用 + */ + fun put(short: Short): ByteBufferWrapper = putShort(short) + + /** + * 将一个整数写入缓冲区(4字节)。 + * + * @param int 要写入的长整数 + * @return 当前包装器实例,支持链式调用 + */ + fun put(int: Int): ByteBufferWrapper = putInt(int) + + /** + * 将一个长整数写入缓冲区(8字节)。 + * + * @param long 要写入的长整数 + * @return 当前包装器实例,支持链式调用 + */ + fun put(long: Long): ByteBufferWrapper = putLong(long) + + /** + * 将一个布尔值写入缓冲区(1字节)。 + * 通常编码为:true = 0x01,false = 0x00。 + * + * @param boolean 要写入的布尔值 + * @return 当前包装器实例,支持链式调用 + */ + fun put(boolean: Boolean): ByteBufferWrapper = putBoolean(boolean) + + /** + * 将一个单精度浮点数写入缓冲区(4字节)。 + * + * @param float 要写入的单精度浮点数 + * @return 当前包装器实例,支持链式调用 + */ + fun put(float: Float): ByteBufferWrapper = putFloat(float) + + /** + * 将一个双精度浮点数写入缓冲区(8字节)。 + * + * @param double 要写入的双精度浮点数 + * @return 当前包装器实例,支持链式调用 + */ + fun put(double: Double): ByteBufferWrapper = putDouble(double) + + /** + * 将字节数组完整写入缓冲区。 + * + * @param byteArray 要写入的字节数组 + * @return 当前包装器实例,支持链式调用 + */ + fun put(byteArray: ByteArray): ByteBufferWrapper = putByteArray(byteArray) + + /** + * 将字符数组完整写入缓冲区(每个字符2字节)。 + * + * @param charArray 要写入的字符数组 + * @return 当前包装器实例,支持链式调用 + */ + fun put(charArray: CharArray): ByteBufferWrapper = putCharArray(charArray) + + /** + * 将短整数数组完整写入缓冲区(每个短整数2字节)。 + * + * @param shortArray 要写入的短整数数组 + * @return 当前包装器实例,支持链式调用 + */ + fun put(shortArray: ShortArray): ByteBufferWrapper = putShortArray(shortArray) + + /** + * 将整数数组完整写入缓冲区(每个长整数4字节)。 + * + * @param intArray 要写入的长整数数组 + * @return 当前包装器实例,支持链式调用 + */ + fun put(intArray: IntArray): ByteBufferWrapper = putIntArray(intArray) + + /** + * 将长整数数组完整写入缓冲区(每个长整数8字节)。 + * + * @param longArray 要写入的长整数数组 + * @return 当前包装器实例,支持链式调用 + */ + fun put(longArray: LongArray): ByteBufferWrapper = putLongArray(longArray) + + /** + * 将布尔数组完整写入缓冲区(每个布尔值1字节)。 + * + * @param booleanArray 要写入的布尔数组 + * @return 当前包装器实例,支持链式调用 + */ + fun put(booleanArray: BooleanArray): ByteBufferWrapper = putBooleanArray(booleanArray) + + /** + * 将单精度浮点数数组完整写入缓冲区(每个浮点数4字节)。 + * + * @param floatArray 要写入的单精度浮点数数组 + * @return 当前包装器实例,支持链式调用 + */ + fun put(floatArray: FloatArray): ByteBufferWrapper = putFloatArray(floatArray) + + /** + * 将双精度浮点数数组完整写入缓冲区(每个双精度浮点数8字节)。 + * + * @param doubleArray 要写入的双精度浮点数数组 + * @return 当前包装器实例,支持链式调用 + */ + fun put(doubleArray: DoubleArray): ByteBufferWrapper = putDoubleArray(doubleArray) + + /** + * 将 DateTime 对象写入缓冲区。 + * + * @param dateTime 要写入的 DateTime 对象 + * @return 当前包装器实例,支持链式调用 + */ + fun put(dateTime: DateTime): ByteBufferWrapper = putDateTime(dateTime) + + /** + * 将 LocalDateTime 对象写入缓冲区。 + * + * @param localDateTime 要写入的 LocalDateTime 对象 + * @return 当前包装器实例,支持链式调用 + */ + fun put(localDateTime: LocalDateTime): ByteBufferWrapper = putLocalDateTime(localDateTime) + + /** + * 将 Date 对象写入缓冲区。 + * + * @param date 要写入的 Date 对象 + * @return 当前包装器实例,支持链式调用 + */ + fun put(date: Date): ByteBufferWrapper = putDate(date) + + /** + * 将字符串写入缓冲区。 + * + * @param string 要写入的字符串 + * @return 当前包装器实例,支持链式调用 + */ + fun put(string: String): ByteBufferWrapper = putString(string) + + /** + * 将 ByteFlags 标志位对象写入缓冲区。 + * + * @param byteFlags 要写入的标志位对象 + * @return 当前包装器实例,支持链式调用 + */ + fun put(byteFlags: ByteFlags): ByteBufferWrapper = putFlag(byteFlags) + + /** + * 从 ByteBufferWrapper 中读取指定类型的对象 + * + * 根据指定的类型获取对应的转换器,使用该转换器从当前的 ByteBufferWrapper 中读取对象 + * + * @param clazz 要读取的对象类型对应的 Class 对象 + * @param T 要读取的对象类型 + * @return 读取并转换后的 T 类型对象 + * @throws IllegalArgumentException 如果该类型没有注册对应的转换器 + */ + fun getObject(clazz: Class, parameters: Array): T { + + val convertor = + getConvertor(clazz) ?: throw IllegalArgumentException("${clazz.canonicalName} does not convertor exist") + return convertor.read(this, parameters) + } + + fun getObject(clazz: Class): T { + return getObject(clazz, emptyArray()) + } + + fun getObject(clazz: Class, size: Int): T { + return getObject(clazz, arrayOf(size)) + } + + @JvmName("inline_getObject") + inline fun getObject(parameters: Array): T { + return getObject(T::class.java, parameters) + } + + @JvmName("inline_getObject") + inline fun getObject(size: Int): T { + return getObject(T::class.java, size) + } + + @JvmName("inline_getObject") + inline fun getObject(): T { + return getObject(T::class.java) + } + + + /** + * 写入字节数组 + * + * @param byteArray 要写入的字节数组 + * @param offset 起始偏移量(默认为0) + * @param length 写入长度(默认为数组长度) + * @return 当前对象(支持链式调用) + */ + fun putByteArray(byteArray: ByteArray, offset: Int = 0, length: Int = byteArray.size): ByteBufferWrapper { + buffer.put(byteArray, offset, length) + return this + } + + fun putByteArray(size: Int, init: (Int) -> Byte): ByteBufferWrapper { + buffer.put(ByteArray(size, init)) + return this + } + + fun putCharArray(charArray: CharArray): ByteBufferWrapper { + putByteArray(charArray.size) { + charArray[it].code.toByte() + } + return this + } + + fun getCharArray(size: Int): CharArray { + return getByteArray(size).let { + CharArray(it.size) { s -> + it[s].toInt().toChar() + } + } + } + + fun putIntArray(intArray: IntArray): ByteBufferWrapper { + intArray.forEach(::putInt) + return this + } + + fun getIntArray(size: Int): IntArray { + return IntArray(size) { getInt() } + } + + fun putShortArray(shortArray: ShortArray): ByteBufferWrapper { + shortArray.forEach(::putShort) + return this + } + + fun getShortArray(size: Int): ShortArray { + return ShortArray(size) { getShort() } + } + + fun putLongArray(longArray: LongArray): ByteBufferWrapper { + longArray.forEach(::putLong) + return this + } + + fun getLongArray(size: Int): LongArray { + return LongArray(size) { getLong() } + } + + + fun putDoubleArray(doubleArray: DoubleArray): ByteBufferWrapper { + doubleArray.forEach(::putDouble) + return this + } + + fun getDoubleArray(size: Int): DoubleArray { + return DoubleArray(size) { getDouble() } + } + + fun putFloatArray(floatArray: FloatArray): ByteBufferWrapper { + floatArray.forEach(::putFloat) + return this + } + + fun getFloatArray(size: Int): FloatArray { + return FloatArray(size) { getFloat() } + } + + fun putBooleanArray(booleanArray: BooleanArray): ByteBufferWrapper { + putByteArray(booleanArray.size) { + if (booleanArray[it]) 0x01 else 0x00 + } + return this + } + + fun getBooleanArray(size: Int): BooleanArray { + return getByteArray(size).let { + BooleanArray(it.size) { index -> + when (val itm = it[index]) { + 0x00.toByte() -> false + 0x01.toByte() -> true + else -> throw IllegalArgumentException("$itm not Boolean") + } + } + } + } + + /** + * 写入单个字节 + * + * @param byte 要写入的字节 + * @return 当前对象(支持链式调用) + */ + fun putByte(byte: Byte): ByteBufferWrapper { + buffer.put(byte) + return this + } + + /** + * 写入字符(2字节) + * + * @param char 要写入的字符 + * @return 当前对象(支持链式调用) + */ + fun putChar(char: Char): ByteBufferWrapper { + buffer.putChar(char) + return this + } + + /** + * 写入短整数(2字节) + * + * @param short 要写入的短整数 + * @return 当前对象(支持链式调用) + */ + fun putShort(short: Short): ByteBufferWrapper { + buffer.putShort(short) + return this + } + + /** + * 写入整数(4字节) + * + * @param int 要写入的整数 + * @return 当前对象(支持链式调用) + */ + fun putInt(int: Int): ByteBufferWrapper { + buffer.putInt(int) + return this + } + + /** + * 写入长整数(8字节) + * + * @param long 要写入的长整数 + * @return 当前对象(支持链式调用) + */ + fun putLong(long: Long): ByteBufferWrapper { + buffer.putLong(long) + return this + } + + /** + * 写入 BigInteger(大整数) + * 格式:[长度:4字节] + [] + * + * @param bigInteger 要写入的 BigInteger + * @return 当前对象(支持链式调用) + */ + fun putBigInteger(bigInteger: BigInteger): ByteBufferWrapper { + val byteArray = bigInteger.toByteArray() + putInt(byteArray.size) + buffer.put(byteArray) + return this + } + + /** + * 写入单精度浮点数(4字节) + * + * @param float 要写入的浮点数 + * @return 当前对象(支持链式调用) + */ + fun putFloat(float: Float): ByteBufferWrapper { + buffer.putFloat(float) + return this + } + + /** + * 写入双精度浮点数(8字节) + * + * @param double 要写入的双精度浮点数 + * @return 当前对象(支持链式调用) + */ + fun putDouble(double: Double): ByteBufferWrapper { + buffer.putDouble(double) + return this + } + + /** + * 写入 BigDecimal(高精度小数) + * 格式:[scale:4字节] + [BigInteger] + * + * @param bigDecimal 要写入的 BigDecimal + * @return 当前对象(支持链式调用) + */ + fun putBigDecimal(bigDecimal: BigDecimal): ByteBufferWrapper { + putInt(bigDecimal.scale()) + putBigInteger(bigDecimal.unscaledValue()) + return this + } + + /** + * 写入布尔值(1字节) + * 0x00 = false, 0x01 = true + * + * @param boolean 要写入的布尔值 + * @return 当前对象(支持链式调用) + */ + fun putBoolean(boolean: Boolean): ByteBufferWrapper { + putByte(if (boolean) 0x01 else 0x00) + return this + } + + /** + * 写入标志位(ByteFlags) + * + * @param flags 要写入的标志位 + * @return 当前对象(支持链式调用) + */ + fun putFlag(flags: ByteFlags): ByteBufferWrapper { + putByte(flags.toByte()) + return this + } + + /** + * 写入字符串(带长度前缀) + * 格式:[长度:变长] + [UTF-8字节数组] + * + * @param string 要写入的字符串 + * @param charset 字符集(默认 UTF-8) + * @return 当前对象(支持链式调用) + */ + fun putString(string: String, charset: Charset = Charsets.UTF_8): ByteBufferWrapper { + buffer.putString(string, charset) + return this + } + + /** + * 写入变长编码的短整数 + * 使用 VarInt 编码节省空间 + * + * @param varShort 要写入的短整数 + * @return 当前对象(支持链式调用) + */ + fun putVarShort(varShort: Short): ByteBufferWrapper { + buffer.putVarShort(varShort) + return this + } + + /** + * 写入变长编码的整数 + * 使用 VarInt 编码节省空间 + * + * @param varInt 要写入的整数 + * @return 当前对象(支持链式调用) + */ + fun putVarInt(varInt: Int): ByteBufferWrapper { + buffer.putVarInt(varInt) + return this + } + + /** + * 写入变长编码的长整数 + * 使用 VarLong 编码节省空间 + * + * @param varLong 要写入的长整数 + * @return 当前对象(支持链式调用) + */ + fun putVarLong(varLong: Long): ByteBufferWrapper { + buffer.putVarLong(varLong) + return this + } + + /** + * 写入 Instant(时间戳) + * 格式:[seconds:8字节] + [nanos:4字节] + * + * @param instant 要写入的 Instant + * @return 当前对象(支持链式调用) + */ + fun putInstant(instant: Instant): ByteBufferWrapper { + putLong(instant.epochSecond) + putInt(instant.nano) + return this + } + + /** + * 写入 DateTime(Joda-Time) + * + * @param dateTime 要写入的 DateTime + * @return 当前对象(支持链式调用) + */ + fun putDateTime(dateTime: DateTime): ByteBufferWrapper { + putInstant(dateTime.toInstant()) + return this + } + + /** + * 写入 LocalDateTime(Java 8 时间) + * + * @param localDateTime 要写入的 LocalDateTime + * @return 当前对象(支持链式调用) + */ + fun putLocalDateTime(localDateTime: LocalDateTime): ByteBufferWrapper { + putDateTime(localDateTime.toDateTime()) + return this + } + + /** + * 写入 Date(传统 Java 日期) + * + * @param date 要写入的 Date + * @return 当前对象(支持链式调用) + */ + fun putDate(date: Date): ByteBufferWrapper { + putDateTime(date.toDateTime()) + return this + } + + /** + * 写入自定义 UUID + * + * @param uuid 要写入的 UUID + * @return 当前对象(支持链式调用) + */ + fun putUUID(uuid: UUID): ByteBufferWrapper { + putByteArray(uuid.toBytes()) + return this + } + + /** + * 写入 Java UUID + * + * @param uuid 要写入的 Java UUID + * @return 当前对象(支持链式调用) + */ + fun putUUID(uuid: java.util.UUID): ByteBufferWrapper { + putByteArray(uuid.toMLUUID().toBytes()) + return this + } + + /** + * 读取字节数组 + * + * @param size 要读取的字节数 + * @return 读取的字节数组 + */ + fun getByteArray(size: Int): ByteArray { + return ByteArray(size).let { + buffer.get(it) + it + } + } + + /** + * 读取单个字节 + * + * @return 读取的字节 + */ + fun getByte(): Byte { + return buffer.get() + } + + /** + * 读取字符 + * + * @return 读取的字符 + */ + fun getChar(): Char { + return buffer.getChar() + } + + /** + * 读取短整数 + * + * @return 读取的短整数 + */ + fun getShort(): Short { + return buffer.getShort() + } + + /** + * 读取整数 + * + * @return 读取的整数 + */ + fun getInt(): Int { + return buffer.getInt() + } + + /** + * 读取长整数 + * + * @return 读取的长整数 + */ + fun getLong(): Long { + return buffer.getLong() + } + + /** + * 读取 BigInteger + * + * @return 读取的 BigInteger + */ + fun getBigInteger(): BigInteger { + return BigInteger(getByteArray(getInt())) + } + + /** + * 读取单精度浮点数 + * + * @return 读取的浮点数 + */ + fun getFloat(): Float { + return buffer.getFloat() + } + + /** + * 读取双精度浮点数 + * + * @return 读取的双精度浮点数 + */ + fun getDouble(): Double { + return buffer.getDouble() + } + + /** + * 读取 BigDecimal + * + * @return 读取的 BigDecimal + */ + fun getBigDecimal(): BigDecimal { + val scale = getInt() + return BigDecimal(getBigInteger(), scale) + } + + /** + * 读取布尔值 + * + * @return 读取的布尔值 + * @throws IllegalArgumentException 如果字节值不是 0x00 或 0x01 + */ + fun getBoolean(): Boolean { + return when (getByte()) { + 0x00.toByte() -> false + 0x01.toByte() -> true + else -> throw java.lang.IllegalArgumentException("Not a boolean") + } + } + + /** + * 读取标志位 + * + * @return 读取的 ByteFlags + */ + fun getFlag(): ByteFlags { + return ByteFlags(getByte()) + } + + /** + * 读取字符串 + * + * @param charset 字符集(默认 UTF-8) + * @return 读取的字符串 + */ + fun getString(charset: Charset = Charsets.UTF_8): String { + return buffer.getString(charset) + } + + /** + * 读取变长编码的短整数 + * + * @return 读取的短整数 + */ + fun getVarShort(): Short { + return buffer.getVarShort() + } + + /** + * 读取变长编码的整数 + * + * @return 读取的整数 + */ + fun getVarInt(): Int { + return buffer.getVarInt() + } + + /** + * 读取变长编码的长整数 + * + * @return 读取的长整数 + */ + fun getVarLong(): Long { + return buffer.getVarLong() + } + + /** + * 读取 Instant + * + * @return 读取的 Instant + */ + fun getInstant(): Instant { + return Instant.ofEpochSecond(getLong(), getInt().toLong()) + } + + /** + * 读取 DateTime(Joda-Time) + * + * @param zoneId 时区(默认系统时区) + * @return 读取的 DateTime + */ + fun getDateTime(zoneId: ZoneId = ZoneId.systemDefault()): DateTime { + return DateTime.of(getInstant(), zoneId) + } + + /** + * 读取 LocalDateTime + * + * @param zoneId 时区(默认系统时区) + * @return 读取的 LocalDateTime + */ + fun getLocalDateTime(zoneId: ZoneId = ZoneId.systemDefault()): LocalDateTime { + return getDateTime(zoneId).toLocalDateTime() + } + + /** + * 读取 Date + * + * @param zoneId 时区(默认系统时区) + * @return 读取的 Date + */ + fun getDate(zoneId: ZoneId = ZoneId.systemDefault()): Date { + return getDateTime(zoneId).toDate() + } + + /** + * 读取自定义 UUID + * + * @return 读取的 UUID + */ + fun getUUID(): UUID { + return getByteArray(16).let { + UUID.of(it) + } + } + + /** + * 读取 Java UUID + * + * @return 读取的 Java UUID + */ + fun getJUUID(): java.util.UUID { + return getByteArray(16).let { + UUID.of(it).getUuid() + } + } + + /** + * 创建当前缓冲区的副本 + * 共享内容但拥有独立的位置、限制和标记 + * + * @return 新的 ByteBufferWrapper 实例 + */ + fun duplicate(): ByteBufferWrapper { + return ByteBufferWrapper(buffer.duplicate()) + } + + /** + * 创建当前缓冲区的只读视图 + * + * @return 只读的 ByteBufferWrapper 实例 + */ + fun asReadOnly(): ByteBufferWrapper { + return ByteBufferWrapper(buffer.asReadOnlyBuffer()) + } + + /** + * 创建当前缓冲区的切片 + * 从当前位置到限制的共享视图 + * + * @return 新的 ByteBufferWrapper 实例 + */ + fun slice(): ByteBufferWrapper { + return ByteBufferWrapper(buffer.slice()) + } + + /** + * 设置位置 + * + * @param newPosition 新的位置 + * @return 当前对象(支持链式调用) + * @throws IllegalArgumentException 如果位置超出范围 + */ + fun position(newPosition: Int): ByteBufferWrapper { + buffer.position(newPosition) + return this + } + + /** + * 设置限制 + * + * @param newLimit 新的限制 + * @return 当前对象(支持链式调用) + * @throws IllegalArgumentException 如果限制超出范围 + */ + fun limit(newLimit: Int): ByteBufferWrapper { + buffer.limit(newLimit) + return this + } + + /** + * 设置标记位置 + * + * @return 当前对象(支持链式调用) + */ + fun mark(): ByteBufferWrapper { + buffer.mark() + return this + } + + /** + * 重置到标记位置 + * + * @return 当前对象(支持链式调用) + * @throws java.nio.InvalidMarkException 如果没有标记 + */ + fun reset(): ByteBufferWrapper { + buffer.reset() + return this + } + + /** + * 设置字节序 + * + * @param byteOrder 字节序(BIG_ENDIAN 或 LITTLE_ENDIAN) + * @return 当前对象(支持链式调用) + */ + fun order(byteOrder: ByteOrder): ByteBufferWrapper { + buffer.order(byteOrder) + return this + } + + /** + * 设置为大端字节序 + * + * @return 当前对象(支持链式调用) + */ + fun asBigEndian(): ByteBufferWrapper { + buffer.order(ByteOrder.BIG_ENDIAN) + return this + } + + /** + * 设置为小端字节序 + * + * @return 当前对象(支持链式调用) + */ + fun asLittleEndian(): ByteBufferWrapper { + buffer.order(ByteOrder.LITTLE_ENDIAN) + return this + } + + /** + * 清除缓冲区 + * position = 0, limit = capacity, mark = -1 + * 准备重新写入 + * + * @return 当前对象(支持链式调用) + */ + fun clear(): ByteBufferWrapper { + buffer.clear() + return this + } + + /** + * 翻转缓冲区 + * limit = position, position = 0, mark = -1 + * 用于从写入模式切换到读取模式 + * + * @return 当前对象(支持链式调用) + */ + fun flip(): ByteBufferWrapper { + buffer.flip() + return this + } + + /** + * 重绕缓冲区 + * position = 0, mark = -1 + * 准备重新读取 + * + * @return 当前对象(支持链式调用) + */ + fun rewind(): ByteBufferWrapper { + buffer.rewind() + return this + } + + /** + * 压缩缓冲区 + * 将未读数据移到开头,position = 剩余字节数,limit = capacity + * 适用于部分读取后想继续写入的场景 + * + * @return 当前对象(支持链式调用) + */ + fun compact(): ByteBufferWrapper { + buffer.compact() + return this + } + + /** + * 跳过指定字节数 + * 相当于 position += bytes + * + * @param bytes 要跳过的字节数 + * @return 当前对象(支持链式调用) + * @throws IllegalArgumentException 如果跳过的字节数超出范围 + */ + fun skip(bytes: Int): ByteBufferWrapper { + buffer.position(buffer.position() + bytes) + return this + } + + /** + * 跳转到指定位置 + * + * @param newPosition 目标位置 + * @return 当前对象(支持链式调用) + */ + fun jumpTo(newPosition: Int): ByteBufferWrapper { + buffer.position(newPosition) + return this + } + + /** + * 回到开头 + * position = 0 + * + * @return 当前对象(支持链式调用) + */ + fun rewindToStart(): ByteBufferWrapper { + buffer.position(0) + return this + } + + /** + * 跳到末尾 + * position = limit + * + * @return 当前对象(支持链式调用) + */ + fun jumpToEnd(): ByteBufferWrapper { + buffer.position(buffer.limit()) + return this + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/buffer/convertor/ByteBufferWrapperConvertor.kt b/src/main/kotlin/com/mingliqiye/utils/buffer/convertor/ByteBufferWrapperConvertor.kt index 7a45a40..5d4d7bb 100644 --- a/src/main/kotlin/com/mingliqiye/utils/buffer/convertor/ByteBufferWrapperConvertor.kt +++ b/src/main/kotlin/com/mingliqiye/utils/buffer/convertor/ByteBufferWrapperConvertor.kt @@ -34,243 +34,243 @@ import java.util.concurrent.ConcurrentHashMap import java.util.UUID as JUUID interface ByteBufferWrapperConvertorInterface { - fun write(obj: T, byteBufferWrapper: ByteBufferWrapper) - fun read(byteBufferWrapper: ByteBufferWrapper, parameters: Array): T - fun getType(): Class + fun write(obj: T, byteBufferWrapper: ByteBufferWrapper) + fun read(byteBufferWrapper: ByteBufferWrapper, parameters: Array): T + fun getType(): Class } abstract class ByteBufferWrapperConvertor : ByteBufferWrapperConvertorInterface { - override fun toString(): String { - return "ByteBufferWrapperConvertor(type=${getType()})" - } + override fun toString(): String { + return "ByteBufferWrapperConvertor(type=${getType()})" + } - companion object { - private val _instantiations = - ConcurrentHashMap>, ByteBufferWrapperConvertor<*>>() + companion object { + private val _instantiations = + ConcurrentHashMap>, ByteBufferWrapperConvertor<*>>() - @JvmStatic - fun getInstantiation(clazz: Class>): ByteBufferWrapperConvertor<*> { - return _instantiations.getOrPut(clazz) { - clazz.getConstructor().newInstance() - } - } + @JvmStatic + fun getInstantiation(clazz: Class>): ByteBufferWrapperConvertor<*> { + return _instantiations.getOrPut(clazz) { + clazz.getConstructor().newInstance() + } + } - @JvmStatic - @Suppress("UNCHECKED_CAST") - inline fun > getInstantiation(): ByteBufferWrapperConvertor<*> { - return getInstantiation(T::class.java as Class>) - } + @JvmStatic + @Suppress("UNCHECKED_CAST") + inline fun > getInstantiation(): ByteBufferWrapperConvertor<*> { + return getInstantiation(T::class.java as Class>) + } - fun defaultConvertorInstall() { - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - ByteBufferWrapper.addConvertor() - } - } + fun defaultConvertorInstall() { + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + ByteBufferWrapper.addConvertor() + } + } } abstract class ObjectBufferWrapperConvertor( - val write: ByteBufferWrapper.(obj: T) -> Unit, - val read: ByteBufferWrapper.() -> T, - val typer: Class, + val write: ByteBufferWrapper.(obj: T) -> Unit, + val read: ByteBufferWrapper.() -> T, + val typer: Class, ) : ByteBufferWrapperConvertor() { - override fun write(obj: T, byteBufferWrapper: ByteBufferWrapper) = write.invoke(byteBufferWrapper, obj) - override fun read(byteBufferWrapper: ByteBufferWrapper, parameters: Array): T = - read.invoke(byteBufferWrapper) + override fun write(obj: T, byteBufferWrapper: ByteBufferWrapper) = write.invoke(byteBufferWrapper, obj) + override fun read(byteBufferWrapper: ByteBufferWrapper, parameters: Array): T = + read.invoke(byteBufferWrapper) - override fun getType(): Class = typer + override fun getType(): Class = typer } class BytedBufferWrapperConvertor : ObjectBufferWrapperConvertor( - ByteBufferWrapper::putByte, - ByteBufferWrapper::getByte, - Byte::class.java, + ByteBufferWrapper::putByte, + ByteBufferWrapper::getByte, + Byte::class.java, ) class CharBufferWrapperConvertor : ObjectBufferWrapperConvertor( - ByteBufferWrapper::putChar, - ByteBufferWrapper::getChar, - Char::class.java, + ByteBufferWrapper::putChar, + ByteBufferWrapper::getChar, + Char::class.java, ) class ShortBufferWrapperConvertor : ObjectBufferWrapperConvertor( - ByteBufferWrapper::putShort, - ByteBufferWrapper::getShort, - Short::class.java, + ByteBufferWrapper::putShort, + ByteBufferWrapper::getShort, + Short::class.java, ) class IntBufferWrapperConvertor : ObjectBufferWrapperConvertor( - ByteBufferWrapper::putInt, - ByteBufferWrapper::getInt, - Int::class.java, + ByteBufferWrapper::putInt, + ByteBufferWrapper::getInt, + Int::class.java, ) class LongBufferWrapperConvertor : ObjectBufferWrapperConvertor( - ByteBufferWrapper::putLong, - ByteBufferWrapper::getLong, - Long::class.java, + ByteBufferWrapper::putLong, + ByteBufferWrapper::getLong, + Long::class.java, ) class DoubleBufferWrapperConvertor : ObjectBufferWrapperConvertor( - ByteBufferWrapper::putDouble, - ByteBufferWrapper::getDouble, - Double::class.java, + ByteBufferWrapper::putDouble, + ByteBufferWrapper::getDouble, + Double::class.java, ) class FloatBufferWrapperConvertor : ObjectBufferWrapperConvertor( - ByteBufferWrapper::putFloat, - ByteBufferWrapper::getFloat, - Float::class.java, + ByteBufferWrapper::putFloat, + ByteBufferWrapper::getFloat, + Float::class.java, ) class BigIntegerBufferWrapperConvertor : ObjectBufferWrapperConvertor( - ByteBufferWrapper::putBigInteger, - ByteBufferWrapper::getBigInteger, - BigInteger::class.java, + ByteBufferWrapper::putBigInteger, + ByteBufferWrapper::getBigInteger, + BigInteger::class.java, ) class BigDecimalBufferWrapperConvertor : ObjectBufferWrapperConvertor( - ByteBufferWrapper::putBigDecimal, - ByteBufferWrapper::getBigDecimal, - BigDecimal::class.java, + ByteBufferWrapper::putBigDecimal, + ByteBufferWrapper::getBigDecimal, + BigDecimal::class.java, ) class BooleanBufferWrapperConvertor : ObjectBufferWrapperConvertor( - ByteBufferWrapper::putBoolean, - ByteBufferWrapper::getBoolean, - Boolean::class.java, + ByteBufferWrapper::putBoolean, + ByteBufferWrapper::getBoolean, + Boolean::class.java, ) class StringBufferWrapperConvertor : ObjectBufferWrapperConvertor( - ByteBufferWrapper::putString, - ByteBufferWrapper::getString, - String::class.java, + ByteBufferWrapper::putString, + ByteBufferWrapper::getString, + String::class.java, ) class ByteFlagsBufferWrapperConvertor : ObjectBufferWrapperConvertor( - ByteBufferWrapper::putFlag, - ByteBufferWrapper::getFlag, - ByteFlags::class.java, + ByteBufferWrapper::putFlag, + ByteBufferWrapper::getFlag, + ByteFlags::class.java, ) class JUUIDBufferWrapperConvertor : ObjectBufferWrapperConvertor( - ByteBufferWrapper::putUUID, - ByteBufferWrapper::getJUUID, - JUUID::class.java, + ByteBufferWrapper::putUUID, + ByteBufferWrapper::getJUUID, + JUUID::class.java, ) class UUIDBufferWrapperConvertor : ObjectBufferWrapperConvertor( - ByteBufferWrapper::putUUID, - ByteBufferWrapper::getUUID, - UUID::class.java, + ByteBufferWrapper::putUUID, + ByteBufferWrapper::getUUID, + UUID::class.java, ) class DateTimeFlagsBufferWrapperConvertor : ObjectBufferWrapperConvertor( - ByteBufferWrapper::putDateTime, - ByteBufferWrapper::getDateTime, - DateTime::class.java, + ByteBufferWrapper::putDateTime, + ByteBufferWrapper::getDateTime, + DateTime::class.java, ) class LocalDateTimeBufferWrapperConvertor : ObjectBufferWrapperConvertor( - ByteBufferWrapper::putLocalDateTime, - ByteBufferWrapper::getLocalDateTime, - LocalDateTime::class.java, + ByteBufferWrapper::putLocalDateTime, + ByteBufferWrapper::getLocalDateTime, + LocalDateTime::class.java, ) class DateBufferWrapperConvertor : ObjectBufferWrapperConvertor( - ByteBufferWrapper::putDate, - ByteBufferWrapper::getDate, - Date::class.java, + ByteBufferWrapper::putDate, + ByteBufferWrapper::getDate, + Date::class.java, ) abstract class ArrayBufferWrapperConvertor( - val write: ByteBufferWrapper.(obj: T) -> Unit, - val read: ByteBufferWrapper.(size: Int) -> T, - val typer: Class, + val write: ByteBufferWrapper.(obj: T) -> Unit, + val read: ByteBufferWrapper.(size: Int) -> T, + val typer: Class, ) : ByteBufferWrapperConvertor() { - override fun write(obj: T, byteBufferWrapper: ByteBufferWrapper) = write.invoke(byteBufferWrapper, obj) - override fun read(byteBufferWrapper: ByteBufferWrapper, parameters: Array): T { - if (parameters.isEmpty()) { - throw IllegalArgumentException("parameters cannot be empty, must has a Int") - } - val size = parameters[0] - if (size !is Int) - throw IllegalArgumentException("parameters[0] cannot be Int, must has a Int") - return read.invoke(byteBufferWrapper, size) - } + override fun write(obj: T, byteBufferWrapper: ByteBufferWrapper) = write.invoke(byteBufferWrapper, obj) + override fun read(byteBufferWrapper: ByteBufferWrapper, parameters: Array): T { + if (parameters.isEmpty()) { + throw IllegalArgumentException("parameters cannot be empty, must has a Int") + } + val size = parameters[0] + if (size !is Int) + throw IllegalArgumentException("parameters[0] cannot be Int, must has a Int") + return read.invoke(byteBufferWrapper, size) + } - override fun getType(): Class = typer + override fun getType(): Class = typer } class ByteArrayBufferWrapperConvertor : ArrayBufferWrapperConvertor( - ByteBufferWrapper::putByteArray, - ByteBufferWrapper::getByteArray, - ByteArray::class.java, + ByteBufferWrapper::putByteArray, + ByteBufferWrapper::getByteArray, + ByteArray::class.java, ) class CharArrayBufferWrapperConvertor : ArrayBufferWrapperConvertor( - ByteBufferWrapper::putCharArray, - ByteBufferWrapper::getCharArray, - CharArray::class.java, + ByteBufferWrapper::putCharArray, + ByteBufferWrapper::getCharArray, + CharArray::class.java, ) class ShortArrayBufferWrapperConvertor : ArrayBufferWrapperConvertor( - ByteBufferWrapper::putShortArray, - ByteBufferWrapper::getShortArray, - ShortArray::class.java, + ByteBufferWrapper::putShortArray, + ByteBufferWrapper::getShortArray, + ShortArray::class.java, ) class IntArrayBufferWrapperConvertor : ArrayBufferWrapperConvertor( - ByteBufferWrapper::putIntArray, - ByteBufferWrapper::getIntArray, - IntArray::class.java, + ByteBufferWrapper::putIntArray, + ByteBufferWrapper::getIntArray, + IntArray::class.java, ) class LongArrayBufferWrapperConvertor : ArrayBufferWrapperConvertor( - ByteBufferWrapper::putLongArray, - ByteBufferWrapper::getLongArray, - LongArray::class.java, + ByteBufferWrapper::putLongArray, + ByteBufferWrapper::getLongArray, + LongArray::class.java, ) class FloatArrayBufferWrapperConvertor : ArrayBufferWrapperConvertor( - ByteBufferWrapper::putFloatArray, - ByteBufferWrapper::getFloatArray, - FloatArray::class.java, + ByteBufferWrapper::putFloatArray, + ByteBufferWrapper::getFloatArray, + FloatArray::class.java, ) class DoubleArrayBufferWrapperConvertor : ArrayBufferWrapperConvertor( - ByteBufferWrapper::putDoubleArray, - ByteBufferWrapper::getDoubleArray, - DoubleArray::class.java, + ByteBufferWrapper::putDoubleArray, + ByteBufferWrapper::getDoubleArray, + DoubleArray::class.java, ) class BooleanArrayBufferWrapperConvertor : ArrayBufferWrapperConvertor( - ByteBufferWrapper::putBooleanArray, - ByteBufferWrapper::getBooleanArray, - BooleanArray::class.java, + ByteBufferWrapper::putBooleanArray, + ByteBufferWrapper::getBooleanArray, + BooleanArray::class.java, ) diff --git a/src/main/kotlin/com/mingliqiye/utils/bytes/ByteBufferUtils.kt b/src/main/kotlin/com/mingliqiye/utils/bytes/ByteBufferUtils.kt index 4fa620d..fc78cb5 100644 --- a/src/main/kotlin/com/mingliqiye/utils/bytes/ByteBufferUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/bytes/ByteBufferUtils.kt @@ -40,7 +40,7 @@ import java.nio.charset.Charset * @return 当前 [ByteBuffer] 实例(支持链式调用) */ fun ByteBuffer.putString(string: String, charset: Charset = Charsets.UTF_8): ByteBuffer = - this.put(string.toByteArray(charset)).put(0x00) + this.put(string.toByteArray(charset)).put(0x00) /** * 从 [ByteBuffer] 中读取一个以空字节(`0x00`)结尾的字符串。 @@ -53,15 +53,15 @@ fun ByteBuffer.putString(string: String, charset: Charset = Charsets.UTF_8): Byt * @throws BufferUnderflowException 如果缓冲区中没有足够的字节(即未找到终止符) */ fun ByteBuffer.getString(charset: Charset = Charsets.UTF_8): String { - val data = ArrayList() - while (true) { - val byte = this.get() - if (byte == 0x00.toByte()) { - break - } - data.add(byte) - } - return String(data.toByteArray(), charset) + val data = ArrayList() + while (true) { + val byte = this.get() + if (byte == 0x00.toByte()) { + break + } + data.add(byte) + } + return String(data.toByteArray(), charset) } /** @@ -72,9 +72,9 @@ fun ByteBuffer.getString(charset: Charset = Charsets.UTF_8): String { * @return 包含剩余字节的新字节数组 */ fun ByteBuffer.toByteArray(): ByteArray { - val ba = ByteArray(this.remaining()) - this.get(ba) - return ba + val ba = ByteArray(this.remaining()) + this.get(ba) + return ba } /** @@ -87,18 +87,18 @@ fun ByteBuffer.toByteArray(): ByteArray { * @throws IndexOutOfBoundsException 如果列表长度不足 8 */ fun ByteBuffer.putByteFlags( - bit: List = List(8) { false }, + bit: List = List(8) { false }, ): ByteBuffer = this.putByteFlags( - ByteFlags( - bit[0], - bit[1], - bit[2], - bit[3], - bit[4], - bit[5], - bit[6], - bit[7], - ) + ByteFlags( + bit[0], + bit[1], + bit[2], + bit[3], + bit[4], + bit[5], + bit[6], + bit[7], + ) ) /** @@ -111,18 +111,18 @@ fun ByteBuffer.putByteFlags( * @throws IndexOutOfBoundsException 如果数组长度不足 8 */ fun ByteBuffer.putByteFlags( - bit: BooleanArray = BooleanArray(8), + bit: BooleanArray = BooleanArray(8), ): ByteBuffer = this.putByteFlags( - ByteFlags( - bit[0], - bit[1], - bit[2], - bit[3], - bit[4], - bit[5], - bit[6], - bit[7], - ) + ByteFlags( + bit[0], + bit[1], + bit[2], + bit[3], + bit[4], + bit[5], + bit[6], + bit[7], + ) ) /** @@ -149,25 +149,25 @@ fun ByteBuffer.putByteFlags(byteFlags: ByteFlags): ByteBuffer = this.put(byteFla * @return 当前 [ByteBuffer] 实例(支持链式调用) */ fun ByteBuffer.putByteFlags( - bit0: Boolean = false, - bit1: Boolean = false, - bit2: Boolean = false, - bit3: Boolean = false, - bit4: Boolean = false, - bit5: Boolean = false, - bit6: Boolean = false, - bit7: Boolean = false, + bit0: Boolean = false, + bit1: Boolean = false, + bit2: Boolean = false, + bit3: Boolean = false, + bit4: Boolean = false, + bit5: Boolean = false, + bit6: Boolean = false, + bit7: Boolean = false, ): ByteBuffer = this.putByteFlags( - ByteFlags( - bit0, - bit1, - bit2, - bit3, - bit4, - bit5, - bit6, - bit7, - ) + ByteFlags( + bit0, + bit1, + bit2, + bit3, + bit4, + bit5, + bit6, + bit7, + ) ) /** @@ -204,7 +204,7 @@ fun ByteBuffer.putBoolean(boolean: Boolean): ByteBuffer = this.put(if (boolean) * @return 包装后的 [ByteBuffer] 实例 */ fun ByteArray.toByteBuffer(): ByteBuffer { - return ByteBuffer.wrap(this) + return ByteBuffer.wrap(this) } /** @@ -219,19 +219,19 @@ fun ByteArray.toByteBuffer(): ByteBuffer { * @throws IOException 当读取过程中发生IO异常时抛出。 */ fun ByteBuffer.getVarLong(size: Int = 8): Long { - var numRead = 0 - var result: Long = 0 - var read: Byte - do { - read = this.get() - // 将当前字节的有效7位数据左移相应位置后与结果进行按位或运算 - result = result or ((read.toLong() and 127) shl (7 * numRead)) - numRead++ - if (numRead > size) { - throw IOException("VarNumber is too big") - } - } while ((read.toLong() and 128) != 0L) - return result + var numRead = 0 + var result: Long = 0 + var read: Byte + do { + read = this.get() + // 将当前字节的有效7位数据左移相应位置后与结果进行按位或运算 + result = result or ((read.toLong() and 127) shl (7 * numRead)) + numRead++ + if (numRead > size) { + throw IOException("VarNumber is too big") + } + } while ((read.toLong() and 128) != 0L) + return result } /** @@ -269,13 +269,13 @@ fun ByteBuffer.getVarLong(): Long = this.getVarLong(8) * @return 当前ByteBuffer实例(支持链式调用) */ fun ByteBuffer.putVarLong(value: Long): ByteBuffer { - var v = value - while (v >= 0x80) { - this.put((v and 0x7F or 0x80).toByte()) - v = v shr 7 - } - this.put(v.toByte()) - return this + var v = value + while (v >= 0x80) { + this.put((v and 0x7F or 0x80).toByte()) + v = v shr 7 + } + this.put(v.toByte()) + return this } /** diff --git a/src/main/kotlin/com/mingliqiye/utils/bytes/ByteConvertible.kt b/src/main/kotlin/com/mingliqiye/utils/bytes/ByteConvertible.kt index fed6c88..a674425 100644 --- a/src/main/kotlin/com/mingliqiye/utils/bytes/ByteConvertible.kt +++ b/src/main/kotlin/com/mingliqiye/utils/bytes/ByteConvertible.kt @@ -28,23 +28,23 @@ import java.nio.ByteBuffer interface ByteConvertible : Serializable { - fun toBytes(): ByteArray + fun toBytes(): ByteArray - fun writeToStream(outputStream: OutputStream) { - outputStream.write(toBytes()) - } + fun writeToStream(outputStream: OutputStream) { + outputStream.write(toBytes()) + } - fun putToByteBuffer(byteBuffer: ByteBuffer) { - byteBuffer.put(toBytes()) - } + fun putToByteBuffer(byteBuffer: ByteBuffer) { + byteBuffer.put(toBytes()) + } - companion object { - fun OutputStream.write(byteConvertible: ByteConvertible) { - byteConvertible.writeToStream(this) - } + companion object { + fun OutputStream.write(byteConvertible: ByteConvertible) { + byteConvertible.writeToStream(this) + } - fun ByteBuffer.put(byteConvertible: ByteConvertible) { - byteConvertible.putToByteBuffer(this) - } - } + fun ByteBuffer.put(byteConvertible: ByteConvertible) { + byteConvertible.putToByteBuffer(this) + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/bytes/ByteFlags.kt b/src/main/kotlin/com/mingliqiye/utils/bytes/ByteFlags.kt index cd81821..1c2aa26 100644 --- a/src/main/kotlin/com/mingliqiye/utils/bytes/ByteFlags.kt +++ b/src/main/kotlin/com/mingliqiye/utils/bytes/ByteFlags.kt @@ -32,429 +32,429 @@ package com.mingliqiye.utils.bytes * 该类支持从字节、布尔数组、二进制字符串等构造,并提供位操作、状态查询和格式化输出等功能。 */ data class ByteFlags( - /** 第 0 位(最低位,0x01) */ - var b0: Boolean = false, - /** 第 1 位(0x02) */ - var b1: Boolean = false, - /** 第 2 位(0x04) */ - var b2: Boolean = false, - /** 第 3 位(0x08) */ - var b3: Boolean = false, - /** 第 4 位(0x10) */ - var b4: Boolean = false, - /** 第 5 位(0x20) */ - var b5: Boolean = false, - /** 第 6 位(0x40) */ - var b6: Boolean = false, - /** 第 7 位(最高位,0x80) */ - var b7: Boolean = false, + /** 第 0 位(最低位,0x01) */ + var b0: Boolean = false, + /** 第 1 位(0x02) */ + var b1: Boolean = false, + /** 第 2 位(0x04) */ + var b2: Boolean = false, + /** 第 3 位(0x08) */ + var b3: Boolean = false, + /** 第 4 位(0x10) */ + var b4: Boolean = false, + /** 第 5 位(0x20) */ + var b5: Boolean = false, + /** 第 6 位(0x40) */ + var b6: Boolean = false, + /** 第 7 位(最高位,0x80) */ + var b7: Boolean = false, ) { - /** - * 通过一个 [Byte] 值构造 [ByteFlags] 实例。 - * - * @param byte 用于初始化的字节值(仅使用低 8 位) - */ - constructor(byte: Byte) : this() { - fromByte(byte) - } + /** + * 通过一个 [Byte] 值构造 [ByteFlags] 实例。 + * + * @param byte 用于初始化的字节值(仅使用低 8 位) + */ + constructor(byte: Byte) : this() { + fromByte(byte) + } - /** - * 从给定的 [Byte] 值解析并设置各个位标志。 - * - * @param byte 要解析的字节 - */ - fun fromByte(byte: Byte) { - val value = byte.toInt() and 0xFF - b0 = (value and 0x01) != 0 - b1 = (value and 0x02) != 0 - b2 = (value and 0x04) != 0 - b3 = (value and 0x08) != 0 - b4 = (value and 0x10) != 0 - b5 = (value and 0x20) != 0 - b6 = (value and 0x40) != 0 - b7 = (value and 0x80) != 0 - } + /** + * 从给定的 [Byte] 值解析并设置各个位标志。 + * + * @param byte 要解析的字节 + */ + fun fromByte(byte: Byte) { + val value = byte.toInt() and 0xFF + b0 = (value and 0x01) != 0 + b1 = (value and 0x02) != 0 + b2 = (value and 0x04) != 0 + b3 = (value and 0x08) != 0 + b4 = (value and 0x10) != 0 + b5 = (value and 0x20) != 0 + b6 = (value and 0x40) != 0 + b7 = (value and 0x80) != 0 + } - /** - * 将当前标志状态转换为一个 [Byte] 值。 - * - * @return 对应的字节值(范围 0x00 ~ 0xFF,以有符号字节形式返回) - */ - fun toByte(): Byte { - var result = 0 - if (b0) result = result or 0x01 - if (b1) result = result or 0x02 - if (b2) result = result or 0x04 - if (b3) result = result or 0x08 - if (b4) result = result or 0x10 - if (b5) result = result or 0x20 - if (b6) result = result or 0x40 - if (b7) result = result or 0x80 - return result.toByte() - } + /** + * 将当前标志状态转换为一个 [Byte] 值。 + * + * @return 对应的字节值(范围 0x00 ~ 0xFF,以有符号字节形式返回) + */ + fun toByte(): Byte { + var result = 0 + if (b0) result = result or 0x01 + if (b1) result = result or 0x02 + if (b2) result = result or 0x04 + if (b3) result = result or 0x08 + if (b4) result = result or 0x10 + if (b5) result = result or 0x20 + if (b6) result = result or 0x40 + if (b7) result = result or 0x80 + return result.toByte() + } - /** - * 通过索引(0~7)获取对应位的布尔值。 - * - * @param index 位索引(0 = LSB, 7 = MSB) - * @return 该位是否为 true - * @throws IndexOutOfBoundsException 如果索引不在 0~7 范围内 - */ - operator fun get(index: Int): Boolean { - return when (index) { - 0 -> b0 - 1 -> b1 - 2 -> b2 - 3 -> b3 - 4 -> b4 - 5 -> b5 - 6 -> b6 - 7 -> b7 - else -> throw IndexOutOfBoundsException("索引必须在0-7之间") - } - } + /** + * 通过索引(0~7)获取对应位的布尔值。 + * + * @param index 位索引(0 = LSB, 7 = MSB) + * @return 该位是否为 true + * @throws IndexOutOfBoundsException 如果索引不在 0~7 范围内 + */ + operator fun get(index: Int): Boolean { + return when (index) { + 0 -> b0 + 1 -> b1 + 2 -> b2 + 3 -> b3 + 4 -> b4 + 5 -> b5 + 6 -> b6 + 7 -> b7 + else -> throw IndexOutOfBoundsException("索引必须在0-7之间") + } + } - /** - * 通过索引(0~7)设置对应位的布尔值。 - * - * @param index 位索引(0 = LSB, 7 = MSB) - * @param value 要设置的布尔值 - * @throws IndexOutOfBoundsException 如果索引不在 0~7 范围内 - */ - operator fun set(index: Int, value: Boolean) { - when (index) { - 0 -> b0 = value - 1 -> b1 = value - 2 -> b2 = value - 3 -> b3 = value - 4 -> b4 = value - 5 -> b5 = value - 6 -> b6 = value - 7 -> b7 = value - else -> throw IndexOutOfBoundsException("索引必须在0-7之间") - } - } + /** + * 通过索引(0~7)设置对应位的布尔值。 + * + * @param index 位索引(0 = LSB, 7 = MSB) + * @param value 要设置的布尔值 + * @throws IndexOutOfBoundsException 如果索引不在 0~7 范围内 + */ + operator fun set(index: Int, value: Boolean) { + when (index) { + 0 -> b0 = value + 1 -> b1 = value + 2 -> b2 = value + 3 -> b3 = value + 4 -> b4 = value + 5 -> b5 = value + 6 -> b6 = value + 7 -> b7 = value + else -> throw IndexOutOfBoundsException("索引必须在0-7之间") + } + } - /** - * 将所有 8 个位设置为 `true`。 - */ - fun setAll() { - b0 = true - b1 = true - b2 = true - b3 = true - b4 = true - b5 = true - b6 = true - b7 = true - } + /** + * 将所有 8 个位设置为 `true`。 + */ + fun setAll() { + b0 = true + b1 = true + b2 = true + b3 = true + b4 = true + b5 = true + b6 = true + b7 = true + } - /** - * 将所有 8 个位设置为 `false`。 - */ - fun clearAll() { - b0 = false - b1 = false - b2 = false - b3 = false - b4 = false - b5 = false - b6 = false - b7 = false - } + /** + * 将所有 8 个位设置为 `false`。 + */ + fun clearAll() { + b0 = false + b1 = false + b2 = false + b3 = false + b4 = false + b5 = false + b6 = false + b7 = false + } - /** - * 对所有位执行逻辑取反(true ↔ false)。 - */ - fun toggleAll() { - b0 = !b0 - b1 = !b1 - b2 = !b2 - b3 = !b3 - b4 = !b4 - b5 = !b5 - b6 = !b6 - b7 = !b7 - } + /** + * 对所有位执行逻辑取反(true ↔ false)。 + */ + fun toggleAll() { + b0 = !b0 + b1 = !b1 + b2 = !b2 + b3 = !b3 + b4 = !b4 + b5 = !b5 + b6 = !b6 + b7 = !b7 + } - /** - * 切换指定索引位的状态(true 变 false,反之亦然)。 - * - * @param index 要切换的位索引(0~7) - * @throws IndexOutOfBoundsException 如果索引无效 - */ - fun toggle(index: Int) { - this[index] = !this[index] - } + /** + * 切换指定索引位的状态(true 变 false,反之亦然)。 + * + * @param index 要切换的位索引(0~7) + * @throws IndexOutOfBoundsException 如果索引无效 + */ + fun toggle(index: Int) { + this[index] = !this[index] + } - /** - * 检查是否所有位都为 `true`。 - * - * @return 若全部为 true 则返回 true,否则 false - */ - fun allTrue(): Boolean { - return b0 && b1 && b2 && b3 && b4 && b5 && b6 && b7 - } + /** + * 检查是否所有位都为 `true`。 + * + * @return 若全部为 true 则返回 true,否则 false + */ + fun allTrue(): Boolean { + return b0 && b1 && b2 && b3 && b4 && b5 && b6 && b7 + } - /** - * 检查是否所有位都为 `false`。 - * - * @return 若全部为 false 则返回 true,否则 false - */ - fun allFalse(): Boolean { - return !b0 && !b1 && !b2 && !b3 && !b4 && !b5 && !b6 && !b7 - } + /** + * 检查是否所有位都为 `false`。 + * + * @return 若全部为 false 则返回 true,否则 false + */ + fun allFalse(): Boolean { + return !b0 && !b1 && !b2 && !b3 && !b4 && !b5 && !b6 && !b7 + } - /** - * 统计值为 `true` 的位数量。 - * - * @return true 位的个数(0~8) - */ - fun countTrue(): Int { - var count = 0 - if (b0) count++ - if (b1) count++ - if (b2) count++ - if (b3) count++ - if (b4) count++ - if (b5) count++ - if (b6) count++ - if (b7) count++ - return count - } + /** + * 统计值为 `true` 的位数量。 + * + * @return true 位的个数(0~8) + */ + fun countTrue(): Int { + var count = 0 + if (b0) count++ + if (b1) count++ + if (b2) count++ + if (b3) count++ + if (b4) count++ + if (b5) count++ + if (b6) count++ + if (b7) count++ + return count + } - /** - * 统计值为 `false` 的位数量。 - * - * @return false 位的个数(0~8) - */ - fun countFalse(): Int = 8 - countTrue() + /** + * 统计值为 `false` 的位数量。 + * + * @return false 位的个数(0~8) + */ + fun countFalse(): Int = 8 - countTrue() - /** - * 通过位名称(如 "b0"、"bit3" 等)获取对应位的值。 - * - * 支持别名:`bN` 或 `bitN`(不区分大小写)。 - * - * @param name 位的名称(例如 "b0", "BIT5") - * @return 对应位的布尔值 - * @throws IllegalArgumentException 如果名称无效 - */ - fun getByName(name: String): Boolean { - return when (name.lowercase()) { - "b0", "bit0" -> b0 - "b1", "bit1" -> b1 - "b2", "bit2" -> b2 - "b3", "bit3" -> b3 - "b4", "bit4" -> b4 - "b5", "bit5" -> b5 - "b6", "bit6" -> b6 - "b7", "bit7" -> b7 - else -> throw IllegalArgumentException("未知的位名称: $name") - } - } + /** + * 通过位名称(如 "b0"、"bit3" 等)获取对应位的值。 + * + * 支持别名:`bN` 或 `bitN`(不区分大小写)。 + * + * @param name 位的名称(例如 "b0", "BIT5") + * @return 对应位的布尔值 + * @throws IllegalArgumentException 如果名称无效 + */ + fun getByName(name: String): Boolean { + return when (name.lowercase()) { + "b0", "bit0" -> b0 + "b1", "bit1" -> b1 + "b2", "bit2" -> b2 + "b3", "bit3" -> b3 + "b4", "bit4" -> b4 + "b5", "bit5" -> b5 + "b6", "bit6" -> b6 + "b7", "bit7" -> b7 + else -> throw IllegalArgumentException("未知的位名称: $name") + } + } - /** - * 将当前状态转换为标准二进制字符串(MSB 在前)。 - * - * 例如:若 b7=true, b6=false, ..., b0=true,则返回 "10000001" - * - * @return 8 位二进制字符串(高位在左) - */ - fun toBinaryString(): String { - return buildString { - if (b7) append('1') else append('0') - if (b6) append('1') else append('0') - if (b5) append('1') else append('0') - if (b4) append('1') else append('0') - if (b3) append('1') else append('0') - if (b2) append('1') else append('0') - if (b1) append('1') else append('0') - if (b0) append('1') else append('0') - } - } + /** + * 将当前状态转换为标准二进制字符串(MSB 在前)。 + * + * 例如:若 b7=true, b6=false, ..., b0=true,则返回 "10000001" + * + * @return 8 位二进制字符串(高位在左) + */ + fun toBinaryString(): String { + return buildString { + if (b7) append('1') else append('0') + if (b6) append('1') else append('0') + if (b5) append('1') else append('0') + if (b4) append('1') else append('0') + if (b3) append('1') else append('0') + if (b2) append('1') else append('0') + if (b1) append('1') else append('0') + if (b0) append('1') else append('0') + } + } - /** - * 将当前状态转换为十六进制字符串(带 0x 前缀,大写,两位)。 - * - * 例如:若值为 10,则返回 "0x0A" - * - * @return 格式如 "0xXX" 的十六进制字符串 - */ - fun toHexString(): String { - return "0x" + (toByte().toInt() and 0xFF).toString(16).padStart(2, '0').uppercase() - } + /** + * 将当前状态转换为十六进制字符串(带 0x 前缀,大写,两位)。 + * + * 例如:若值为 10,则返回 "0x0A" + * + * @return 格式如 "0xXX" 的十六进制字符串 + */ + fun toHexString(): String { + return "0x" + (toByte().toInt() and 0xFF).toString(16).padStart(2, '0').uppercase() + } - /** - * 将当前位状态转换为布尔数组。 - * - * 数组顺序为 [b0, b1, b2, ..., b7](LSB 在前)。 - * - * @return 长度为 8 的布尔数组 - */ - fun toBooleanArray(): BooleanArray { - return booleanArrayOf(b0, b1, b2, b3, b4, b5, b6, b7) - } + /** + * 将当前位状态转换为布尔数组。 + * + * 数组顺序为 [b0, b1, b2, ..., b7](LSB 在前)。 + * + * @return 长度为 8 的布尔数组 + */ + fun toBooleanArray(): BooleanArray { + return booleanArrayOf(b0, b1, b2, b3, b4, b5, b6, b7) + } - /** - * 从布尔数组初始化位状态。 - * - * 使用数组的前 8 个元素(索引 0~7),分别对应 b0~b7。 - * - * @param array 布尔数组(长度至少为 8) - * @throws IllegalArgumentException 如果数组长度不足 8 - */ - fun fromBooleanArray(array: BooleanArray) { - require(array.size >= 8) { "数组长度至少为8" } - b0 = array[0] - b1 = array[1] - b2 = array[2] - b3 = array[3] - b4 = array[4] - b5 = array[5] - b6 = array[6] - b7 = array[7] - } + /** + * 从布尔数组初始化位状态。 + * + * 使用数组的前 8 个元素(索引 0~7),分别对应 b0~b7。 + * + * @param array 布尔数组(长度至少为 8) + * @throws IllegalArgumentException 如果数组长度不足 8 + */ + fun fromBooleanArray(array: BooleanArray) { + require(array.size >= 8) { "数组长度至少为8" } + b0 = array[0] + b1 = array[1] + b2 = array[2] + b3 = array[3] + b4 = array[4] + b5 = array[5] + b6 = array[6] + b7 = array[7] + } - /** - * 对两个 [ByteFlags] 执行按位“与”操作(AND)。 - * - * 结果的每一位 = this位 && other位 - * - * @param other 另一个 ByteFlags 实例 - * @return 新的 ByteFlags 实例,表示 AND 结果 - */ - infix fun and(other: ByteFlags): ByteFlags { - return ByteFlags( - this.b0 && other.b0, - this.b1 && other.b1, - this.b2 && other.b2, - this.b3 && other.b3, - this.b4 && other.b4, - this.b5 && other.b5, - this.b6 && other.b6, - this.b7 && other.b7 - ) - } + /** + * 对两个 [ByteFlags] 执行按位“与”操作(AND)。 + * + * 结果的每一位 = this位 && other位 + * + * @param other 另一个 ByteFlags 实例 + * @return 新的 ByteFlags 实例,表示 AND 结果 + */ + infix fun and(other: ByteFlags): ByteFlags { + return ByteFlags( + this.b0 && other.b0, + this.b1 && other.b1, + this.b2 && other.b2, + this.b3 && other.b3, + this.b4 && other.b4, + this.b5 && other.b5, + this.b6 && other.b6, + this.b7 && other.b7 + ) + } - /** - * 对两个 [ByteFlags] 执行按位“或”操作(OR)。 - * - * 结果的每一位 = this位 || other位 - * - * @param other 另一个 ByteFlags 实例 - * @return 新的 ByteFlags 实例,表示 OR 结果 - */ - infix fun or(other: ByteFlags): ByteFlags { - return ByteFlags( - this.b0 || other.b0, - this.b1 || other.b1, - this.b2 || other.b2, - this.b3 || other.b3, - this.b4 || other.b4, - this.b5 || other.b5, - this.b6 || other.b6, - this.b7 || other.b7 - ) - } + /** + * 对两个 [ByteFlags] 执行按位“或”操作(OR)。 + * + * 结果的每一位 = this位 || other位 + * + * @param other 另一个 ByteFlags 实例 + * @return 新的 ByteFlags 实例,表示 OR 结果 + */ + infix fun or(other: ByteFlags): ByteFlags { + return ByteFlags( + this.b0 || other.b0, + this.b1 || other.b1, + this.b2 || other.b2, + this.b3 || other.b3, + this.b4 || other.b4, + this.b5 || other.b5, + this.b6 || other.b6, + this.b7 || other.b7 + ) + } - /** - * 对两个 [ByteFlags] 执行按位“异或”操作(XOR)。 - * - * 结果的每一位 = this位 != other位 - * - * @param other 另一个 ByteFlags 实例 - * @return 新的 ByteFlags 实例,表示 XOR 结果 - */ - infix fun xor(other: ByteFlags): ByteFlags { - return ByteFlags( - this.b0 != other.b0, - this.b1 != other.b1, - this.b2 != other.b2, - this.b3 != other.b3, - this.b4 != other.b4, - this.b5 != other.b5, - this.b6 != other.b6, - this.b7 != other.b7 - ) - } + /** + * 对两个 [ByteFlags] 执行按位“异或”操作(XOR)。 + * + * 结果的每一位 = this位 != other位 + * + * @param other 另一个 ByteFlags 实例 + * @return 新的 ByteFlags 实例,表示 XOR 结果 + */ + infix fun xor(other: ByteFlags): ByteFlags { + return ByteFlags( + this.b0 != other.b0, + this.b1 != other.b1, + this.b2 != other.b2, + this.b3 != other.b3, + this.b4 != other.b4, + this.b5 != other.b5, + this.b6 != other.b6, + this.b7 != other.b7 + ) + } - /** - * 对当前 [ByteFlags] 执行按位“非”操作(NOT)。 - * - * 每一位取反。 - * - * @return 新的 ByteFlags 实例,所有位取反 - */ - operator fun not(): ByteFlags { - return ByteFlags( - !b0, !b1, !b2, !b3, !b4, !b5, !b6, !b7 - ) - } + /** + * 对当前 [ByteFlags] 执行按位“非”操作(NOT)。 + * + * 每一位取反。 + * + * @return 新的 ByteFlags 实例,所有位取反 + */ + operator fun not(): ByteFlags { + return ByteFlags( + !b0, !b1, !b2, !b3, !b4, !b5, !b6, !b7 + ) + } - /** - * 返回可读的字符串表示,包含二进制和十六进制形式。 - * - * 示例:`ByteFlags(10100001 = 0xA1)` - * - * @return 字符串描述 - */ - override fun toString(): String { - return "ByteFlags(${toBinaryString()} = ${toHexString()})" - } + /** + * 返回可读的字符串表示,包含二进制和十六进制形式。 + * + * 示例:`ByteFlags(10100001 = 0xA1)` + * + * @return 字符串描述 + */ + override fun toString(): String { + return "ByteFlags(${toBinaryString()} = ${toHexString()})" + } - companion object { - /** - * 创建一个所有位均为 `true` 的 [ByteFlags] 实例。 - * - * @return 全 1 的 ByteFlags(值为 0xFF) - */ - fun allTrue(): ByteFlags { - return ByteFlags(b0 = true, b1 = true, b2 = true, b3 = true, b4 = true, b5 = true, b6 = true, b7 = true) - } + companion object { + /** + * 创建一个所有位均为 `true` 的 [ByteFlags] 实例。 + * + * @return 全 1 的 ByteFlags(值为 0xFF) + */ + fun allTrue(): ByteFlags { + return ByteFlags(b0 = true, b1 = true, b2 = true, b3 = true, b4 = true, b5 = true, b6 = true, b7 = true) + } - /** - * 创建一个所有位均为 `false` 的 [ByteFlags] 实例。 - * - * @return 全 0 的 ByteFlags(值为 0x00) - */ - fun allFalse(): ByteFlags { - return ByteFlags() - } + /** + * 创建一个所有位均为 `false` 的 [ByteFlags] 实例。 + * + * @return 全 0 的 ByteFlags(值为 0x00) + */ + fun allFalse(): ByteFlags { + return ByteFlags() + } - /** - * 从 8 位二进制字符串创建 [ByteFlags] 实例。 - * - * 字符串格式:高位在前(MSB first),如 "10000001" 表示 b7=1, b0=1。 - * - * @param binary 8 位二进制字符串(仅含 '0' 和 '1') - * @return 对应的 ByteFlags 实例 - * @throws IllegalArgumentException 如果字符串长度不是 8 或包含非法字符 - */ - fun fromBinaryString(binary: String): ByteFlags { - require(binary.length == 8) { "二进制字符串长度必须为8" } - require(binary.all { it == '0' || it == '1' }) { "二进制字符串只能包含0和1" } + /** + * 从 8 位二进制字符串创建 [ByteFlags] 实例。 + * + * 字符串格式:高位在前(MSB first),如 "10000001" 表示 b7=1, b0=1。 + * + * @param binary 8 位二进制字符串(仅含 '0' 和 '1') + * @return 对应的 ByteFlags 实例 + * @throws IllegalArgumentException 如果字符串长度不是 8 或包含非法字符 + */ + fun fromBinaryString(binary: String): ByteFlags { + require(binary.length == 8) { "二进制字符串长度必须为8" } + require(binary.all { it == '0' || it == '1' }) { "二进制字符串只能包含0和1" } - return ByteFlags( - binary[7] == '1', // b0 是最低位(对应字符串最后一位) - binary[6] == '1', - binary[5] == '1', - binary[4] == '1', - binary[3] == '1', - binary[2] == '1', - binary[1] == '1', - binary[0] == '1' // b7 是最高位(对应字符串第一位) - ) - } + return ByteFlags( + binary[7] == '1', // b0 是最低位(对应字符串最后一位) + binary[6] == '1', + binary[5] == '1', + binary[4] == '1', + binary[3] == '1', + binary[2] == '1', + binary[1] == '1', + binary[0] == '1' // b7 是最高位(对应字符串第一位) + ) + } - /** - * 从整数创建 [ByteFlags] 实例(仅使用低 8 位)。 - * - * @param value 输入整数 - * @return 对应的 ByteFlags 实例 - */ - fun fromInt(value: Int): ByteFlags { - return ByteFlags((value and 0xFF).toByte()) - } - } + /** + * 从整数创建 [ByteFlags] 实例(仅使用低 8 位)。 + * + * @param value 输入整数 + * @return 对应的 ByteFlags 实例 + */ + fun fromInt(value: Int): ByteFlags { + return ByteFlags((value and 0xFF).toByte()) + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/bytes/ByteUtils.kt b/src/main/kotlin/com/mingliqiye/utils/bytes/ByteUtils.kt index e9c9984..26fc856 100644 --- a/src/main/kotlin/com/mingliqiye/utils/bytes/ByteUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/bytes/ByteUtils.kt @@ -87,8 +87,8 @@ const val ESC_RESERVED: Byte = 0x06 * @return 包含每个字节对应十六进制字符串的列表 */ fun ByteArray.getByteArrayString(): MutableList { - return this.toList().stream().map { a -> String.format("0X%02X", a!!.toInt() and 0xFF) } - .collect(SuperStream.toListCollector()) as MutableList + return this.toList().stream().map { a -> String.format("0X%02X", a!!.toInt() and 0xFF) } + .collect(SuperStream.toListCollector()) as MutableList } @@ -99,12 +99,12 @@ fun ByteArray.getByteArrayString(): MutableList { * @throws NumberFormatException 当字符不是有效的十六进制字符时抛出 */ fun Char.hexDigitToValue(): Int { - return when (this) { - in '0'..'9' -> this - '0' - in 'A'..'F' -> this - 'A' + 10 - in 'a'..'f' -> this - 'a' + 10 - else -> throw NumberFormatException("Invalid hex character: $this") - } + return when (this) { + in '0'..'9' -> this - '0' + in 'A'..'F' -> this - 'A' + 10 + in 'a'..'f' -> this - 'a' + 10 + else -> throw NumberFormatException("Invalid hex character: $this") + } } /** @@ -114,7 +114,7 @@ fun Char.hexDigitToValue(): Int { * @return 转换后的字节数组 */ fun hexStringToByteArray(string: String): ByteArray { - return string.hexToByteArray() + return string.hexToByteArray() } @@ -125,5 +125,5 @@ fun hexStringToByteArray(string: String): ByteArray { * @return 对应的十六进制字符串 */ fun bytesToHex(bytes: ByteArray): String { - return BaseType.BASE16.encode(bytes) + return BaseType.BASE16.encode(bytes) } diff --git a/src/main/kotlin/com/mingliqiye/utils/bytes/StreamUtils.kt b/src/main/kotlin/com/mingliqiye/utils/bytes/StreamUtils.kt index dad6dc0..04c911d 100644 --- a/src/main/kotlin/com/mingliqiye/utils/bytes/StreamUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/bytes/StreamUtils.kt @@ -41,23 +41,23 @@ import java.io.OutputStream */ @Throws(IOException::class) fun InputStream.readVarNumber(size: Int = 8): Long { - var numRead = 0 - var result: Long = 0 - var read: Byte - do { - read = this.read().let { - if (it == -1) { - throw IOException("Reached end of stream") - } - it.toByte() - } - result = result or ((read.toLong() and 127) shl (7 * numRead)) - numRead++ - if (numRead > size) { - throw IOException("VarNumber is too big") - } - } while ((read.toLong() and 128) != 0L) - return result + var numRead = 0 + var result: Long = 0 + var read: Byte + do { + read = this.read().let { + if (it == -1) { + throw IOException("Reached end of stream") + } + it.toByte() + } + result = result or ((read.toLong() and 127) shl (7 * numRead)) + numRead++ + if (numRead > size) { + throw IOException("VarNumber is too big") + } + } while ((read.toLong() and 128) != 0L) + return result } /** @@ -102,20 +102,20 @@ fun InputStream.readVarLong(): Long = this.readVarNumber() */ @Throws(IOException::class) fun OutputStream.writeVarNumber(value: Long, size: Int = 8) { - var v = value - var numWritten = 0 + var v = value + var numWritten = 0 - while (v >= 0x80 && numWritten < size - 1) { - this.write((v and 0x7F or 0x80).toInt()) - v = v ushr 7 - numWritten++ - } + while (v >= 0x80 && numWritten < size - 1) { + this.write((v and 0x7F or 0x80).toInt()) + v = v ushr 7 + numWritten++ + } - if (numWritten >= size) { - throw IOException("VarNumber is too big") - } + if (numWritten >= size) { + throw IOException("VarNumber is too big") + } - this.write(v.toInt()) + this.write(v.toInt()) } /** diff --git a/src/main/kotlin/com/mingliqiye/utils/clone/CloneUtils.kt b/src/main/kotlin/com/mingliqiye/utils/clone/CloneUtils.kt index 8a75b2d..c9828b5 100644 --- a/src/main/kotlin/com/mingliqiye/utils/clone/CloneUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/clone/CloneUtils.kt @@ -30,33 +30,33 @@ import java.io.* @JvmName("_inline_deepClone") inline fun T.deepClone(): T { - return deepClone(this) + return deepClone(this) } inline fun T.deepJsonClone(): T { - try { - return JSONA.convert(this as Any, this!!.javaClass) as T - } catch (e: Exception) { - throw JsonException( - "Failed to deep clone object using JSON", e - ) - } + try { + return JSONA.convert(this as Any, this!!.javaClass) as T + } catch (e: Exception) { + throw JsonException( + "Failed to deep clone object using JSON", e + ) + } } @Suppress("UNCHECKED_CAST") fun deepClone(obj: T): T { - try { - val bao = ByteArrayOutputStream() - val oos = ObjectOutputStream(bao) - oos.writeObject(obj) - val bis = ByteArrayInputStream( - bao.toByteArray() - ) - val ois = ObjectInputStream(bis) - return ois.readObject() as T - } catch (e: IOException) { - throw RuntimeException(e) - } catch (e: ClassNotFoundException) { - throw RuntimeException(e) - } + try { + val bao = ByteArrayOutputStream() + val oos = ObjectOutputStream(bao) + oos.writeObject(obj) + val bis = ByteArrayInputStream( + bao.toByteArray() + ) + val ois = ObjectInputStream(bis) + return ois.readObject() as T + } catch (e: IOException) { + throw RuntimeException(e) + } catch (e: ClassNotFoundException) { + throw RuntimeException(e) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/collection/Collection.kt b/src/main/kotlin/com/mingliqiye/utils/collection/Collection.kt index 9025922..7d507e8 100644 --- a/src/main/kotlin/com/mingliqiye/utils/collection/Collection.kt +++ b/src/main/kotlin/com/mingliqiye/utils/collection/Collection.kt @@ -36,7 +36,7 @@ import java.util.stream.Collectors * @return 转换后的数组 */ inline fun Collection.toArray(): Array { - return arrayOf(*this.toTypedArray()) + return arrayOf(*this.toTypedArray()) } /** @@ -49,11 +49,11 @@ inline fun Collection.toArray(): Array { */ @Suppress("UNCHECKED_CAST") inline fun Collection.toMap(noinline v: (T) -> V): Map { - return this.stream().collect( - SuperStream.toMap( - v - ) - ) as Map + return this.stream().collect( + SuperStream.toMap( + v + ) + ) as Map } /** @@ -67,11 +67,11 @@ inline fun Collection.toMap(noinline v: (T) -> V): Map { * @return 转换后的 Map */ inline fun Collection.toMap(noinline k: (T) -> K, noinline v: (T) -> V): Map { - return this.stream().collect( - Collectors.toMap( - k, v - ) - ) + return this.stream().collect( + Collectors.toMap( + k, v + ) + ) } /** @@ -82,7 +82,7 @@ inline fun Collection.toMap(noinline k: (T) -> K, noinline * @return 转换后的 Set */ fun toSet(array: Array): Set { - return array.toSet() + return array.toSet() } @@ -93,13 +93,13 @@ fun toSet(array: Array): Set { * @return 第一个元素或 null */ inline fun Collection.getFirst(): T? { - if (this.isEmpty()) { - return null - } - if (this is MutableList) { - return this.first() - } - return this.iterator().next() + if (this.isEmpty()) { + return null + } + if (this is MutableList) { + return this.first() + } + return this.iterator().next() } /** @@ -109,10 +109,10 @@ inline fun Collection.getFirst(): T? { * @return 第一个元素或 null */ inline fun Array.getFirst(): T? { - if (this.isEmpty()) { - return null - } - return this.first() + if (this.isEmpty()) { + return null + } + return this.first() } /** @@ -122,17 +122,17 @@ inline fun Array.getFirst(): T? { * @return 最后一个元素或 null */ inline fun Collection.getLast(): T? { - if (this.isEmpty()) { - return null - } - if (this is MutableList) { - return this.last() - } - var lastElement: T? = null - for (element in this) { - lastElement = element - } - return lastElement + if (this.isEmpty()) { + return null + } + if (this is MutableList) { + return this.last() + } + var lastElement: T? = null + for (element in this) { + lastElement = element + } + return lastElement } /** @@ -142,10 +142,10 @@ inline fun Collection.getLast(): T? { * @return 最后一个元素或 null */ inline fun Array.getLast(): T? { - if (this.isEmpty()) { - return null - } - return this.last() + if (this.isEmpty()) { + return null + } + return this.last() } @@ -158,22 +158,22 @@ inline fun Array.getLast(): T? { * @return 指定索引处的元素或默认值 */ inline fun Collection.getOrDefault( - index: Int, defaultValue: T + index: Int, defaultValue: T, ): T { - if (!(!this.isEmpty() && index < this.size)) { - return defaultValue - } - if (this is List) { - return this[index] - } - var i = 0 - for (element in this) { - if (i == index) { - return element - } - i++ - } - return defaultValue + if (!(!this.isEmpty() && index < this.size)) { + return defaultValue + } + if (this is List) { + return this[index] + } + var i = 0 + for (element in this) { + if (i == index) { + return element + } + i++ + } + return defaultValue } /** @@ -183,7 +183,7 @@ inline fun Collection.getOrDefault( * @return 新创建的 ArrayList */ fun newArrayList(): ArrayList { - return ArrayList() + return ArrayList() } /** @@ -194,7 +194,7 @@ fun newArrayList(): ArrayList { * @return 新创建的 ArrayList */ fun newArrayList(size: Int): ArrayList { - return ArrayList() + return ArrayList() } /** @@ -205,7 +205,7 @@ fun newArrayList(size: Int): ArrayList { * @return 新创建的 ArrayList */ fun newArrayList(vararg elements: T): ArrayList { - return newArrayList(elements.asList()) + return newArrayList(elements.asList()) } /** @@ -215,7 +215,7 @@ fun newArrayList(vararg elements: T): ArrayList { * @return 新创建的 ArrayList */ fun Collection.newArrayLists(): ArrayList { - return newArrayList(this) + return newArrayList(this) } /** @@ -226,7 +226,7 @@ fun Collection.newArrayLists(): ArrayList { * @return 新创建的 ArrayList */ fun newArrayLists(elements: Array): ArrayList { - return newArrayList(elements.asList()) + return newArrayList(elements.asList()) } /** @@ -237,7 +237,7 @@ fun newArrayLists(elements: Array): ArrayList { * @return 新创建的 ArrayList */ fun newArrayList(elements: Collection): ArrayList { - return ArrayList(elements.toList()) + return ArrayList(elements.toList()) } /** @@ -248,7 +248,7 @@ fun newArrayList(elements: Collection): ArrayList { * @return 新创建的 ArrayList */ fun newArrayList(elements: Iterable): ArrayList { - return newArrayList(elements.toList()) + return newArrayList(elements.toList()) } /** @@ -259,7 +259,7 @@ fun newArrayList(elements: Iterable): ArrayList { * @return 新创建的 ArrayList */ fun newArrayList(elements: Sequence): ArrayList { - return newArrayList(elements.toList()) + return newArrayList(elements.toList()) } /** @@ -269,7 +269,7 @@ fun newArrayList(elements: Sequence): ArrayList { * @return 新创建的 LinkedList */ fun newLinkedList(): LinkedList { - return LinkedList() + return LinkedList() } /** @@ -280,9 +280,9 @@ fun newLinkedList(): LinkedList { * @return 新创建的 LinkedList */ fun newLinkedList(vararg elements: T): LinkedList { - val list = newLinkedList() - list.addAll(elements.asList()) - return list + val list = newLinkedList() + list.addAll(elements.asList()) + return list } /** @@ -293,9 +293,9 @@ fun newLinkedList(vararg elements: T): LinkedList { * @return 新创建的 LinkedList */ fun newLinkedList(elements: Collection): LinkedList { - val list = newLinkedList() - list.addAll(elements) - return list + val list = newLinkedList() + list.addAll(elements) + return list } /** @@ -306,11 +306,11 @@ fun newLinkedList(elements: Collection): LinkedList { * @return 新创建的 LinkedList */ fun newLinkedList(elements: Iterable): LinkedList { - val list = newLinkedList() - for (element in elements) { - list.add(element) - } - return list + val list = newLinkedList() + for (element in elements) { + list.add(element) + } + return list } /** @@ -321,7 +321,7 @@ fun newLinkedList(elements: Iterable): LinkedList { * @return 新创建的 LinkedList */ fun newLinkedList(elements: Sequence): LinkedList { - return newLinkedList(elements.toList()) + return newLinkedList(elements.toList()) } /** @@ -331,7 +331,7 @@ fun newLinkedList(elements: Sequence): LinkedList { * @return 新创建的 Vector */ fun newVector(): Vector { - return Vector() + return Vector() } /** @@ -342,9 +342,9 @@ fun newVector(): Vector { * @return 新创建的 Vector */ fun newVector(vararg elements: T): Vector { - val vector = newVector() - vector.addAll(elements.asList()) - return vector + val vector = newVector() + vector.addAll(elements.asList()) + return vector } /** @@ -355,9 +355,9 @@ fun newVector(vararg elements: T): Vector { * @return 新创建的 Vector */ fun newVector(elements: Collection): Vector { - val vector = newVector() - vector.addAll(elements) - return vector + val vector = newVector() + vector.addAll(elements) + return vector } /** @@ -368,11 +368,11 @@ fun newVector(elements: Collection): Vector { * @return 新创建的 Vector */ fun newVector(elements: Iterable): Vector { - val vector = newVector() - for (element in elements) { - vector.add(element) - } - return vector + val vector = newVector() + for (element in elements) { + vector.add(element) + } + return vector } /** @@ -383,7 +383,7 @@ fun newVector(elements: Iterable): Vector { * @return 新创建的 Vector */ fun newVector(elements: Sequence): Vector { - return newVector(elements.toList()) + return newVector(elements.toList()) } @@ -394,7 +394,7 @@ fun newVector(elements: Sequence): Vector { * @return 新创建的 HashSet */ fun newHashSet(): HashSet { - return HashSet() + return HashSet() } /** @@ -405,7 +405,7 @@ fun newHashSet(): HashSet { * @return 新创建的 HashSet */ fun newHashSet(size: Int): HashSet { - return HashSet(size) + return HashSet(size) } /** @@ -416,9 +416,9 @@ fun newHashSet(size: Int): HashSet { * @return 新创建的 HashSet */ fun newHashSet(vararg elements: T): HashSet { - val set = newHashSet() - set.addAll(elements.asList()) - return set + val set = newHashSet() + set.addAll(elements.asList()) + return set } /** @@ -429,9 +429,9 @@ fun newHashSet(vararg elements: T): HashSet { * @return 新创建的 HashSet */ fun newHashSet(elements: Collection): HashSet { - val set = newHashSet() - set.addAll(elements) - return set + val set = newHashSet() + set.addAll(elements) + return set } /** @@ -442,11 +442,11 @@ fun newHashSet(elements: Collection): HashSet { * @return 新创建的 HashSet */ fun newHashSet(elements: Iterable): HashSet { - val set = newHashSet() - for (element in elements) { - set.add(element) - } - return set + val set = newHashSet() + for (element in elements) { + set.add(element) + } + return set } /** @@ -457,7 +457,7 @@ fun newHashSet(elements: Iterable): HashSet { * @return 新创建的 HashSet */ fun newHashSet(elements: Sequence): HashSet { - return newHashSet(elements.toSet()) + return newHashSet(elements.toSet()) } /** @@ -467,7 +467,7 @@ fun newHashSet(elements: Sequence): HashSet { * @return 新创建的 LinkedHashSet */ fun newLinkedHashSet(): LinkedHashSet { - return LinkedHashSet() + return LinkedHashSet() } /** @@ -478,7 +478,7 @@ fun newLinkedHashSet(): LinkedHashSet { * @return 新创建的 LinkedHashSet */ fun newLinkedHashSet(size: Int): LinkedHashSet { - return LinkedHashSet(size) + return LinkedHashSet(size) } /** @@ -489,9 +489,9 @@ fun newLinkedHashSet(size: Int): LinkedHashSet { * @return 新创建的 LinkedHashSet */ fun newLinkedHashSet(vararg elements: T): LinkedHashSet { - val set = newLinkedHashSet() - set.addAll(elements.asList()) - return set + val set = newLinkedHashSet() + set.addAll(elements.asList()) + return set } /** @@ -502,9 +502,9 @@ fun newLinkedHashSet(vararg elements: T): LinkedHashSet { * @return 新创建的 LinkedHashSet */ fun newLinkedHashSet(elements: Collection): LinkedHashSet { - val set = newLinkedHashSet() - set.addAll(elements) - return set + val set = newLinkedHashSet() + set.addAll(elements) + return set } /** @@ -515,11 +515,11 @@ fun newLinkedHashSet(elements: Collection): LinkedHashSet { * @return 新创建的 LinkedHashSet */ fun newLinkedHashSet(elements: Iterable): LinkedHashSet { - val set = newLinkedHashSet() - for (element in elements) { - set.add(element) - } - return set + val set = newLinkedHashSet() + for (element in elements) { + set.add(element) + } + return set } /** @@ -530,7 +530,7 @@ fun newLinkedHashSet(elements: Iterable): LinkedHashSet { * @return 新创建的 LinkedHashSet */ fun newLinkedHashSet(elements: Sequence): LinkedHashSet { - return newLinkedHashSet(elements.toSet()) + return newLinkedHashSet(elements.toSet()) } /** @@ -540,7 +540,7 @@ fun newLinkedHashSet(elements: Sequence): LinkedHashSet { * @return 新创建的 TreeSet */ fun > newTreeSet(): TreeSet { - return TreeSet() + return TreeSet() } /** @@ -551,9 +551,9 @@ fun > newTreeSet(): TreeSet { * @return 新创建的 TreeSet */ fun > newTreeSet(vararg elements: T): TreeSet { - val set = newTreeSet() - set.addAll(elements.asList()) - return set + val set = newTreeSet() + set.addAll(elements.asList()) + return set } /** @@ -564,9 +564,9 @@ fun > newTreeSet(vararg elements: T): TreeSet { * @return 新创建的 TreeSet */ fun > newTreeSet(elements: Collection): TreeSet { - val set = newTreeSet() - set.addAll(elements) - return set + val set = newTreeSet() + set.addAll(elements) + return set } /** @@ -577,11 +577,11 @@ fun > newTreeSet(elements: Collection): TreeSet { * @return 新创建的 TreeSet */ fun > newTreeSet(elements: Iterable): TreeSet { - val set = newTreeSet() - for (element in elements) { - set.add(element) - } - return set + val set = newTreeSet() + for (element in elements) { + set.add(element) + } + return set } /** @@ -592,7 +592,7 @@ fun > newTreeSet(elements: Iterable): TreeSet { * @return 新创建的 TreeSet */ fun > newTreeSet(elements: Sequence): TreeSet { - return newTreeSet(elements.toSet()) + return newTreeSet(elements.toSet()) } @@ -603,7 +603,7 @@ fun > newTreeSet(elements: Sequence): TreeSet { * @return 转换后的 ArrayList */ fun newArrayLists(elements: ByteArray): ArrayList { - return ArrayList(elements.toList()) + return ArrayList(elements.toList()) } /** @@ -613,7 +613,7 @@ fun newArrayLists(elements: ByteArray): ArrayList { * @return 转换后的 ArrayList */ fun newArrayLists(elements: ShortArray): ArrayList { - return ArrayList(elements.toList()) + return ArrayList(elements.toList()) } /** @@ -623,7 +623,7 @@ fun newArrayLists(elements: ShortArray): ArrayList { * @return 转换后的 ArrayList */ fun newArrayLists(elements: IntArray): ArrayList { - return ArrayList(elements.toList()) + return ArrayList(elements.toList()) } /** @@ -633,7 +633,7 @@ fun newArrayLists(elements: IntArray): ArrayList { * @return 转换后的 ArrayList */ fun newArrayLists(elements: LongArray): ArrayList { - return ArrayList(elements.toList()) + return ArrayList(elements.toList()) } /** @@ -643,7 +643,7 @@ fun newArrayLists(elements: LongArray): ArrayList { * @return 转换后的 ArrayList */ fun newArrayLists(elements: FloatArray): ArrayList { - return ArrayList(elements.toList()) + return ArrayList(elements.toList()) } /** @@ -653,7 +653,7 @@ fun newArrayLists(elements: FloatArray): ArrayList { * @return 转换后的 ArrayList */ fun newArrayLists(elements: DoubleArray): ArrayList { - return ArrayList(elements.toList()) + return ArrayList(elements.toList()) } /** @@ -663,7 +663,7 @@ fun newArrayLists(elements: DoubleArray): ArrayList { * @return 转换后的 ArrayList */ fun newArrayLists(elements: BooleanArray): ArrayList { - return ArrayList(elements.toList()) + return ArrayList(elements.toList()) } /** @@ -673,7 +673,7 @@ fun newArrayLists(elements: BooleanArray): ArrayList { * @return 转换后的 ArrayList */ fun newArrayLists(elements: CharArray): ArrayList { - return ArrayList(elements.toList()) + return ArrayList(elements.toList()) } /** @@ -683,7 +683,7 @@ fun newArrayLists(elements: CharArray): ArrayList { * @return 新创建的 CopyOnWriteArrayList */ fun newCopyOnWriteArrayList(): java.util.concurrent.CopyOnWriteArrayList { - return java.util.concurrent.CopyOnWriteArrayList() + return java.util.concurrent.CopyOnWriteArrayList() } /** @@ -694,7 +694,7 @@ fun newCopyOnWriteArrayList(): java.util.concurrent.CopyOnWriteArrayList * @return 新创建的 CopyOnWriteArrayList */ fun newCopyOnWriteArrayList(vararg elements: T): java.util.concurrent.CopyOnWriteArrayList { - return java.util.concurrent.CopyOnWriteArrayList(elements.asList()) + return java.util.concurrent.CopyOnWriteArrayList(elements.asList()) } /** @@ -705,7 +705,7 @@ fun newCopyOnWriteArrayList(vararg elements: T): java.util.concurrent.CopyOn * @return 新创建的 CopyOnWriteArrayList */ fun newCopyOnWriteArrayList(elements: Collection): java.util.concurrent.CopyOnWriteArrayList { - return java.util.concurrent.CopyOnWriteArrayList(elements) + return java.util.concurrent.CopyOnWriteArrayList(elements) } /** @@ -715,7 +715,7 @@ fun newCopyOnWriteArrayList(elements: Collection): java.util.concurrent.C * @return 新创建的 Stack */ fun newStack(): Stack { - return Stack() + return Stack() } /** @@ -726,9 +726,9 @@ fun newStack(): Stack { * @return 新创建的 Stack */ fun newStack(vararg elements: T): Stack { - val stack = newStack() - stack.addAll(elements.asList()) - return stack + val stack = newStack() + stack.addAll(elements.asList()) + return stack } /** @@ -739,9 +739,9 @@ fun newStack(vararg elements: T): Stack { * @return 新创建的 Stack */ fun newStack(elements: Collection): Stack { - val stack = newStack() - stack.addAll(elements) - return stack + val stack = newStack() + stack.addAll(elements) + return stack } @@ -753,7 +753,7 @@ fun newStack(elements: Collection): Stack { * @return 新创建的 TreeSet */ fun newTreeSet(comparator: Comparator): TreeSet { - return TreeSet(comparator) + return TreeSet(comparator) } /** @@ -765,9 +765,9 @@ fun newTreeSet(comparator: Comparator): TreeSet { * @return 新创建的 TreeSet */ fun newTreeSet(comparator: Comparator, vararg elements: T): TreeSet { - val set = newTreeSet(comparator) - set.addAll(elements.asList()) - return set + val set = newTreeSet(comparator) + set.addAll(elements.asList()) + return set } /** @@ -779,9 +779,9 @@ fun newTreeSet(comparator: Comparator, vararg elements: T): TreeSet { * @return 新创建的 TreeSet */ fun newTreeSet(comparator: Comparator, elements: Collection): TreeSet { - val set = newTreeSet(comparator) - set.addAll(elements) - return set + val set = newTreeSet(comparator) + set.addAll(elements) + return set } /** @@ -793,11 +793,11 @@ fun newTreeSet(comparator: Comparator, elements: Collection): TreeSet< * @return 新创建的 TreeSet */ fun newTreeSet(comparator: Comparator, elements: Iterable): TreeSet { - val set = newTreeSet(comparator) - for (element in elements) { - set.add(element) - } - return set + val set = newTreeSet(comparator) + for (element in elements) { + set.add(element) + } + return set } /** @@ -809,7 +809,7 @@ fun newTreeSet(comparator: Comparator, elements: Iterable): TreeSet * @return 新创建的 TreeSet */ fun newTreeSet(comparator: Comparator, elements: Sequence): TreeSet { - return newTreeSet(comparator, elements.toSet()) + return newTreeSet(comparator, elements.toSet()) } /** @@ -819,7 +819,7 @@ fun newTreeSet(comparator: Comparator, elements: Sequence): TreeSet * @return 新创建的 CopyOnWriteArrayList */ fun Collection.newCopyOnWriteArrayLists(): java.util.concurrent.CopyOnWriteArrayList { - return java.util.concurrent.CopyOnWriteArrayList(this) + return java.util.concurrent.CopyOnWriteArrayList(this) } /** @@ -829,9 +829,9 @@ fun Collection.newCopyOnWriteArrayLists(): java.util.concurrent.CopyOnWri * @return 新创建的 Stack */ fun Collection.newStacks(): Stack { - val stack = Stack() - stack.addAll(this) - return stack + val stack = Stack() + stack.addAll(this) + return stack } /** @@ -841,9 +841,9 @@ fun Collection.newStacks(): Stack { * @return 新创建的 TreeSet */ fun Collection.newTreeSets(): TreeSet where T : Comparable { - val set = TreeSet() - set.addAll(this) - return set + val set = TreeSet() + set.addAll(this) + return set } /** @@ -854,9 +854,9 @@ fun Collection.newTreeSets(): TreeSet where T : Comparable { * @return 新创建的 TreeSet */ fun Collection.newTreeSets(comparator: Comparator): TreeSet { - val set = TreeSet(comparator) - set.addAll(this) - return set + val set = TreeSet(comparator) + set.addAll(this) + return set } /** @@ -866,11 +866,11 @@ fun Collection.newTreeSets(comparator: Comparator): TreeSet { * @return 转换后的字节数组 */ fun toArray(list: List): ByteArray { - val arr = ByteArray(list.size) - for (i in list.indices) { - arr[i] = list[i] - } - return arr + val arr = ByteArray(list.size) + for (i in list.indices) { + arr[i] = list[i] + } + return arr } @@ -881,11 +881,11 @@ fun toArray(list: List): ByteArray { * @return 转换后的短整型数组 */ fun toArray(list: List): ShortArray { - val arr = ShortArray(list.size) - for (i in list.indices) { - arr[i] = list[i] - } - return arr + val arr = ShortArray(list.size) + for (i in list.indices) { + arr[i] = list[i] + } + return arr } /** @@ -895,11 +895,11 @@ fun toArray(list: List): ShortArray { * @return 转换后的整型数组 */ fun toArray(list: List): IntArray { - val arr = IntArray(list.size) - for (i in list.indices) { - arr[i] = list[i] - } - return arr + val arr = IntArray(list.size) + for (i in list.indices) { + arr[i] = list[i] + } + return arr } /** @@ -909,11 +909,11 @@ fun toArray(list: List): IntArray { * @return 转换后的长整型数组 */ fun toArray(list: List): LongArray { - val arr = LongArray(list.size) - for (i in list.indices) { - arr[i] = list[i] - } - return arr + val arr = LongArray(list.size) + for (i in list.indices) { + arr[i] = list[i] + } + return arr } /** @@ -923,11 +923,11 @@ fun toArray(list: List): LongArray { * @return 转换后的浮点数组 */ fun toArray(list: List): FloatArray { - val arr = FloatArray(list.size) - for (i in list.indices) { - arr[i] = list[i] - } - return arr + val arr = FloatArray(list.size) + for (i in list.indices) { + arr[i] = list[i] + } + return arr } /** @@ -937,11 +937,11 @@ fun toArray(list: List): FloatArray { * @return 转换后的双精度浮点数组 */ fun toArray(list: List): DoubleArray { - val arr = DoubleArray(list.size) - for (i in list.indices) { - arr[i] = list[i] - } - return arr + val arr = DoubleArray(list.size) + for (i in list.indices) { + arr[i] = list[i] + } + return arr } /** @@ -951,11 +951,11 @@ fun toArray(list: List): DoubleArray { * @return 转换后的布尔数组 */ fun toArray(list: List): BooleanArray { - val arr = BooleanArray(list.size) - for (i in list.indices) { - arr[i] = list[i] - } - return arr + val arr = BooleanArray(list.size) + for (i in list.indices) { + arr[i] = list[i] + } + return arr } /** @@ -965,11 +965,11 @@ fun toArray(list: List): BooleanArray { * @return 转换后的字符数组 */ fun toArray(list: List): CharArray { - val arr = CharArray(list.size) - for (i in list.indices) { - arr[i] = list[i] - } - return arr + val arr = CharArray(list.size) + for (i in list.indices) { + arr[i] = list[i] + } + return arr } @@ -981,13 +981,13 @@ fun toArray(list: List): CharArray { * @return 转换后的数组 */ inline fun toArray(list: List): Array { - if (list.isEmpty()) - return arrayOf() - return SuperStream.of(list) - .toArray(T::class.java) + if (list.isEmpty()) + return arrayOf() + return SuperStream.of(list) + .toArray(T::class.java) } fun toArray(list: List, clazz: Class): Array { - return SuperStream.of(list) - .toArray(clazz) + return SuperStream.of(list) + .toArray(clazz) } diff --git a/src/main/kotlin/com/mingliqiye/utils/concurrent/IsChanged.kt b/src/main/kotlin/com/mingliqiye/utils/concurrent/IsChanged.kt index 75f5175..eceb0a9 100644 --- a/src/main/kotlin/com/mingliqiye/utils/concurrent/IsChanged.kt +++ b/src/main/kotlin/com/mingliqiye/utils/concurrent/IsChanged.kt @@ -34,68 +34,68 @@ import java.util.concurrent.atomic.AtomicReference */ class IsChanged { - /** - * 使用 AtomicReference 来保证对数据的原子操作 - */ - private val atomicReferenceData: AtomicReference = AtomicReference() + /** + * 使用 AtomicReference 来保证对数据的原子操作 + */ + private val atomicReferenceData: AtomicReference = AtomicReference() - constructor() + constructor() - /** - * 带参数的构造函数,使用指定的初始值初始化 - * - * @param data 初始数据值 - */ - constructor(data: T) : super() { - atomicReferenceData.set(data) - } + /** + * 带参数的构造函数,使用指定的初始值初始化 + * + * @param data 初始数据值 + */ + constructor(data: T) : super() { + atomicReferenceData.set(data) + } - /** - * 设置新的数据值,不检查是否发生变化 - * - * @param data 要设置的新数据值 - */ - fun set(data: T) { - atomicReferenceData.set(data) - } + /** + * 设置新的数据值,不检查是否发生变化 + * + * @param data 要设置的新数据值 + */ + fun set(data: T) { + atomicReferenceData.set(data) + } - /** - * 获取当前数据值 - * - * @return 当前数据值 - */ - fun get(): T { - return atomicReferenceData.get() - } + /** + * 获取当前数据值 + * + * @return 当前数据值 + */ + fun get(): T { + return atomicReferenceData.get() + } - /** - * 设置新的数据值并返回旧的数据值 - * - * @param data 要设置的新数据值 - * @return 设置前的旧数据值 - */ - fun setAndGet(data: T): T { - return atomicReferenceData.getAndSet(data) - } + /** + * 设置新的数据值并返回旧的数据值 + * + * @param data 要设置的新数据值 + * @return 设置前的旧数据值 + */ + fun setAndGet(data: T): T { + return atomicReferenceData.getAndSet(data) + } - /** - * 设置新的数据值,如果新值与当前值不同则更新并返回 true,否则返回 false - * 使用 CAS(Compare-And-Swap) 操作确保线程安全 - * - * @param data 要设置的新数据值 - * @return 如果值发生变化返回 true,否则返回 false - */ - fun setAndChanged(data: T): Boolean { - var currentData: T - do { - currentData = get() - // 如果新值与当前值相等,则认为没有变化,直接返回 false - if (Objects.equals(data, currentData)) { - return false - } - // 使用 CAS 操作尝试更新值,如果失败则重试 - } while (!atomicReferenceData.compareAndSet(currentData, data)) - // 成功更新值,返回 true 表示发生了变化 - return true - } + /** + * 设置新的数据值,如果新值与当前值不同则更新并返回 true,否则返回 false + * 使用 CAS(Compare-And-Swap) 操作确保线程安全 + * + * @param data 要设置的新数据值 + * @return 如果值发生变化返回 true,否则返回 false + */ + fun setAndChanged(data: T): Boolean { + var currentData: T + do { + currentData = get() + // 如果新值与当前值相等,则认为没有变化,直接返回 false + if (Objects.equals(data, currentData)) { + return false + } + // 使用 CAS 操作尝试更新值,如果失败则重试 + } while (!atomicReferenceData.compareAndSet(currentData, data)) + // 成功更新值,返回 true 表示发生了变化 + return true + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/configuration/ConfigurationProp.kt b/src/main/kotlin/com/mingliqiye/utils/configuration/ConfigurationProp.kt index 6994170..a0169d7 100644 --- a/src/main/kotlin/com/mingliqiye/utils/configuration/ConfigurationProp.kt +++ b/src/main/kotlin/com/mingliqiye/utils/configuration/ConfigurationProp.kt @@ -31,10 +31,10 @@ package com.mingliqiye.utils.configuration */ @Retention(AnnotationRetention.RUNTIME) @Target( - AnnotationTarget.TYPE_PARAMETER, - AnnotationTarget.VALUE_PARAMETER, - AnnotationTarget.FIELD, // 添加字段支持 - AnnotationTarget.PROPERTY // 添加属性支持 + AnnotationTarget.TYPE_PARAMETER, + AnnotationTarget.VALUE_PARAMETER, + AnnotationTarget.FIELD, // 添加字段支持 + AnnotationTarget.PROPERTY // 添加属性支持 ) annotation class ConfigurationProp(val name: String = "", val description: String = "", val showHelper: Boolean = true) @@ -45,7 +45,7 @@ annotation class ConfigurationProp(val name: String = "", val description: Strin * @return 对应的 setter 方法名。 */ private fun getSetterName(fieldName: String): String { - return "set" + fieldName.take(1).uppercase() + fieldName.substring(1) + return "set" + fieldName.take(1).uppercase() + fieldName.substring(1) } /** @@ -55,7 +55,7 @@ private fun getSetterName(fieldName: String): String { * @return 对应的 getter 方法名。 */ private fun getGetterName(fieldName: String): String { - return "get" + fieldName.take(1).uppercase() + fieldName.substring(1) + return "get" + fieldName.take(1).uppercase() + fieldName.substring(1) } /** @@ -63,211 +63,211 @@ private fun getGetterName(fieldName: String): String { */ open class ConfigurationProps { - companion object { - /** - * 初始化配置类实例,并根据命令行参数填充其字段。 - * - * @param clazz 配置类的 Class 对象。 - * @param args 命令行参数数组。 - * @return 初始化后的配置类实例。 - */ - @JvmStatic - fun init(clazz: Class, args: Array): T { - val mapsArgs = parseArguments(args) - val instance = clazz.getDeclaredConstructor().newInstance() + companion object { + /** + * 初始化配置类实例,并根据命令行参数填充其字段。 + * + * @param clazz 配置类的 Class 对象。 + * @param args 命令行参数数组。 + * @return 初始化后的配置类实例。 + */ + @JvmStatic + fun init(clazz: Class, args: Array): T { + val mapsArgs = parseArguments(args) + val instance = clazz.getDeclaredConstructor().newInstance() - processFields(clazz, instance, mapsArgs) + processFields(clazz, instance, mapsArgs) - return instance - } + return instance + } - /** - * 解析命令行参数,将其转换为键值对映射。 - * - * 支持以下格式: - * - `--key=value` 或 `-k=value`:键值对形式。 - * - `--key value` 或 `-k value`:键和值分开的形式。 - * - `--flag` 或 `-f`:布尔标志形式,默认值为 "true"。 - * - * @param args 命令行参数数组。 - * @return 解析后的键值对映射。 - */ - private fun parseArguments(args: Array): Map> { - val mapsArgs = mutableMapOf>() + /** + * 解析命令行参数,将其转换为键值对映射。 + * + * 支持以下格式: + * - `--key=value` 或 `-k=value`:键值对形式。 + * - `--key value` 或 `-k value`:键和值分开的形式。 + * - `--flag` 或 `-f`:布尔标志形式,默认值为 "true"。 + * + * @param args 命令行参数数组。 + * @return 解析后的键值对映射。 + */ + private fun parseArguments(args: Array): Map> { + val mapsArgs = mutableMapOf>() - var i = 0 - while (i < args.size) { - val arg = args[i] + var i = 0 + while (i < args.size) { + val arg = args[i] - when { - arg.startsWith("--") -> { - // 处理 --key=value 格式 - if (arg.contains("=")) { - val (key, value) = arg.substring(2).split("=", limit = 2) - mapsArgs.getOrPut(key) { mutableListOf() }.add(value) - } - // 处理 --key value 格式 - else if (i + 1 < args.size && !args[i + 1].startsWith("-")) { - val key = arg.substring(2) - val value = args[i + 1] - mapsArgs.getOrPut(key) { mutableListOf() }.add(value) - i++ // 跳过下一个参数 - } - // 处理 --flag 格式的布尔标志 - else { - val key = arg.substring(2) - mapsArgs.getOrPut(key) { mutableListOf() }.add("true") - } - } + when { + arg.startsWith("--") -> { + // 处理 --key=value 格式 + if (arg.contains("=")) { + val (key, value) = arg.substring(2).split("=", limit = 2) + mapsArgs.getOrPut(key) { mutableListOf() }.add(value) + } + // 处理 --key value 格式 + else if (i + 1 < args.size && !args[i + 1].startsWith("-")) { + val key = arg.substring(2) + val value = args[i + 1] + mapsArgs.getOrPut(key) { mutableListOf() }.add(value) + i++ // 跳过下一个参数 + } + // 处理 --flag 格式的布尔标志 + else { + val key = arg.substring(2) + mapsArgs.getOrPut(key) { mutableListOf() }.add("true") + } + } - arg.startsWith("-") -> { - // 处理 -k=value 格式 - if (arg.contains("=")) { - val (key, value) = arg.substring(1).split("=", limit = 2) - mapsArgs.getOrPut(key) { mutableListOf() }.add(value) - } - // 处理 -k value 格式 - else if (i + 1 < args.size && !args[i + 1].startsWith("-")) { - val key = arg.substring(1) - val value = args[i + 1] - mapsArgs.getOrPut(key) { mutableListOf() }.add(value) - i++ - } - // 处理 -f 格式的布尔标志 - else { - val key = arg.substring(1) - mapsArgs.getOrPut(key) { mutableListOf() }.add("true") - } - } - } - i++ - } + arg.startsWith("-") -> { + // 处理 -k=value 格式 + if (arg.contains("=")) { + val (key, value) = arg.substring(1).split("=", limit = 2) + mapsArgs.getOrPut(key) { mutableListOf() }.add(value) + } + // 处理 -k value 格式 + else if (i + 1 < args.size && !args[i + 1].startsWith("-")) { + val key = arg.substring(1) + val value = args[i + 1] + mapsArgs.getOrPut(key) { mutableListOf() }.add(value) + i++ + } + // 处理 -f 格式的布尔标志 + else { + val key = arg.substring(1) + mapsArgs.getOrPut(key) { mutableListOf() }.add("true") + } + } + } + i++ + } - return mapsArgs - } + return mapsArgs + } - /** - * 处理配置类中的字段,根据解析出的参数设置字段值。 - * - * @param clazz 配置类的 Class 对象。 - * @param instance 配置类的实例。 - * @param mapsArgs 解析后的命令行参数映射。 - */ - private fun processFields( - clazz: Class, - instance: T, - mapsArgs: Map>, - ) { - val fields = clazz.declaredFields + /** + * 处理配置类中的字段,根据解析出的参数设置字段值。 + * + * @param clazz 配置类的 Class 对象。 + * @param instance 配置类的实例。 + * @param mapsArgs 解析后的命令行参数映射。 + */ + private fun processFields( + clazz: Class, + instance: T, + mapsArgs: Map>, + ) { + val fields = clazz.declaredFields - for (field in fields) { - val configurationProp = field.getAnnotation(ConfigurationProp::class.java) - if (configurationProp != null) { - val fieldName = configurationProp.name.ifEmpty { field.name } - val values = mapsArgs[fieldName] + for (field in fields) { + val configurationProp = field.getAnnotation(ConfigurationProp::class.java) + if (configurationProp != null) { + val fieldName = configurationProp.name.ifEmpty { field.name } + val values = mapsArgs[fieldName] - if (values != null) { - try { - val setter = clazz.getDeclaredMethod( - getSetterName(field.name), - field.type - ) + if (values != null) { + try { + val setter = clazz.getDeclaredMethod( + getSetterName(field.name), + field.type + ) - val value = convertValue(field.type, values, configurationProp) - setter.invoke(instance, value) - } catch (e: Exception) { - println("Warning: Failed to set field ${field.name}: ${e.message}") - } - } - } - } - } + val value = convertValue(field.type, values, configurationProp) + setter.invoke(instance, value) + } catch (e: Exception) { + println("Warning: Failed to set field ${field.name}: ${e.message}") + } + } + } + } + } - /** - * 将字符串值转换为目标类型。 - * - * @param type 目标类型。 - * @param values 字符串值列表。 - * @param annotation 配置属性注解。 - * @return 转换后的值。 - */ - private fun convertValue( - type: Class<*>, - values: List, - annotation: ConfigurationProp, - ): Any? { - val lastValue = values.lastOrNull() ?: return null + /** + * 将字符串值转换为目标类型。 + * + * @param type 目标类型。 + * @param values 字符串值列表。 + * @param annotation 配置属性注解。 + * @return 转换后的值。 + */ + private fun convertValue( + type: Class<*>, + values: List, + annotation: ConfigurationProp, + ): Any? { + val lastValue = values.lastOrNull() ?: return null - return when (type) { - String::class.java -> lastValue + return when (type) { + String::class.java -> lastValue - Integer::class.java, Int::class.java -> try { - lastValue.toInt() - } catch (e: NumberFormatException) { - println("Warning: Invalid integer value '$lastValue'") - null - } + Integer::class.java, Int::class.java -> try { + lastValue.toInt() + } catch (e: NumberFormatException) { + println("Warning: Invalid integer value '$lastValue'") + null + } - Long::class.java, java.lang.Long::class.java -> try { - lastValue.toLong() - } catch (e: NumberFormatException) { - println("Warning: Invalid long value '$lastValue'") - null - } + Long::class.java, java.lang.Long::class.java -> try { + lastValue.toLong() + } catch (e: NumberFormatException) { + println("Warning: Invalid long value '$lastValue'") + null + } - Double::class.java, java.lang.Double::class.java -> try { - lastValue.toDouble() - } catch (e: NumberFormatException) { - println("Warning: Invalid double value '$lastValue'") - null - } + Double::class.java, java.lang.Double::class.java -> try { + lastValue.toDouble() + } catch (e: NumberFormatException) { + println("Warning: Invalid double value '$lastValue'") + null + } - Boolean::class.java, java.lang.Boolean::class.java -> when (lastValue.lowercase()) { - "true", "1", "yes", "on" -> true - "false", "0", "no", "off" -> false - else -> { - println("Warning: Invalid boolean value '$lastValue'") - null - } - } + Boolean::class.java, java.lang.Boolean::class.java -> when (lastValue.lowercase()) { + "true", "1", "yes", "on" -> true + "false", "0", "no", "off" -> false + else -> { + println("Warning: Invalid boolean value '$lastValue'") + null + } + } - List::class.java -> values + List::class.java -> values - else -> { - println("Warning: Unsupported type ${type.simpleName}") - null - } - } - } - } + else -> { + println("Warning: Unsupported type ${type.simpleName}") + null + } + } + } + } - fun printHelp() { - val fields = this::class.java.declaredFields - val help = StringBuilder() - for (field in fields) { - val configurationProp = field.getAnnotation(ConfigurationProp::class.java) - if (configurationProp != null && configurationProp.showHelper) { - val fieldName = configurationProp.name.ifEmpty { field.name } - help.append("$fieldName -> Type: ${field.type.simpleName}") - if (configurationProp.description.isNotEmpty()) { - help.append(" Description: ${configurationProp.description}") - } - help.append("\n") - } - } - println(help) - } + fun printHelp() { + val fields = this::class.java.declaredFields + val help = StringBuilder() + for (field in fields) { + val configurationProp = field.getAnnotation(ConfigurationProp::class.java) + if (configurationProp != null && configurationProp.showHelper) { + val fieldName = configurationProp.name.ifEmpty { field.name } + help.append("$fieldName -> Type: ${field.type.simpleName}") + if (configurationProp.description.isNotEmpty()) { + help.append(" Description: ${configurationProp.description}") + } + help.append("\n") + } + } + println(help) + } - val fields: Map - get() { - val fields = this::class.java.declaredFields - val fieldValues = mutableMapOf() - for (field in fields) { - field.isAccessible = true - val fieldName = field.name - val fieldValue = field.get(this) - fieldValues[fieldName] = fieldValue - } - return fieldValues - } + val fields: Map + get() { + val fields = this::class.java.declaredFields + val fieldValues = mutableMapOf() + for (field in fields) { + field.isAccessible = true + val fieldName = field.name + val fieldValue = field.get(this) + fieldValues[fieldName] = fieldValue + } + return fieldValues + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/data/ThreadLocalDataHolder.kt b/src/main/kotlin/com/mingliqiye/utils/data/ThreadLocalDataHolder.kt index 606fba2..7200fcf 100644 --- a/src/main/kotlin/com/mingliqiye/utils/data/ThreadLocalDataHolder.kt +++ b/src/main/kotlin/com/mingliqiye/utils/data/ThreadLocalDataHolder.kt @@ -32,67 +32,67 @@ package com.mingliqiye.utils.data */ class ThreadLocalDataHolder { - private val threadLocal: ThreadLocal = ThreadLocal() + private val threadLocal: ThreadLocal = ThreadLocal() - /** - * 获取当前线程存储的值 - * - * @return 当前线程存储的值,如果没有则返回null - */ - fun get(): T? { - return threadLocal.get() - } + /** + * 获取当前线程存储的值 + * + * @return 当前线程存储的值,如果没有则返回null + */ + fun get(): T? { + return threadLocal.get() + } - /** - * 设置当前线程的值 - * - * @param value 要存储的值 - */ - fun set(value: T) { - threadLocal.set(value) - } + /** + * 设置当前线程的值 + * + * @param value 要存储的值 + */ + fun set(value: T) { + threadLocal.set(value) + } - /** - * 移除当前线程存储的值 - * - * 防止内存泄漏,使用完毕后应调用此方法清理资源。 - */ - fun remove() { - threadLocal.remove() - } + /** + * 移除当前线程存储的值 + * + * 防止内存泄漏,使用完毕后应调用此方法清理资源。 + */ + fun remove() { + threadLocal.remove() + } - /** - * 获取当前线程存储的值,如果不存在则返回默认值 - * - * @param defaultValue 默认值 - * @return 当前线程存储的值或默认值 - */ - fun getOrDefault(defaultValue: T): T { - val value = threadLocal.get() - return value ?: defaultValue - } + /** + * 获取当前线程存储的值,如果不存在则返回默认值 + * + * @param defaultValue 默认值 + * @return 当前线程存储的值或默认值 + */ + fun getOrDefault(defaultValue: T): T { + val value = threadLocal.get() + return value ?: defaultValue + } - /** - * 安全获取值(避免NPE) - * - * 在某些异常情况下防止抛出异常,直接返回 null。 - * - * @return 值或null - */ - fun safeGet(): T? { - return try { - threadLocal.get() - } catch (e: Exception) { - null - } - } + /** + * 安全获取值(避免NPE) + * + * 在某些异常情况下防止抛出异常,直接返回 null。 + * + * @return 值或null + */ + fun safeGet(): T? { + return try { + threadLocal.get() + } catch (e: Exception) { + null + } + } - /** - * 检查当前线程是否有值 - * - * @return 是否有值 - */ - fun isPresent(): Boolean { - return threadLocal.get() != null - } + /** + * 检查当前线程是否有值 + * + * @return 是否有值 + */ + fun isPresent(): Boolean { + return threadLocal.get() != null + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/dto/DtoUtils.kt b/src/main/kotlin/com/mingliqiye/utils/dto/DtoUtils.kt index 344161f..891736f 100644 --- a/src/main/kotlin/com/mingliqiye/utils/dto/DtoUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/dto/DtoUtils.kt @@ -34,40 +34,40 @@ import java.lang.reflect.Field * @return 返回一个新的对象实例,其字段值与原对象一致。 */ fun clone(obj: T): T { - val clazz = obj.javaClass - val constructor = clazz.getDeclaredConstructor().apply { - isAccessible = true - } - val instance = constructor.newInstance() + val clazz = obj.javaClass + val constructor = clazz.getDeclaredConstructor().apply { + isAccessible = true + } + val instance = constructor.newInstance() - // 遍历类及其父类的所有字段进行赋值 - var currentClass: Class<*>? = clazz - while (currentClass != null) { - currentClass.declaredFields.forEach { field -> - if (!java.lang.reflect.Modifier.isStatic(field.modifiers)) { - field.isAccessible = true - field.set(instance, field.get(obj)) - } - } - currentClass = currentClass.superclass - } + // 遍历类及其父类的所有字段进行赋值 + var currentClass: Class<*>? = clazz + while (currentClass != null) { + currentClass.declaredFields.forEach { field -> + if (!java.lang.reflect.Modifier.isStatic(field.modifiers)) { + field.isAccessible = true + field.set(instance, field.get(obj)) + } + } + currentClass = currentClass.superclass + } - return instance + return instance } /** * 定义 DTO 拷贝行为的枚举类型。 */ enum class DotCopyType { - /** - * 表示使用点拷贝(.copy)方式处理字段。 - */ - DOT_COPY, + /** + * 表示使用点拷贝(.copy)方式处理字段。 + */ + DOT_COPY, - /** - * 表示普通拷贝方式处理字段。 - */ - COPY + /** + * 表示普通拷贝方式处理字段。 + */ + COPY } /** @@ -77,10 +77,10 @@ enum class DotCopyType { */ @Retention(AnnotationRetention.RUNTIME) @Target( - AnnotationTarget.TYPE_PARAMETER, - AnnotationTarget.VALUE_PARAMETER, - AnnotationTarget.FIELD, - AnnotationTarget.PROPERTY + AnnotationTarget.TYPE_PARAMETER, + AnnotationTarget.VALUE_PARAMETER, + AnnotationTarget.FIELD, + AnnotationTarget.PROPERTY ) annotation class DtoCopy(val type: DotCopyType = DotCopyType.COPY) @@ -92,40 +92,40 @@ annotation class DtoCopy(val type: DotCopyType = DotCopyType.COPY) * @return 返回一个新的目标 DTO 实例,字段值已从源对象拷贝。 */ fun toDto(obj: Any, dtoClass: Class): R { - val instance = dtoClass.getDeclaredConstructor().apply { - isAccessible = true - }.newInstance() + val instance = dtoClass.getDeclaredConstructor().apply { + isAccessible = true + }.newInstance() - val sourceFields = getAllFields(obj.javaClass) + val sourceFields = getAllFields(obj.javaClass) - for (sourceField in sourceFields) { - sourceField.isAccessible = true - val fieldName = sourceField.name - val fieldValue = sourceField.get(obj) + for (sourceField in sourceFields) { + sourceField.isAccessible = true + val fieldName = sourceField.name + val fieldValue = sourceField.get(obj) - try { - val targetField = dtoClass.getDeclaredField(fieldName).apply { - isAccessible = true - } - if (java.lang.reflect.Modifier.isStatic(targetField.modifiers)) { - continue - } - val ta = targetField.getAnnotation(DtoCopy::class.java) - if (ta != null) { - if (ta.type == DotCopyType.DOT_COPY) { - continue - } - } - targetField.set(instance, fieldValue) + try { + val targetField = dtoClass.getDeclaredField(fieldName).apply { + isAccessible = true + } + if (java.lang.reflect.Modifier.isStatic(targetField.modifiers)) { + continue + } + val ta = targetField.getAnnotation(DtoCopy::class.java) + if (ta != null) { + if (ta.type == DotCopyType.DOT_COPY) { + continue + } + } + targetField.set(instance, fieldValue) - } catch (e: NoSuchFieldException) { - continue - } catch (e: IllegalArgumentException) { - continue - } - } + } catch (e: NoSuchFieldException) { + continue + } catch (e: IllegalArgumentException) { + continue + } + } - return instance + return instance } /** @@ -135,12 +135,11 @@ fun toDto(obj: Any, dtoClass: Class): R { * @return 包含所有字段的列表。 */ private fun getAllFields(clazz: Class<*>): List { - val fields = mutableListOf() - var currentClass: Class<*>? = clazz - while (currentClass != null && currentClass != Any::class.java) { - fields.addAll(currentClass.declaredFields) - currentClass = currentClass.superclass - } - return fields + val fields = mutableListOf() + var currentClass: Class<*>? = clazz + while (currentClass != null && currentClass != Any::class.java) { + fields.addAll(currentClass.declaredFields) + currentClass = currentClass.superclass + } + return fields } - diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/BadGatewayException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/BadGatewayException.kt index d255b4d..5eaae1b 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/BadGatewayException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/BadGatewayException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class BadGatewayException @JvmOverloads constructor( - override val message: String? = "Bad Gateway", - override val cause: Throwable? = null, + override val message: String? = "Bad Gateway", + override val cause: Throwable? = null, ) : HttpStatusException(502, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/BadRequestException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/BadRequestException.kt index f8eced9..6ba3c27 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/BadRequestException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/BadRequestException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class BadRequestException @JvmOverloads constructor( - override val message: String? = "Bad Request", - override val cause: Throwable? = null, + override val message: String? = "Bad Request", + override val cause: Throwable? = null, ) : HttpStatusException(400, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/CodecException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/CodecException.kt index abb76a2..a0e7825 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/CodecException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/CodecException.kt @@ -23,8 +23,8 @@ package com.mingliqiye.utils.exception class CodecException @JvmOverloads constructor( - message: String? = null, - throwable: Throwable? = null, - enableSuppression: Boolean = false, - writableStackTrace: Boolean = true, + message: String? = null, + throwable: Throwable? = null, + enableSuppression: Boolean = false, + writableStackTrace: Boolean = true, ) : MingLiUtilsBaseException(message, throwable, enableSuppression, writableStackTrace) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/ConflictException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/ConflictException.kt index 60e12f5..714e339 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/ConflictException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/ConflictException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class ConflictException @JvmOverloads constructor( - override val message: String? = "Conflict", - override val cause: Throwable? = null, + override val message: String? = "Conflict", + override val cause: Throwable? = null, ) : HttpStatusException(409, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/EmptyJsonException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/EmptyJsonException.kt index 950478a..030f187 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/EmptyJsonException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/EmptyJsonException.kt @@ -23,8 +23,8 @@ package com.mingliqiye.utils.exception class EmptyJsonException @JvmOverloads constructor( - message: String? = null, - throwable: Throwable? = null, - enableSuppression: Boolean = false, - writableStackTrace: Boolean = true, + message: String? = null, + throwable: Throwable? = null, + enableSuppression: Boolean = false, + writableStackTrace: Boolean = true, ) : JsonException(message, throwable, enableSuppression, writableStackTrace) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/ForbiddenException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/ForbiddenException.kt index 41cb9f0..6570b83 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/ForbiddenException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/ForbiddenException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class ForbiddenException @JvmOverloads constructor( - override val message: String? = "Forbidden", - override val cause: Throwable? = null, + override val message: String? = "Forbidden", + override val cause: Throwable? = null, ) : HttpStatusException(403, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/FoundException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/FoundException.kt index 6275dab..362fb8c 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/FoundException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/FoundException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class FoundException @JvmOverloads constructor( - override val message: String? = "Found", - override val cause: Throwable? = null, + override val message: String? = "Found", + override val cause: Throwable? = null, ) : HttpStatusException(302, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/GatewayTimeoutException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/GatewayTimeoutException.kt index 4714944..5649ad5 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/GatewayTimeoutException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/GatewayTimeoutException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class GatewayTimeoutException @JvmOverloads constructor( - override val message: String? = "Gateway Timeout", - override val cause: Throwable? = null, + override val message: String? = "Gateway Timeout", + override val cause: Throwable? = null, ) : HttpStatusException(504, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/GoneException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/GoneException.kt index 262dddf..e941f10 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/GoneException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/GoneException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class GoneException @JvmOverloads constructor( - override val message: String? = "Gone", - override val cause: Throwable? = null, + override val message: String? = "Gone", + override val cause: Throwable? = null, ) : HttpStatusException(410, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/HttpException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/HttpException.kt index d1a8e82..d3dd14b 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/HttpException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/HttpException.kt @@ -23,8 +23,8 @@ package com.mingliqiye.utils.exception open class HttpException @JvmOverloads constructor( - message: String? = null, - throwable: Throwable? = null, - enableSuppression: Boolean = false, - writableStackTrace: Boolean = true, + message: String? = null, + throwable: Throwable? = null, + enableSuppression: Boolean = false, + writableStackTrace: Boolean = true, ) : MingLiUtilsBaseException(message, throwable, enableSuppression, writableStackTrace) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/HttpStatusException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/HttpStatusException.kt index 350971a..e8ca3e1 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/HttpStatusException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/HttpStatusException.kt @@ -30,9 +30,9 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ open class HttpStatusException @JvmOverloads constructor( - val statusCode: Int, - message: String? = null, - throwable: Throwable? = null, - enableSuppression: Boolean = false, - writableStackTrace: Boolean = true, + val statusCode: Int, + message: String? = null, + throwable: Throwable? = null, + enableSuppression: Boolean = false, + writableStackTrace: Boolean = true, ) : MingLiUtilsBaseException(message, throwable, enableSuppression, writableStackTrace) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/HttpUrlException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/HttpUrlException.kt index d22c928..68fb70d 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/HttpUrlException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/HttpUrlException.kt @@ -23,8 +23,8 @@ package com.mingliqiye.utils.exception open class HttpUrlException @JvmOverloads constructor( - message: String? = null, - throwable: Throwable? = null, - enableSuppression: Boolean = false, - writableStackTrace: Boolean = true, + message: String? = null, + throwable: Throwable? = null, + enableSuppression: Boolean = false, + writableStackTrace: Boolean = true, ) : MingLiUtilsBaseException(message, throwable, enableSuppression, writableStackTrace) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/HttpVersionNotSupportedException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/HttpVersionNotSupportedException.kt index 26240a8..b2b115d 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/HttpVersionNotSupportedException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/HttpVersionNotSupportedException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class HttpVersionNotSupportedException @JvmOverloads constructor( - override val message: String? = "HTTP Version Not Supported", - override val cause: Throwable? = null, + override val message: String? = "HTTP Version Not Supported", + override val cause: Throwable? = null, ) : HttpStatusException(505, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/InternalServerErrorException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/InternalServerErrorException.kt index 0107830..e6915e3 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/InternalServerErrorException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/InternalServerErrorException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class InternalServerErrorException @JvmOverloads constructor( - override val message: String? = "Internal Server Error", - override val cause: Throwable? = null, + override val message: String? = "Internal Server Error", + override val cause: Throwable? = null, ) : HttpStatusException(500, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/InvalidJsonException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/InvalidJsonException.kt index 8fd5e4c..aafe289 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/InvalidJsonException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/InvalidJsonException.kt @@ -23,8 +23,8 @@ package com.mingliqiye.utils.exception class InvalidJsonException @JvmOverloads constructor( - message: String? = null, - throwable: Throwable? = null, - enableSuppression: Boolean = false, - writableStackTrace: Boolean = true, + message: String? = null, + throwable: Throwable? = null, + enableSuppression: Boolean = false, + writableStackTrace: Boolean = true, ) : JsonException(message, throwable, enableSuppression, writableStackTrace) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/JsonException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/JsonException.kt index ff05603..21649b7 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/JsonException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/JsonException.kt @@ -31,8 +31,8 @@ package com.mingliqiye.utils.exception * 3. 仅包含原因(Throwable)的构造函数。 */ open class JsonException @JvmOverloads constructor( - message: String? = null, - throwable: Throwable? = null, - enableSuppression: Boolean = false, - writableStackTrace: Boolean = true, + message: String? = null, + throwable: Throwable? = null, + enableSuppression: Boolean = false, + writableStackTrace: Boolean = true, ) : MingLiUtilsBaseException(message, throwable, enableSuppression, writableStackTrace) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/JsonObjectCastException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/JsonObjectCastException.kt index b243de1..f63f48b 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/JsonObjectCastException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/JsonObjectCastException.kt @@ -23,8 +23,8 @@ package com.mingliqiye.utils.exception class JsonObjectCastException @JvmOverloads constructor( - message: String? = null, - throwable: Throwable? = null, - enableSuppression: Boolean = false, - writableStackTrace: Boolean = true, + message: String? = null, + throwable: Throwable? = null, + enableSuppression: Boolean = false, + writableStackTrace: Boolean = true, ) : JsonException(message, throwable, enableSuppression, writableStackTrace) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/JsonParserException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/JsonParserException.kt index 55b2a1a..1134d58 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/JsonParserException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/JsonParserException.kt @@ -23,8 +23,8 @@ package com.mingliqiye.utils.exception class JsonParserException @JvmOverloads constructor( - message: String? = null, - throwable: Throwable? = null, - enableSuppression: Boolean = false, - writableStackTrace: Boolean = true, + message: String? = null, + throwable: Throwable? = null, + enableSuppression: Boolean = false, + writableStackTrace: Boolean = true, ) : JsonException(message, throwable, enableSuppression, writableStackTrace) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/JsonTypeException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/JsonTypeException.kt index ae4aec0..5aaeec7 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/JsonTypeException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/JsonTypeException.kt @@ -23,8 +23,8 @@ package com.mingliqiye.utils.exception class JsonTypeException @JvmOverloads constructor( - message: String? = null, - throwable: Throwable? = null, - enableSuppression: Boolean = false, - writableStackTrace: Boolean = true, + message: String? = null, + throwable: Throwable? = null, + enableSuppression: Boolean = false, + writableStackTrace: Boolean = true, ) : JsonException(message, throwable, enableSuppression, writableStackTrace) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/LengthRequiredException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/LengthRequiredException.kt index 4250b3a..19f840d 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/LengthRequiredException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/LengthRequiredException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class LengthRequiredException @JvmOverloads constructor( - override val message: String? = "Length Required", - override val cause: Throwable? = null, + override val message: String? = "Length Required", + override val cause: Throwable? = null, ) : HttpStatusException(411, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/MethodNotAllowedException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/MethodNotAllowedException.kt index d2055e7..437ae87 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/MethodNotAllowedException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/MethodNotAllowedException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class MethodNotAllowedException @JvmOverloads constructor( - override val message: String? = "Method Not Allowed", - override val cause: Throwable? = null, + override val message: String? = "Method Not Allowed", + override val cause: Throwable? = null, ) : HttpStatusException(405, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/MingLiUtilsBaseException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/MingLiUtilsBaseException.kt index 5db6217..db26df1 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/MingLiUtilsBaseException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/MingLiUtilsBaseException.kt @@ -23,8 +23,8 @@ package com.mingliqiye.utils.exception open class MingLiUtilsBaseException @JvmOverloads constructor( - message: String? = null, - cause: Throwable? = null, - enableSuppression: Boolean = false, - writableStackTrace: Boolean = true, + message: String? = null, + cause: Throwable? = null, + enableSuppression: Boolean = false, + writableStackTrace: Boolean = true, ) : RuntimeException(message, cause, enableSuppression, writableStackTrace) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/MovedPermanentlyException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/MovedPermanentlyException.kt index 29ea0f2..6b302c0 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/MovedPermanentlyException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/MovedPermanentlyException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class MovedPermanentlyException @JvmOverloads constructor( - override val message: String? = "Moved Permanently", - override val cause: Throwable? = null, + override val message: String? = "Moved Permanently", + override val cause: Throwable? = null, ) : HttpStatusException(301, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/MultipleChoicesException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/MultipleChoicesException.kt index 66013a6..223b83e 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/MultipleChoicesException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/MultipleChoicesException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class MultipleChoicesException @JvmOverloads constructor( - override val message: String? = "Multiple Choices", - override val cause: Throwable? = null, + override val message: String? = "Multiple Choices", + override val cause: Throwable? = null, ) : HttpStatusException(300, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/NotAcceptableException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/NotAcceptableException.kt index 4c5c933..288d76f 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/NotAcceptableException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/NotAcceptableException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class NotAcceptableException @JvmOverloads constructor( - override val message: String? = "Not Acceptable", - override val cause: Throwable? = null, + override val message: String? = "Not Acceptable", + override val cause: Throwable? = null, ) : HttpStatusException(406, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/NotFoundException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/NotFoundException.kt index 94cb70b..f623e27 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/NotFoundException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/NotFoundException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class NotFoundException @JvmOverloads constructor( - override val message: String? = "Not Found", - override val cause: Throwable? = null, + override val message: String? = "Not Found", + override val cause: Throwable? = null, ) : HttpStatusException(404, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/NotFoundResourceException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/NotFoundResourceException.kt index 448096b..1f64154 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/NotFoundResourceException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/NotFoundResourceException.kt @@ -23,8 +23,8 @@ package com.mingliqiye.utils.exception class NotFoundResourceException @JvmOverloads constructor( - message: String? = null, - throwable: Throwable? = null, - enableSuppression: Boolean = false, - writableStackTrace: Boolean = true, + message: String? = null, + throwable: Throwable? = null, + enableSuppression: Boolean = false, + writableStackTrace: Boolean = true, ) : MingLiUtilsBaseException(message, throwable, enableSuppression, writableStackTrace) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/NotImplementedException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/NotImplementedException.kt index 87140d0..4775c9e 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/NotImplementedException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/NotImplementedException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class NotImplementedException @JvmOverloads constructor( - override val message: String? = "Not Implemented", - override val cause: Throwable? = null, + override val message: String? = "Not Implemented", + override val cause: Throwable? = null, ) : HttpStatusException(501, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/NotModifiedException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/NotModifiedException.kt index 5ade708..eceb34f 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/NotModifiedException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/NotModifiedException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class NotModifiedException @JvmOverloads constructor( - override val message: String? = "Not Modified", - override val cause: Throwable? = null, + override val message: String? = "Not Modified", + override val cause: Throwable? = null, ) : HttpStatusException(304, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/PaymentRequiredException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/PaymentRequiredException.kt index 4be7f46..7a5140a 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/PaymentRequiredException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/PaymentRequiredException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class PaymentRequiredException @JvmOverloads constructor( - override val message: String? = "Payment Required", - override val cause: Throwable? = null, + override val message: String? = "Payment Required", + override val cause: Throwable? = null, ) : HttpStatusException(402, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/PreconditionFailedException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/PreconditionFailedException.kt index 08d5afa..05975a1 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/PreconditionFailedException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/PreconditionFailedException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class PreconditionFailedException @JvmOverloads constructor( - override val message: String? = "Precondition Failed", - override val cause: Throwable? = null, + override val message: String? = "Precondition Failed", + override val cause: Throwable? = null, ) : HttpStatusException(412, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/ProxyAuthenticationRequiredException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/ProxyAuthenticationRequiredException.kt index 9ad0b25..045fdfc 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/ProxyAuthenticationRequiredException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/ProxyAuthenticationRequiredException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class ProxyAuthenticationRequiredException @JvmOverloads constructor( - override val message: String? = "Proxy Authentication Required", - override val cause: Throwable? = null, + override val message: String? = "Proxy Authentication Required", + override val cause: Throwable? = null, ) : HttpStatusException(407, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/RequestEntityTooLargeException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/RequestEntityTooLargeException.kt index eb296ec..8efe551 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/RequestEntityTooLargeException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/RequestEntityTooLargeException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class RequestEntityTooLargeException @JvmOverloads constructor( - override val message: String? = "Request Entity Too Large", - override val cause: Throwable? = null, + override val message: String? = "Request Entity Too Large", + override val cause: Throwable? = null, ) : HttpStatusException(413, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/RequestTimeoutException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/RequestTimeoutException.kt index 1829ffe..5e1393f 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/RequestTimeoutException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/RequestTimeoutException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class RequestTimeoutException @JvmOverloads constructor( - override val message: String? = "Request Timeout", - override val cause: Throwable? = null, + override val message: String? = "Request Timeout", + override val cause: Throwable? = null, ) : HttpStatusException(408, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/RequestUriTooLargeException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/RequestUriTooLargeException.kt index 86e90bc..7fb9d54 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/RequestUriTooLargeException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/RequestUriTooLargeException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class RequestUriTooLargeException @JvmOverloads constructor( - override val message: String? = "Request URI Too Large", - override val cause: Throwable? = null, + override val message: String? = "Request URI Too Large", + override val cause: Throwable? = null, ) : HttpStatusException(414, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/RequestedRangeNotSatisfiableException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/RequestedRangeNotSatisfiableException.kt index ba285db..aad45a3 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/RequestedRangeNotSatisfiableException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/RequestedRangeNotSatisfiableException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class RequestedRangeNotSatisfiableException @JvmOverloads constructor( - override val message: String? = "Requested Range Not Satisfiable", - override val cause: Throwable? = null, + override val message: String? = "Requested Range Not Satisfiable", + override val cause: Throwable? = null, ) : HttpStatusException(416, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/SeeOtherException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/SeeOtherException.kt index 76f1d5a..e65c80b 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/SeeOtherException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/SeeOtherException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class SeeOtherException @JvmOverloads constructor( - override val message: String? = "See Other", - override val cause: Throwable? = null, + override val message: String? = "See Other", + override val cause: Throwable? = null, ) : HttpStatusException(303, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/ServiceUnavailableException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/ServiceUnavailableException.kt index 963117c..7b1cd7f 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/ServiceUnavailableException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/ServiceUnavailableException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class ServiceUnavailableException @JvmOverloads constructor( - override val message: String? = "Service Unavailable", - override val cause: Throwable? = null, + override val message: String? = "Service Unavailable", + override val cause: Throwable? = null, ) : HttpStatusException(503, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/TemporaryRedirectException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/TemporaryRedirectException.kt index 552b5b0..8f1e5c6 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/TemporaryRedirectException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/TemporaryRedirectException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class TemporaryRedirectException @JvmOverloads constructor( - override val message: String? = "Temporary Redirect", - override val cause: Throwable? = null, + override val message: String? = "Temporary Redirect", + override val cause: Throwable? = null, ) : HttpStatusException(307, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/UnauthorizedException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/UnauthorizedException.kt index 4fa8d6a..0adf8e9 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/UnauthorizedException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/UnauthorizedException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class UnauthorizedException @JvmOverloads constructor( - override val message: String? = "Unauthorized", - override val cause: Throwable? = null, + override val message: String? = "Unauthorized", + override val cause: Throwable? = null, ) : HttpStatusException(401, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/UnsupportedMediaTypeException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/UnsupportedMediaTypeException.kt index d528f91..73cb789 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/UnsupportedMediaTypeException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/UnsupportedMediaTypeException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class UnsupportedMediaTypeException @JvmOverloads constructor( - override val message: String? = "Unsupported Media Type", - override val cause: Throwable? = null, + override val message: String? = "Unsupported Media Type", + override val cause: Throwable? = null, ) : HttpStatusException(415, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/exception/UseProxyException.kt b/src/main/kotlin/com/mingliqiye/utils/exception/UseProxyException.kt index ed770bf..da29731 100644 --- a/src/main/kotlin/com/mingliqiye/utils/exception/UseProxyException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/exception/UseProxyException.kt @@ -29,6 +29,6 @@ package com.mingliqiye.utils.exception * @param cause 异常原因,默认为 null */ class UseProxyException @JvmOverloads constructor( - override val message: String? = "Use Proxy", - override val cause: Throwable? = null, + override val message: String? = "Use Proxy", + override val cause: Throwable? = null, ) : HttpStatusException(305, message, cause) diff --git a/src/main/kotlin/com/mingliqiye/utils/file/FileUtils.kt b/src/main/kotlin/com/mingliqiye/utils/file/FileUtils.kt index 68e2f51..9340b88 100644 --- a/src/main/kotlin/com/mingliqiye/utils/file/FileUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/file/FileUtils.kt @@ -40,120 +40,120 @@ var DEFAULT_CHARSET: Charset = StandardCharsets.UTF_8 // 读取文件内容为字符串 @Throws(IOException::class) - /** - * 读取文件内容为字符串,使用默认字符集 - * - * @return 文件内容的字符串表示 - * @throws IOException 读取文件时发生错误 - */ + /** + * 读取文件内容为字符串,使用默认字符集 + * + * @return 文件内容的字符串表示 + * @throws IOException 读取文件时发生错误 + */ fun String.readFileToString(): String { - return this.readFileToString(DEFAULT_CHARSET) + return this.readFileToString(DEFAULT_CHARSET) } @Throws(IOException::class) - /** - * 读取文件内容为字符串 - * - * @param charset 字符编码格式 - * @return 文件内容的字符串表示 - * @throws IOException 读取文件时发生错误 - */ + /** + * 读取文件内容为字符串 + * + * @param charset 字符编码格式 + * @return 文件内容的字符串表示 + * @throws IOException 读取文件时发生错误 + */ fun String.readFileToString(charset: Charset): String { - val path = OsPath.of(this) - val bytes = Files.readAllBytes(path) - return String(bytes, charset) + val path = OsPath.of(this) + val bytes = Files.readAllBytes(path) + return String(bytes, charset) } // 将字符串写入文件 @Throws(IOException::class) - /** - * 将字符串写入文件,使用默认字符集 - * - * @param content 要写入的字符串内容 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字符串写入文件,使用默认字符集 + * + * @param content 要写入的字符串内容 + * @throws IOException 写入文件时发生错误 + */ fun String.writeStringToFile(content: String) { - this.writeStringToFile(content, DEFAULT_CHARSET) + this.writeStringToFile(content, DEFAULT_CHARSET) } @Throws(IOException::class) - /** - * 将字符串写入文件 - * - * @param content 要写入的字符串内容 - * @param charset 字符编码格式 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字符串写入文件 + * + * @param content 要写入的字符串内容 + * @param charset 字符编码格式 + * @throws IOException 写入文件时发生错误 + */ fun String.writeStringToFile(content: String, charset: Charset) { - val path = Paths.get(this) - path.parent?.let { Files.createDirectories(it) } - Files.write(path, content.toByteArray(charset)) + val path = Paths.get(this) + path.parent?.let { Files.createDirectories(it) } + Files.write(path, content.toByteArray(charset)) } // 读取文件内容为字符串列表(按行分割) @Throws(IOException::class) - /** - * 读取文件内容为字符串列表(按行分割),使用默认字符集 - * - * @return 按行分割的字符串列表 - * @throws IOException 读取文件时发生错误 - */ + /** + * 读取文件内容为字符串列表(按行分割),使用默认字符集 + * + * @return 按行分割的字符串列表 + * @throws IOException 读取文件时发生错误 + */ fun String.readLines(): List { - return this.readLines(DEFAULT_CHARSET) + return this.readLines(DEFAULT_CHARSET) } @Throws(IOException::class) - /** - * 读取文件内容为字符串列表(按行分割) - * - * @param charset 字符编码格式 - * @return 按行分割的字符串列表 - * @throws IOException 读取文件时发生错误 - */ + /** + * 读取文件内容为字符串列表(按行分割) + * + * @param charset 字符编码格式 + * @return 按行分割的字符串列表 + * @throws IOException 读取文件时发生错误 + */ fun String.readLines(charset: Charset): List { - val path = Paths.get(this) - return Files.readAllLines(path, charset) + val path = Paths.get(this) + return Files.readAllLines(path, charset) } // 将字符串列表写入文件(每行一个元素) @Throws(IOException::class) - /** - * 将字符串列表写入文件(每行一个元素),使用默认字符集 - * - * @param lines 要写入的字符串列表 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字符串列表写入文件(每行一个元素),使用默认字符集 + * + * @param lines 要写入的字符串列表 + * @throws IOException 写入文件时发生错误 + */ fun String.writeLines(lines: List) { - this.writeLines(lines, DEFAULT_CHARSET) + this.writeLines(lines, DEFAULT_CHARSET) } @Throws(IOException::class) - /** - * 将字符串列表写入文件(每行一个元素) - * - * @param lines 要写入的字符串列表 - * @param charset 字符编码格式 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字符串列表写入文件(每行一个元素) + * + * @param lines 要写入的字符串列表 + * @param charset 字符编码格式 + * @throws IOException 写入文件时发生错误 + */ fun String.writeLines(lines: List, charset: Charset) { - val path = Paths.get(this) - Files.createDirectories(path.parent) - Files.write(path, lines, charset) + val path = Paths.get(this) + Files.createDirectories(path.parent) + Files.write(path, lines, charset) } // 复制文件 @Throws(IOException::class) - /** - * 复制文件到目标路径 - * - * @param targetPath 目标文件路径 - * @throws IOException 复制文件时发生错误 - */ + /** + * 复制文件到目标路径 + * + * @param targetPath 目标文件路径 + * @throws IOException 复制文件时发生错误 + */ fun String.copyFile(targetPath: String) { - val source = Paths.get(this) - val target = Paths.get(targetPath) - Files.createDirectories(target.parent) - Files.copy(source, target) + val source = Paths.get(this) + val target = Paths.get(targetPath) + Files.createDirectories(target.parent) + Files.copy(source, target) } // 删除文件 @@ -163,12 +163,12 @@ fun String.copyFile(targetPath: String) { * @return 删除操作是否成功 */ fun String.deleteFile(): Boolean { - return try { - val path = Paths.get(this) - Files.deleteIfExists(path) - } catch (e: IOException) { - false - } + return try { + val path = Paths.get(this) + Files.deleteIfExists(path) + } catch (e: IOException) { + false + } } // 检查文件是否存在 @@ -178,8 +178,8 @@ fun String.deleteFile(): Boolean { * @return 文件是否存在 */ fun String.exists(): Boolean { - val path = Paths.get(this) - return Files.exists(path) + val path = Paths.get(this) + return Files.exists(path) } // 获取文件大小 @@ -189,12 +189,12 @@ fun String.exists(): Boolean { * @return 文件大小(字节),如果获取失败则返回-1 */ fun String.getFileSize(): Long { - return try { - val path = Paths.get(this) - Files.size(path) - } catch (e: IOException) { - -1 - } + return try { + val path = Paths.get(this) + Files.size(path) + } catch (e: IOException) { + -1 + } } // 创建目录 @@ -204,213 +204,213 @@ fun String.getFileSize(): Long { * @return 创建操作是否成功 */ fun String.createDirectory(): Boolean { - return try { - val path = Paths.get(this) - Files.createDirectories(path) - true - } catch (e: IOException) { - false - } + return try { + val path = Paths.get(this) + Files.createDirectories(path) + true + } catch (e: IOException) { + false + } } // 读取文件内容为字节数组 @Throws(IOException::class) - /** - * 读取文件内容为字节数组 - * - * @return 文件内容的字节数组表示 - * @throws IOException 读取文件时发生错误 - */ + /** + * 读取文件内容为字节数组 + * + * @return 文件内容的字节数组表示 + * @throws IOException 读取文件时发生错误 + */ fun String.readByteArray(): ByteArray { - val path = Paths.get(this) - return Files.readAllBytes(path) + val path = Paths.get(this) + return Files.readAllBytes(path) } // 将字节数组写入文件 @Throws(IOException::class) - /** - * 将字节数组写入文件 - * - * @param data 要写入的字节数组 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字节数组写入文件 + * + * @param data 要写入的字节数组 + * @throws IOException 写入文件时发生错误 + */ fun String.writeByteArray(data: ByteArray) { - val path = Paths.get(this) - Files.createDirectories(path.parent) - Files.write(path, data) + val path = Paths.get(this) + Files.createDirectories(path.parent) + Files.write(path, data) } // 将字节数组追加到文件末尾 @Throws(IOException::class) - /** - * 将字节数组追加到文件末尾 - * - * @param data 要追加的字节数组 - * @throws IOException 追加文件时发生错误 - */ + /** + * 将字节数组追加到文件末尾 + * + * @param data 要追加的字节数组 + * @throws IOException 追加文件时发生错误 + */ fun String.appendByteArray(data: ByteArray) { - val path = Paths.get(this) - Files.createDirectories(path.parent) - Files.write( - path, data, StandardOpenOption.CREATE, StandardOpenOption.APPEND - ) + val path = Paths.get(this) + Files.createDirectories(path.parent) + Files.write( + path, data, StandardOpenOption.CREATE, StandardOpenOption.APPEND + ) } // 分块读取大文件为字节数组列表 @Throws(IOException::class) - /** - * 分块读取大文件为字节数组列表 - * - * @param chunkSize 每个块的大小 - * @return 字节数组列表 - * @throws IOException 读取文件时发生错误 - */ + /** + * 分块读取大文件为字节数组列表 + * + * @param chunkSize 每个块的大小 + * @return 字节数组列表 + * @throws IOException 读取文件时发生错误 + */ fun String.readByteArrayChunks(chunkSize: Int): List { - val chunks = mutableListOf() - val path = Paths.get(this) + val chunks = mutableListOf() + val path = Paths.get(this) - Files.newInputStream(path).use { inputStream -> - val buffer = ByteArray(chunkSize) - var bytesRead: Int - while (inputStream.read(buffer).also { bytesRead = it } != -1) { - val chunk = ByteArray(bytesRead) - System.arraycopy(buffer, 0, chunk, 0, bytesRead) - chunks.add(chunk) - } - } + Files.newInputStream(path).use { inputStream -> + val buffer = ByteArray(chunkSize) + var bytesRead: Int + while (inputStream.read(buffer).also { bytesRead = it } != -1) { + val chunk = ByteArray(bytesRead) + System.arraycopy(buffer, 0, chunk, 0, bytesRead) + chunks.add(chunk) + } + } - return chunks + return chunks } // 将字节数组列表写入文件 @Throws(IOException::class) - /** - * 将字节数组列表写入文件 - * - * @param chunks 字节数组列表 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字节数组列表写入文件 + * + * @param chunks 字节数组列表 + * @throws IOException 写入文件时发生错误 + */ fun String.writeByteArrayChunks(chunks: List) { - val path = Paths.get(this) - Files.createDirectories(path.parent) + val path = Paths.get(this) + Files.createDirectories(path.parent) - Files.newOutputStream(path).use { outputStream -> - for (chunk in chunks) { - outputStream.write(chunk) - } - } + Files.newOutputStream(path).use { outputStream -> + for (chunk in chunks) { + outputStream.write(chunk) + } + } } // 读取文件内容为字符串 @Throws(IOException::class) - /** - * 读取文件内容为字符串,使用默认字符集 - * - * @return 文件内容的字符串表示 - * @throws IOException 读取文件时发生错误 - */ + /** + * 读取文件内容为字符串,使用默认字符集 + * + * @return 文件内容的字符串表示 + * @throws IOException 读取文件时发生错误 + */ fun Path.readFileToString(): String { - return this.readFileToString(DEFAULT_CHARSET) + return this.readFileToString(DEFAULT_CHARSET) } @Throws(IOException::class) - /** - * 读取文件内容为字符串 - * - * @param charset 字符编码格式 - * @return 文件内容的字符串表示 - * @throws IOException 读取文件时发生错误 - */ + /** + * 读取文件内容为字符串 + * + * @param charset 字符编码格式 + * @return 文件内容的字符串表示 + * @throws IOException 读取文件时发生错误 + */ fun Path.readFileToString(charset: Charset): String { - val bytes = Files.readAllBytes(this) - return String(bytes, charset) + val bytes = Files.readAllBytes(this) + return String(bytes, charset) } // 将字符串写入文件 @Throws(IOException::class) - /** - * 将字符串写入文件,使用默认字符集 - * - * @param content 要写入的字符串内容 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字符串写入文件,使用默认字符集 + * + * @param content 要写入的字符串内容 + * @throws IOException 写入文件时发生错误 + */ fun Path.writeStringToFile(content: String) { - this.writeStringToFile(content, DEFAULT_CHARSET) + this.writeStringToFile(content, DEFAULT_CHARSET) } @Throws(IOException::class) - /** - * 将字符串写入文件 - * - * @param content 要写入的字符串内容 - * @param charset 字符编码格式 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字符串写入文件 + * + * @param content 要写入的字符串内容 + * @param charset 字符编码格式 + * @throws IOException 写入文件时发生错误 + */ fun Path.writeStringToFile(content: String, charset: Charset) { - this.parent?.let { Files.createDirectories(it) } - Files.write(this, content.toByteArray(charset)) + this.parent?.let { Files.createDirectories(it) } + Files.write(this, content.toByteArray(charset)) } // 读取文件内容为字符串列表 @Throws(IOException::class) - /** - * 读取文件内容为字符串列表,使用默认字符集 - * - * @return 按行分割的字符串列表 - * @throws IOException 读取文件时发生错误 - */ + /** + * 读取文件内容为字符串列表,使用默认字符集 + * + * @return 按行分割的字符串列表 + * @throws IOException 读取文件时发生错误 + */ fun Path.readLines(): List { - return this.readLines(DEFAULT_CHARSET) + return this.readLines(DEFAULT_CHARSET) } @Throws(IOException::class) - /** - * 读取文件内容为字符串列表 - * - * @param charset 字符编码格式 - * @return 按行分割的字符串列表 - * @throws IOException 读取文件时发生错误 - */ + /** + * 读取文件内容为字符串列表 + * + * @param charset 字符编码格式 + * @return 按行分割的字符串列表 + * @throws IOException 读取文件时发生错误 + */ fun Path.readLines(charset: Charset): List { - return Files.readAllLines(this, charset) + return Files.readAllLines(this, charset) } // 将字符串列表写入文件 @Throws(IOException::class) - /** - * 将字符串列表写入文件,使用默认字符集 - * - * @param lines 要写入的字符串列表 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字符串列表写入文件,使用默认字符集 + * + * @param lines 要写入的字符串列表 + * @throws IOException 写入文件时发生错误 + */ fun Path.writeLines(lines: List) { - this.writeLines(lines, DEFAULT_CHARSET) + this.writeLines(lines, DEFAULT_CHARSET) } @Throws(IOException::class) - /** - * 将字符串列表写入文件 - * - * @param lines 要写入的字符串列表 - * @param charset 字符编码格式 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字符串列表写入文件 + * + * @param lines 要写入的字符串列表 + * @param charset 字符编码格式 + * @throws IOException 写入文件时发生错误 + */ fun Path.writeLines(lines: List, charset: Charset) { - Files.createDirectories(this.parent) - Files.write(this, lines, charset) + Files.createDirectories(this.parent) + Files.write(this, lines, charset) } // 复制文件 @Throws(IOException::class) - /** - * 复制文件到目标路径 - * - * @param target 目标文件路径 - * @throws IOException 复制文件时发生错误 - */ + /** + * 复制文件到目标路径 + * + * @param target 目标文件路径 + * @throws IOException 复制文件时发生错误 + */ fun Path.copyTo(target: Path) { - Files.createDirectories(target.parent) - Files.copy(this, target) + Files.createDirectories(target.parent) + Files.copy(this, target) } // 删除文件 @@ -420,11 +420,11 @@ fun Path.copyTo(target: Path) { * @return 删除操作是否成功 */ fun Path.delete(): Boolean { - return try { - Files.deleteIfExists(this) - } catch (e: IOException) { - false - } + return try { + Files.deleteIfExists(this) + } catch (e: IOException) { + false + } } // 检查文件是否存在 @@ -434,7 +434,7 @@ fun Path.delete(): Boolean { * @return 文件是否存在 */ fun Path.exists(): Boolean { - return Files.exists(this) + return Files.exists(this) } // 获取文件大小 @@ -444,205 +444,205 @@ fun Path.exists(): Boolean { * @return 文件大小(字节),如果获取失败则返回-1 */ fun Path.getFileSize(): Long { - return try { - Files.size(this) - } catch (e: IOException) { - -1 - } + return try { + Files.size(this) + } catch (e: IOException) { + -1 + } } // 读取文件内容为字节数组 @Throws(IOException::class) - /** - * 读取文件内容为字节数组 - * - * @return 文件内容的字节数组表示 - * @throws IOException 读取文件时发生错误 - */ + /** + * 读取文件内容为字节数组 + * + * @return 文件内容的字节数组表示 + * @throws IOException 读取文件时发生错误 + */ fun Path.readByteArray(): ByteArray { - return Files.readAllBytes(this) + return Files.readAllBytes(this) } // 将字节数组写入文件 @Throws(IOException::class) - /** - * 将字节数组写入文件 - * - * @param data 要写入的字节数组 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字节数组写入文件 + * + * @param data 要写入的字节数组 + * @throws IOException 写入文件时发生错误 + */ fun Path.writeByteArray(data: ByteArray) { - Files.createDirectories(this.parent) - Files.write(this, data) + Files.createDirectories(this.parent) + Files.write(this, data) } // 将字节数组追加到文件末尾 @Throws(IOException::class) - /** - * 将字节数组追加到文件末尾 - * - * @param data 要追加的字节数组 - * @throws IOException 追加文件时发生错误 - */ + /** + * 将字节数组追加到文件末尾 + * + * @param data 要追加的字节数组 + * @throws IOException 追加文件时发生错误 + */ fun Path.appendByteArray(data: ByteArray) { - Files.createDirectories(this.parent) - Files.write(this, data, StandardOpenOption.CREATE, StandardOpenOption.APPEND) + Files.createDirectories(this.parent) + Files.write(this, data, StandardOpenOption.CREATE, StandardOpenOption.APPEND) } // 分块读取大文件为字节数组列表 @Throws(IOException::class) - /** - * 分块读取大文件为字节数组列表 - * - * @param chunkSize 每个块的大小 - * @return 字节数组列表 - * @throws IOException 读取文件时发生错误 - */ + /** + * 分块读取大文件为字节数组列表 + * + * @param chunkSize 每个块的大小 + * @return 字节数组列表 + * @throws IOException 读取文件时发生错误 + */ fun Path.readByteArrayChunks(chunkSize: Int): List { - val chunks = mutableListOf() + val chunks = mutableListOf() - Files.newInputStream(this).use { inputStream -> - val buffer = ByteArray(chunkSize) - var bytesRead: Int - while (inputStream.read(buffer).also { bytesRead = it } != -1) { - val chunk = ByteArray(bytesRead) - System.arraycopy(buffer, 0, chunk, 0, bytesRead) - chunks.add(chunk) - } - } + Files.newInputStream(this).use { inputStream -> + val buffer = ByteArray(chunkSize) + var bytesRead: Int + while (inputStream.read(buffer).also { bytesRead = it } != -1) { + val chunk = ByteArray(bytesRead) + System.arraycopy(buffer, 0, chunk, 0, bytesRead) + chunks.add(chunk) + } + } - return chunks + return chunks } // 将字节数组列表写入文件 @Throws(IOException::class) - /** - * 将字节数组列表写入文件 - * - * @param chunks 字节数组列表 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字节数组列表写入文件 + * + * @param chunks 字节数组列表 + * @throws IOException 写入文件时发生错误 + */ fun Path.writeByteArrayChunks(chunks: List) { - Files.createDirectories(this.parent) + Files.createDirectories(this.parent) - Files.newOutputStream(this).use { outputStream -> - for (chunk in chunks) { - outputStream.write(chunk) - } - } + Files.newOutputStream(this).use { outputStream -> + for (chunk in chunks) { + outputStream.write(chunk) + } + } } // 读取文件内容为字符串 @Throws(IOException::class) - /** - * 读取文件内容为字符串,使用默认字符集 - * - * @return 文件内容的字符串表示 - * @throws IOException 读取文件时发生错误 - */ + /** + * 读取文件内容为字符串,使用默认字符集 + * + * @return 文件内容的字符串表示 + * @throws IOException 读取文件时发生错误 + */ fun File.readFileToString(): String { - return this.readFileToString(DEFAULT_CHARSET) + return this.readFileToString(DEFAULT_CHARSET) } @Throws(IOException::class) - /** - * 读取文件内容为字符串 - * - * @param charset 字符编码格式 - * @return 文件内容的字符串表示 - * @throws IOException 读取文件时发生错误 - */ + /** + * 读取文件内容为字符串 + * + * @param charset 字符编码格式 + * @return 文件内容的字符串表示 + * @throws IOException 读取文件时发生错误 + */ fun File.readFileToString(charset: Charset): String { - return String(this.readBytes(), charset) + return String(this.readBytes(), charset) } // 将字符串写入文件 @Throws(IOException::class) - /** - * 将字符串写入文件,使用默认字符集 - * - * @param content 要写入的字符串内容 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字符串写入文件,使用默认字符集 + * + * @param content 要写入的字符串内容 + * @throws IOException 写入文件时发生错误 + */ fun File.writeStringToFile(content: String) { - this.writeStringToFile(content, DEFAULT_CHARSET) + this.writeStringToFile(content, DEFAULT_CHARSET) } @Throws(IOException::class) - /** - * 将字符串写入文件 - * - * @param content 要写入的字符串内容 - * @param charset 字符编码格式 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字符串写入文件 + * + * @param content 要写入的字符串内容 + * @param charset 字符编码格式 + * @throws IOException 写入文件时发生错误 + */ fun File.writeStringToFile(content: String, charset: Charset) { - this.parentFile?.mkdirs() - this.writeText(content, charset) + this.parentFile?.mkdirs() + this.writeText(content, charset) } // 读取文件内容为字符串列表 @Throws(IOException::class) - /** - * 读取文件内容为字符串列表,使用默认字符集 - * - * @return 按行分割的字符串列表 - * @throws IOException 读取文件时发生错误 - */ + /** + * 读取文件内容为字符串列表,使用默认字符集 + * + * @return 按行分割的字符串列表 + * @throws IOException 读取文件时发生错误 + */ fun File.readLines(): List { - return this.readLines(DEFAULT_CHARSET) + return this.readLines(DEFAULT_CHARSET) } @Throws(IOException::class) - /** - * 读取文件内容为字符串列表 - * - * @param charset 字符编码格式 - * @return 按行分割的字符串列表 - * @throws IOException 读取文件时发生错误 - */ + /** + * 读取文件内容为字符串列表 + * + * @param charset 字符编码格式 + * @return 按行分割的字符串列表 + * @throws IOException 读取文件时发生错误 + */ fun File.readLines(charset: Charset): List { - return this.readLines(charset) + return this.readLines(charset) } // 将字符串列表写入文件 @Throws(IOException::class) - /** - * 将字符串列表写入文件,使用默认字符集 - * - * @param lines 要写入的字符串列表 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字符串列表写入文件,使用默认字符集 + * + * @param lines 要写入的字符串列表 + * @throws IOException 写入文件时发生错误 + */ fun File.writeLines(lines: List) { - this.writeLines(lines, DEFAULT_CHARSET) + this.writeLines(lines, DEFAULT_CHARSET) } @Throws(IOException::class) - /** - * 将字符串列表写入文件 - * - * @param lines 要写入的字符串列表 - * @param charset 字符编码格式 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字符串列表写入文件 + * + * @param lines 要写入的字符串列表 + * @param charset 字符编码格式 + * @throws IOException 写入文件时发生错误 + */ fun File.writeLines(lines: List, charset: Charset) { - this.parentFile?.mkdirs() - for (line in lines) { - this.writeText(line + System.lineSeparator(), charset) - } + this.parentFile?.mkdirs() + for (line in lines) { + this.writeText(line + System.lineSeparator(), charset) + } } // 复制文件 @Throws(IOException::class) - /** - * 复制文件到目标文件 - * - * @param target 目标文件 - * @throws IOException 复制文件时发生错误 - */ + /** + * 复制文件到目标文件 + * + * @param target 目标文件 + * @throws IOException 复制文件时发生错误 + */ fun File.copyTo(target: File) { - target.parentFile?.mkdirs() - this.copyTo(target, overwrite = true) + target.parentFile?.mkdirs() + this.copyTo(target, overwrite = true) } // 获取文件大小 /** @@ -651,7 +651,7 @@ fun File.copyTo(target: File) { * @return 文件大小(字节),如果文件不存在则返回-1L */ fun File.getFileSize(): Long { - return if (this.exists()) this.length() else -1L + return if (this.exists()) this.length() else -1L } // 创建目录 @@ -661,86 +661,86 @@ fun File.getFileSize(): Long { * @return 创建操作是否成功 */ fun File.createDirectory(): Boolean { - return this.mkdirs() + return this.mkdirs() } // 读取文件内容为字节数组 @Throws(IOException::class) - /** - * 读取文件内容为字节数组 - * - * @return 文件内容的字节数组表示 - * @throws IOException 读取文件时发生错误 - */ + /** + * 读取文件内容为字节数组 + * + * @return 文件内容的字节数组表示 + * @throws IOException 读取文件时发生错误 + */ fun File.readByteArray(): ByteArray { - return this.readBytes() + return this.readBytes() } // 将字节数组写入文件 @Throws(IOException::class) - /** - * 将字节数组写入文件 - * - * @param data 要写入的字节数组 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字节数组写入文件 + * + * @param data 要写入的字节数组 + * @throws IOException 写入文件时发生错误 + */ fun File.writeByteArray(data: ByteArray) { - this.parentFile?.mkdirs() - this.writeBytes(data) + this.parentFile?.mkdirs() + this.writeBytes(data) } // 将字节数组追加到文件末尾 @Throws(IOException::class) - /** - * 将字节数组追加到文件末尾 - * - * @param data 要追加的字节数组 - * @throws IOException 追加文件时发生错误 - */ + /** + * 将字节数组追加到文件末尾 + * + * @param data 要追加的字节数组 + * @throws IOException 追加文件时发生错误 + */ fun File.appendByteArray(data: ByteArray) { - this.parentFile?.mkdirs() - this.appendBytes(data) + this.parentFile?.mkdirs() + this.appendBytes(data) } // 分块读取大文件为字节数组列表 @Throws(IOException::class) - /** - * 分块读取大文件为字节数组列表 - * - * @param chunkSize 每个块的大小 - * @return 字节数组列表 - * @throws IOException 读取文件时发生错误 - */ + /** + * 分块读取大文件为字节数组列表 + * + * @param chunkSize 每个块的大小 + * @return 字节数组列表 + * @throws IOException 读取文件时发生错误 + */ fun File.readByteArrayChunks(chunkSize: Int): List { - val chunks = mutableListOf() + val chunks = mutableListOf() - this.inputStream().use { inputStream -> - val buffer = ByteArray(chunkSize) - var bytesRead: Int - while (inputStream.read(buffer).also { bytesRead = it } != -1) { - val chunk = ByteArray(bytesRead) - System.arraycopy(buffer, 0, chunk, 0, bytesRead) - chunks.add(chunk) - } - } + this.inputStream().use { inputStream -> + val buffer = ByteArray(chunkSize) + var bytesRead: Int + while (inputStream.read(buffer).also { bytesRead = it } != -1) { + val chunk = ByteArray(bytesRead) + System.arraycopy(buffer, 0, chunk, 0, bytesRead) + chunks.add(chunk) + } + } - return chunks + return chunks } // 将字节数组列表写入文件 @Throws(IOException::class) - /** - * 将字节数组列表写入文件 - * - * @param chunks 字节数组列表 - * @throws IOException 写入文件时发生错误 - */ + /** + * 将字节数组列表写入文件 + * + * @param chunks 字节数组列表 + * @throws IOException 写入文件时发生错误 + */ fun File.writeByteArrayChunks(chunks: List) { - this.parentFile?.mkdirs() + this.parentFile?.mkdirs() - this.outputStream().use { outputStream -> - for (chunk in chunks) { - outputStream.write(chunk) - } - } + this.outputStream().use { outputStream -> + for (chunk in chunks) { + outputStream.write(chunk) + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/foreach/ForEach.kt b/src/main/kotlin/com/mingliqiye/utils/foreach/ForEach.kt index bc67494..31c482d 100644 --- a/src/main/kotlin/com/mingliqiye/utils/foreach/ForEach.kt +++ b/src/main/kotlin/com/mingliqiye/utils/foreach/ForEach.kt @@ -35,34 +35,34 @@ import com.mingliqiye.utils.functions.* * @param 可迭代对象中元素的类型 */ fun forEach( - iterable: Iterable, action: P2Function + iterable: Iterable, action: P2Function, ) { - when (iterable) { - is RandomAccess if iterable is MutableList<*> -> { - // 如果是支持随机访问的可变列表,则使用索引遍历以提高性能 - val list = iterable as MutableList - for (i in list.indices) { - action.call(list[i], i) - } - } + when (iterable) { + is RandomAccess if iterable is MutableList<*> -> { + // 如果是支持随机访问的可变列表,则使用索引遍历以提高性能 + val list = iterable as MutableList + for (i in list.indices) { + action.call(list[i], i) + } + } - is MutableList<*> -> { - // 对于普通可变列表,使用迭代器进行遍历,并手动维护索引 - var index = 0 - val it = iterable.iterator() - while (it.hasNext()) { - action.call(it.next(), index) - index++ - } - } + is MutableList<*> -> { + // 对于普通可变列表,使用迭代器进行遍历,并手动维护索引 + var index = 0 + val it = iterable.iterator() + while (it.hasNext()) { + action.call(it.next(), index) + index++ + } + } - else -> { - // 对于其他类型的可迭代对象,使用增强 for 循环并手动维护索引 - for ((index, element) in iterable.withIndex()) { - action.call(element, index) - } - } - } + else -> { + // 对于其他类型的可迭代对象,使用增强 for 循环并手动维护索引 + for ((index, element) in iterable.withIndex()) { + action.call(element, index) + } + } + } } /** @@ -74,20 +74,20 @@ fun forEach( * @param 可迭代对象中元素的类型 */ fun forEach( - iterable: Iterable, action: P1Function + iterable: Iterable, action: P1Function, ) { - if (iterable is RandomAccess) { - // 如果是支持随机访问的列表,则使用索引遍历以提高性能 - val list = iterable as MutableList - for (i in list.indices) { - action.call(list[i]) - } - } else { - // 否则使用增强 for 循环进行遍历 - for (element in iterable) { - action.call(element) - } - } + if (iterable is RandomAccess) { + // 如果是支持随机访问的列表,则使用索引遍历以提高性能 + val list = iterable as MutableList + for (i in list.indices) { + action.call(list[i]) + } + } else { + // 否则使用增强 for 循环进行遍历 + for (element in iterable) { + action.call(element) + } + } } /** @@ -100,36 +100,36 @@ fun forEach( * @param 可迭代对象中元素的类型 */ fun forEachB( - iterable: Iterable, action: P2RFunction + iterable: Iterable, action: P2RFunction, ) { - when (iterable) { - is RandomAccess if iterable is MutableList<*> -> { - // 如果是支持随机访问的可变列表,则使用索引遍历以提高性能 - val list = iterable as MutableList - for (i in list.indices) { - if (action.call(list[i], i)) return - } - } + when (iterable) { + is RandomAccess if iterable is MutableList<*> -> { + // 如果是支持随机访问的可变列表,则使用索引遍历以提高性能 + val list = iterable as MutableList + for (i in list.indices) { + if (action.call(list[i], i)) return + } + } - is MutableList<*> -> { - // 对于普通可变列表,使用迭代器进行遍历,并手动维护索引 - var index = 0 - val it = iterable.iterator() - while (it.hasNext()) { - if (action.call(it.next(), index)) return - index++ - } - } + is MutableList<*> -> { + // 对于普通可变列表,使用迭代器进行遍历,并手动维护索引 + var index = 0 + val it = iterable.iterator() + while (it.hasNext()) { + if (action.call(it.next(), index)) return + index++ + } + } - else -> { - // 对于其他类型的可迭代对象,使用增强 for 循环并手动维护索引 - var index = 0 - for (element in iterable) { - if (action.call(element, index)) return - index++ - } - } - } + else -> { + // 对于其他类型的可迭代对象,使用增强 for 循环并手动维护索引 + var index = 0 + for (element in iterable) { + if (action.call(element, index)) return + index++ + } + } + } } /** @@ -142,20 +142,20 @@ fun forEachB( * @param 可迭代对象中元素的类型 */ fun forEachB( - iterable: Iterable, action: P1RFunction + iterable: Iterable, action: P1RFunction, ) { - if (iterable is RandomAccess) { - // 如果是支持随机访问的列表,则使用索引遍历以提高性能 - val list = iterable as MutableList - for (i in list.indices) { - if (action.call(list[i])) return - } - } else { - // 否则使用增强 for 循环进行遍历 - for (element in iterable) { - if (action.call(element)) return - } - } + if (iterable is RandomAccess) { + // 如果是支持随机访问的列表,则使用索引遍历以提高性能 + val list = iterable as MutableList + for (i in list.indices) { + if (action.call(list[i])) return + } + } else { + // 否则使用增强 for 循环进行遍历 + for (element in iterable) { + if (action.call(element)) return + } + } } /** @@ -166,9 +166,9 @@ fun forEachB( * @param 数组中元素的类型 */ fun forEach( - array: Array, action: P2Function + array: Array, action: P2Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -179,9 +179,9 @@ fun forEach( * @param 数组中元素的类型 */ fun forEach( - array: Array, action: P1Function + array: Array, action: P1Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -193,9 +193,9 @@ fun forEach( * @param 数组中元素的类型 */ fun forEachB( - array: Array, action: P2RFunction + array: Array, action: P2RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -207,9 +207,9 @@ fun forEachB( * @param 数组中元素的类型 */ fun forEachB( - array: Array, action: P1RFunction + array: Array, action: P1RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -219,9 +219,9 @@ fun forEachB( * @param action 要对每个元素执行的操作,接收元素值和索引作为参数 */ fun forEach( - array: ByteArray, action: P2Function + array: ByteArray, action: P2Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -231,9 +231,9 @@ fun forEach( * @param action 要对每个元素执行的操作,只接收元素值作为参数 */ fun forEach( - array: ByteArray, action: P1Function + array: ByteArray, action: P1Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -244,9 +244,9 @@ fun forEach( * @param action 要对每个元素执行的操作,接收元素值和索引作为参数,返回 Boolean 表示是否提前终止 */ fun forEachB( - array: ByteArray, action: P2RFunction + array: ByteArray, action: P2RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -257,9 +257,9 @@ fun forEachB( * @param action 要对每个元素执行的操作,只接收元素值作为参数,返回 Boolean 表示是否提前终止 */ fun forEachB( - array: ByteArray, action: P1RFunction + array: ByteArray, action: P1RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -269,9 +269,9 @@ fun forEachB( * @param action 要对每个元素执行的操作,接收元素值和索引作为参数 */ fun forEach( - array: CharArray, action: P2Function + array: CharArray, action: P2Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -281,9 +281,9 @@ fun forEach( * @param action 要对每个元素执行的操作,只接收元素值作为参数 */ fun forEach( - array: CharArray, action: P1Function + array: CharArray, action: P1Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -294,9 +294,9 @@ fun forEach( * @param action 要对每个元素执行的操作,接收元素值和索引作为参数,返回 Boolean 表示是否提前终止 */ fun forEachB( - array: CharArray, action: P2RFunction + array: CharArray, action: P2RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -307,9 +307,9 @@ fun forEachB( * @param action 要对每个元素执行的操作,只接收元素值作为参数,返回 Boolean 表示是否提前终止 */ fun forEachB( - array: CharArray, action: P1RFunction + array: CharArray, action: P1RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -319,9 +319,9 @@ fun forEachB( * @param action 要对每个元素执行的操作,接收元素值和索引作为参数 */ fun forEach( - array: IntArray, action: P2Function + array: IntArray, action: P2Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -331,9 +331,9 @@ fun forEach( * @param action 要对每个元素执行的操作,只接收元素值作为参数 */ fun forEach( - array: IntArray, action: P1Function + array: IntArray, action: P1Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -344,9 +344,9 @@ fun forEach( * @param action 要对每个元素执行的操作,接收元素值和索引作为参数,返回 Boolean 表示是否提前终止 */ fun forEachB( - array: IntArray, action: P2RFunction + array: IntArray, action: P2RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -357,9 +357,9 @@ fun forEachB( * @param action 要对每个元素执行的操作,只接收元素值作为参数,返回 Boolean 表示是否提前终止 */ fun forEachB( - array: IntArray, action: P1RFunction + array: IntArray, action: P1RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -369,9 +369,9 @@ fun forEachB( * @param action 要对每个元素执行的操作,接收元素值和索引作为参数 */ fun forEach( - array: LongArray, action: P2Function + array: LongArray, action: P2Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -381,9 +381,9 @@ fun forEach( * @param action 要对每个元素执行的操作,只接收元素值作为参数 */ fun forEach( - array: LongArray, action: P1Function + array: LongArray, action: P1Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -394,9 +394,9 @@ fun forEach( * @param action 要对每个元素执行的操作,接收元素值和索引作为参数,返回 Boolean 表示是否提前终止 */ fun forEachB( - array: LongArray, action: P2RFunction + array: LongArray, action: P2RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -407,9 +407,9 @@ fun forEachB( * @param action 要对每个元素执行的操作,只接收元素值作为参数,返回 Boolean 表示是否提前终止 */ fun forEachB( - array: LongArray, action: P1RFunction + array: LongArray, action: P1RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -419,9 +419,9 @@ fun forEachB( * @param action 要对每个元素执行的操作,接收元素值和索引作为参数 */ fun forEach( - array: ShortArray, action: P2Function + array: ShortArray, action: P2Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -431,9 +431,9 @@ fun forEach( * @param action 要对每个元素执行的操作,只接收元素值作为参数 */ fun forEach( - array: ShortArray, action: P1Function + array: ShortArray, action: P1Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -444,9 +444,9 @@ fun forEach( * @param action 要对每个元素执行的操作,接收元素值和索引作为参数,返回 Boolean 表示是否提前终止 */ fun forEachB( - array: ShortArray, action: P2RFunction + array: ShortArray, action: P2RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -457,9 +457,9 @@ fun forEachB( * @param action 要对每个元素执行的操作,只接收元素值作为参数,返回 Boolean 表示是否提前终止 */ fun forEachB( - array: ShortArray, action: P1RFunction + array: ShortArray, action: P1RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -469,9 +469,9 @@ fun forEachB( * @param action 要对每个元素执行的操作,接收元素值和索引作为参数 */ fun forEach( - array: FloatArray, action: P2Function + array: FloatArray, action: P2Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -481,9 +481,9 @@ fun forEach( * @param action 要对每个元素执行的操作,只接收元素值作为参数 */ fun forEach( - array: FloatArray, action: P1Function + array: FloatArray, action: P1Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -494,9 +494,9 @@ fun forEach( * @param action 要对每个元素执行的操作,接收元素值和索引作为参数,返回 Boolean 表示是否提前终止 */ fun forEachB( - array: FloatArray, action: P2RFunction + array: FloatArray, action: P2RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -507,9 +507,9 @@ fun forEachB( * @param action 要对每个元素执行的操作,只接收元素值作为参数,返回 Boolean 表示是否提前终止 */ fun forEachB( - array: FloatArray, action: P1RFunction + array: FloatArray, action: P1RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -519,9 +519,9 @@ fun forEachB( * @param action 要对每个元素执行的操作,接收元素值和索引作为参数 */ fun forEach( - array: DoubleArray, action: P2Function + array: DoubleArray, action: P2Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -531,9 +531,9 @@ fun forEach( * @param action 要对每个元素执行的操作,只接收元素值作为参数 */ fun forEach( - array: DoubleArray, action: P1Function + array: DoubleArray, action: P1Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -544,9 +544,9 @@ fun forEach( * @param action 要对每个元素执行的操作,接收元素值和索引作为参数,返回 Boolean 表示是否提前终止 */ fun forEachB( - array: DoubleArray, action: P2RFunction + array: DoubleArray, action: P2RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -557,9 +557,9 @@ fun forEachB( * @param action 要对每个元素执行的操作,只接收元素值作为参数,返回 Boolean 表示是否提前终止 */ fun forEachB( - array: DoubleArray, action: P1RFunction + array: DoubleArray, action: P1RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -569,9 +569,9 @@ fun forEachB( * @param action 要对每个元素执行的操作,接收元素值和索引作为参数 */ fun forEach( - array: BooleanArray, action: P2Function + array: BooleanArray, action: P2Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -581,9 +581,9 @@ fun forEach( * @param action 要对每个元素执行的操作,只接收元素值作为参数 */ fun forEach( - array: BooleanArray, action: P1Function + array: BooleanArray, action: P1Function, ) { - forEach(array.toList(), action) + forEach(array.toList(), action) } /** @@ -594,9 +594,9 @@ fun forEach( * @param action 要对每个元素执行的操作,接收元素值和索引作为参数,返回 Boolean 表示是否提前终止 */ fun forEachB( - array: BooleanArray, action: P2RFunction + array: BooleanArray, action: P2RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -607,9 +607,9 @@ fun forEachB( * @param action 要对每个元素执行的操作,只接收元素值作为参数,返回 Boolean 表示是否提前终止 */ fun forEachB( - array: BooleanArray, action: P1RFunction + array: BooleanArray, action: P1RFunction, ) { - forEachB(array.toList(), action) + forEachB(array.toList(), action) } /** @@ -623,9 +623,9 @@ fun forEachB( * @param 集合的具体类型 */ fun >> forEachB( - array: A, action: P3RFunction + array: A, action: P3RFunction, ) { - forEachB(array, P2RFunction, Int, Boolean> { p1, p2 -> action.call(p1.key, p1.value, p2) }) + forEachB(array, P2RFunction, Int, Boolean> { p1, p2 -> action.call(p1.key, p1.value, p2) }) } /** @@ -639,9 +639,9 @@ fun >> forEachB( * @param 映射的具体类型 */ fun > forEachB( - map: A, action: P3RFunction + map: A, action: P3RFunction, ) { - forEachB(map.entries, P2RFunction, Int, Boolean> { p1, p2 -> action.call(p1.key, p1.value, p2) }) + forEachB(map.entries, P2RFunction, Int, Boolean> { p1, p2 -> action.call(p1.key, p1.value, p2) }) } /** @@ -654,9 +654,9 @@ fun > forEachB( * @param 集合的具体类型 */ fun >> forEachMap( - array: A, action: P2Function + array: A, action: P2Function, ) { - forEach(array, P1Function> { p1 -> action.call(p1.key, p1.value) }) + forEach(array, P1Function> { p1 -> action.call(p1.key, p1.value) }) } /** @@ -669,9 +669,9 @@ fun >> forEachMap( * @param 映射的具体类型 */ fun > forEachMap( - map: A, action: P2Function + map: A, action: P2Function, ) { - forEach(map.entries, P1Function> { p1 -> action.call(p1.key, p1.value) }) + forEach(map.entries, P1Function> { p1 -> action.call(p1.key, p1.value) }) } /** @@ -685,9 +685,9 @@ fun > forEachMap( * @param 集合的具体类型 */ fun >> forEachMapB( - array: A, action: P2RFunction + array: A, action: P2RFunction, ) { - forEachB(array, P1RFunction, Boolean> { p1 -> action.call(p1.key, p1.value) }) + forEachB(array, P1RFunction, Boolean> { p1 -> action.call(p1.key, p1.value) }) } /** @@ -701,7 +701,7 @@ fun >> forEachMapB( * @param 映射的具体类型 */ fun > forEachMapB( - map: A, action: P2RFunction + map: A, action: P2RFunction, ) { - forEachB(map.entries, P1RFunction, Boolean> { p1 -> action.call(p1.key, p1.value) }) + forEachB(map.entries, P1RFunction, Boolean> { p1 -> action.call(p1.key, p1.value) }) } diff --git a/src/main/kotlin/com/mingliqiye/utils/functions/Debouncer.kt b/src/main/kotlin/com/mingliqiye/utils/functions/Debouncer.kt index 2eadaa2..dd2c3b8 100644 --- a/src/main/kotlin/com/mingliqiye/utils/functions/Debouncer.kt +++ b/src/main/kotlin/com/mingliqiye/utils/functions/Debouncer.kt @@ -32,53 +32,53 @@ import java.util.concurrent.* */ class Debouncer(private val delay: Long, unit: TimeUnit) { - private val scheduler: ScheduledExecutorService = Executors.newSingleThreadScheduledExecutor( - NamedThreadFactory { clazz, poolNumber, threadNumber -> - "Debouncer-$poolNumber-$threadNumber" - } - ) - private val delayedMap: ConcurrentHashMap> = ConcurrentHashMap() - private val delayMillis: Long = unit.toMillis(delay) + private val scheduler: ScheduledExecutorService = Executors.newSingleThreadScheduledExecutor( + NamedThreadFactory { clazz, poolNumber, threadNumber -> + "Debouncer-$poolNumber-$threadNumber" + } + ) + private val delayedMap: ConcurrentHashMap> = ConcurrentHashMap() + private val delayMillis: Long = unit.toMillis(delay) - /** - * 执行防抖操作,如果在指定延迟时间内再次调用相同key的任务,则取消之前的任务并重新计时 - * - * @param key 任务的唯一标识符,用于区分不同任务 - * @param task 要执行的任务 - */ - fun debounce(key: Any, task: Runnable) { - // 提交新任务并获取之前可能存在的任务 - val prev = delayedMap.put( - key, - scheduler.schedule( - { - try { - task.run() - } finally { - // 任务执行完成后从映射中移除 - delayedMap.remove(key) - } - }, - delayMillis, - TimeUnit.MILLISECONDS - ) - ) + /** + * 执行防抖操作,如果在指定延迟时间内再次调用相同key的任务,则取消之前的任务并重新计时 + * + * @param key 任务的唯一标识符,用于区分不同任务 + * @param task 要执行的任务 + */ + fun debounce(key: Any, task: Runnable) { + // 提交新任务并获取之前可能存在的任务 + val prev = delayedMap.put( + key, + scheduler.schedule( + { + try { + task.run() + } finally { + // 任务执行完成后从映射中移除 + delayedMap.remove(key) + } + }, + delayMillis, + TimeUnit.MILLISECONDS + ) + ) - // 如果之前存在任务,则取消它 - prev?.cancel(true) - } + // 如果之前存在任务,则取消它 + prev?.cancel(true) + } - /** - * 关闭防抖器,取消所有待执行的任务并关闭调度器 - */ - fun shutdown() { - // 先取消所有延迟任务 - for (future in delayedMap.values) { - future.cancel(true) - } - delayedMap.clear() + /** + * 关闭防抖器,取消所有待执行的任务并关闭调度器 + */ + fun shutdown() { + // 先取消所有延迟任务 + for (future in delayedMap.values) { + future.cancel(true) + } + delayedMap.clear() - // 再关闭调度器 - scheduler.shutdownNow() - } + // 再关闭调度器 + scheduler.shutdownNow() + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/functions/Functions.kt b/src/main/kotlin/com/mingliqiye/utils/functions/Functions.kt index ed87d46..69e416d 100644 --- a/src/main/kotlin/com/mingliqiye/utils/functions/Functions.kt +++ b/src/main/kotlin/com/mingliqiye/utils/functions/Functions.kt @@ -25,713 +25,713 @@ package com.mingliqiye.utils.functions fun T.with(function: Function): T = function.call().let { - this + this } fun T.with(function: P1Function): T = function.call(this).let { - this + this } @FunctionalInterface fun interface Function { - fun call() + fun call() } @FunctionalInterface fun interface P1Function

{ - fun call(p: P) + fun call(p: P) } @FunctionalInterface fun interface RFunction { - fun call(): R + fun call(): R } @FunctionalInterface fun interface P1RFunction { - fun call(p: P): R + fun call(p: P): R } @FunctionalInterface fun interface P2Function { - fun call(p: P, p1: P1) + fun call(p: P, p1: P1) } @FunctionalInterface fun interface P2RFunction { - fun call(p: P, p1: P1): R + fun call(p: P, p1: P1): R } @FunctionalInterface fun interface P3Function { - fun call(p: P, p1: P1, p2: P2) + fun call(p: P, p1: P1, p2: P2) } @FunctionalInterface fun interface P3RFunction { - fun call(p: P, p1: P1, p2: P2): R + fun call(p: P, p1: P1, p2: P2): R } @FunctionalInterface fun interface P4Function { - fun call(p: P, p1: P1, p2: P2, p3: P3) + fun call(p: P, p1: P1, p2: P2, p3: P3) } @FunctionalInterface fun interface P4RFunction { - fun call(p: P, p1: P1, p2: P2, p3: P3): R + fun call(p: P, p1: P1, p2: P2, p3: P3): R } @FunctionalInterface fun interface P5Function { - fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4) + fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4) } @FunctionalInterface fun interface P5RFunction { - fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4): R + fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4): R } @FunctionalInterface fun interface P6Function { - fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5) + fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5) } @FunctionalInterface fun interface P6RFunction { - fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5): R + fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5): R } @FunctionalInterface fun interface P7Function { - fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6) + fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6) } @FunctionalInterface fun interface P7RFunction { - fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6): R + fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6): R } @FunctionalInterface fun interface P8Function { - fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7) + fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7) } @FunctionalInterface fun interface P8RFunction { - fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7): R + fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7): R } @FunctionalInterface fun interface P9Function { - fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8) + fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8) } @FunctionalInterface fun interface P9RFunction { - fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8): R + fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8): R } @FunctionalInterface fun interface P10Function { - fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9) + fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9) } @FunctionalInterface fun interface P10RFunction { - fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9): R + fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9): R } @FunctionalInterface fun interface P11Function { - fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10) + fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10) } @FunctionalInterface fun interface P11RFunction { - fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10): R + fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10): R } @FunctionalInterface fun interface P12Function { - fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11) + fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11) } @FunctionalInterface fun interface P12RFunction { - fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11): R + fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11): R } @FunctionalInterface fun interface P13Function { - fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12) + fun call(p: P, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12) } @FunctionalInterface fun interface P13RFunction { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12 - ): R + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + ): R } @FunctionalInterface fun interface P14Function { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13 - ) + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + ) } @FunctionalInterface fun interface P14RFunction { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13 - ): R + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + ): R } @FunctionalInterface fun interface P15Function { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14 - ) + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + ) } @FunctionalInterface fun interface P15RFunction { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14 - ): R + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + ): R } @FunctionalInterface fun interface P16Function { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15 - ) + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + ) } @FunctionalInterface fun interface P16RFunction { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15 - ): R + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + ): R } @FunctionalInterface fun interface P17Function { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15, - p16: P16 - ) + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + p16: P16, + ) } @FunctionalInterface fun interface P17RFunction { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15, - p16: P16 - ): R + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + p16: P16, + ): R } @FunctionalInterface fun interface P18Function { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15, - p16: P16, - p17: P17 - ) + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + p16: P16, + p17: P17, + ) } @FunctionalInterface fun interface P18RFunction { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15, - p16: P16, - p17: P17 - ): R + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + p16: P16, + p17: P17, + ): R } @FunctionalInterface fun interface P19Function { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15, - p16: P16, - p17: P17, - p18: P18 - ) + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + p16: P16, + p17: P17, + p18: P18, + ) } @FunctionalInterface fun interface P19RFunction { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15, - p16: P16, - p17: P17, - p18: P18 - ): R + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + p16: P16, + p17: P17, + p18: P18, + ): R } @FunctionalInterface fun interface P20Function { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15, - p16: P16, - p17: P17, - p18: P18, - p19: P19 - ) + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + p16: P16, + p17: P17, + p18: P18, + p19: P19, + ) } @FunctionalInterface fun interface P20RFunction { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15, - p16: P16, - p17: P17, - p18: P18, - p19: P19 - ): R + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + p16: P16, + p17: P17, + p18: P18, + p19: P19, + ): R } @FunctionalInterface fun interface P21Function { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15, - p16: P16, - p17: P17, - p18: P18, - p19: P19, - p20: P20 - ) + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + p16: P16, + p17: P17, + p18: P18, + p19: P19, + p20: P20, + ) } @FunctionalInterface fun interface P21RFunction { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15, - p16: P16, - p17: P17, - p18: P18, - p19: P19, - p20: P20 - ): R + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + p16: P16, + p17: P17, + p18: P18, + p19: P19, + p20: P20, + ): R } @FunctionalInterface fun interface P22Function { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15, - p16: P16, - p17: P17, - p18: P18, - p19: P19, - p20: P20, - p21: P21 - ) + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + p16: P16, + p17: P17, + p18: P18, + p19: P19, + p20: P20, + p21: P21, + ) } @FunctionalInterface fun interface P22RFunction { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15, - p16: P16, - p17: P17, - p18: P18, - p19: P19, - p20: P20, - p21: P21 - ): R + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + p16: P16, + p17: P17, + p18: P18, + p19: P19, + p20: P20, + p21: P21, + ): R } @FunctionalInterface fun interface P23Function { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15, - p16: P16, - p17: P17, - p18: P18, - p19: P19, - p20: P20, - p21: P21, - p22: P22 - ) + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + p16: P16, + p17: P17, + p18: P18, + p19: P19, + p20: P20, + p21: P21, + p22: P22, + ) } @FunctionalInterface fun interface P23RFunction { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15, - p16: P16, - p17: P17, - p18: P18, - p19: P19, - p20: P20, - p21: P21, - p22: P22 - ): R + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + p16: P16, + p17: P17, + p18: P18, + p19: P19, + p20: P20, + p21: P21, + p22: P22, + ): R } @FunctionalInterface fun interface P24Function { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15, - p16: P16, - p17: P17, - p18: P18, - p19: P19, - p20: P20, - p21: P21, - p22: P22, - p23: P23 - ) + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + p16: P16, + p17: P17, + p18: P18, + p19: P19, + p20: P20, + p21: P21, + p22: P22, + p23: P23, + ) } @FunctionalInterface fun interface P24RFunction { - fun call( - p: P, - p1: P1, - p2: P2, - p3: P3, - p4: P4, - p5: P5, - p6: P6, - p7: P7, - p8: P8, - p9: P9, - p10: P10, - p11: P11, - p12: P12, - p13: P13, - p14: P14, - p15: P15, - p16: P16, - p17: P17, - p18: P18, - p19: P19, - p20: P20, - p21: P21, - p22: P22, - p23: P23 - ): R + fun call( + p: P, + p1: P1, + p2: P2, + p3: P3, + p4: P4, + p5: P5, + p6: P6, + p7: P7, + p8: P8, + p9: P9, + p10: P10, + p11: P11, + p12: P12, + p13: P13, + p14: P14, + p15: P15, + p16: P16, + p17: P17, + p18: P18, + p19: P19, + p20: P20, + p21: P21, + p22: P22, + p23: P23, + ): R } diff --git a/src/main/kotlin/com/mingliqiye/utils/functions/Pipeline.kt b/src/main/kotlin/com/mingliqiye/utils/functions/Pipeline.kt index 9277d41..b1f322b 100644 --- a/src/main/kotlin/com/mingliqiye/utils/functions/Pipeline.kt +++ b/src/main/kotlin/com/mingliqiye/utils/functions/Pipeline.kt @@ -31,275 +31,275 @@ import kotlin.reflect.KClass */ class Pipeline(private val value: T) { - /** - * 对当前值进行转换操作,并返回新的Pipeline实例 - * @param transformer 转换函数,接收当前值并返回转换后的结果 - * @return 包含转换后结果的新Pipeline实例 - */ - fun transform(transformer: P1RFunction): Pipeline = Pipeline(transformer.call(value)) + /** + * 对当前值进行转换操作,并返回新的Pipeline实例 + * @param transformer 转换函数,接收当前值并返回转换后的结果 + * @return 包含转换后结果的新Pipeline实例 + */ + fun transform(transformer: P1RFunction): Pipeline = Pipeline(transformer.call(value)) - /** - * 对当前值进行转换操作,功能与transform相同,提供不同的方法名选择 - * @param transformer 转换函数,接收当前值并返回转换后的结果 - * @return 包含转换后结果的新Pipeline实例 - */ - fun then(transformer: P1RFunction): Pipeline = transform(transformer) + /** + * 对当前值进行转换操作,功能与transform相同,提供不同的方法名选择 + * @param transformer 转换函数,接收当前值并返回转换后的结果 + * @return 包含转换后结果的新Pipeline实例 + */ + fun then(transformer: P1RFunction): Pipeline = transform(transformer) - /** - * 消费当前值但不改变流水线状态,用于执行副作用操作 - * @param consumer 消费函数,接收当前值进行消费操作 - * @return 当前Pipeline实例,支持链式调用 - */ - fun consume(consumer: P1Function): Pipeline { - consumer.call(value) - return this - } + /** + * 消费当前值但不改变流水线状态,用于执行副作用操作 + * @param consumer 消费函数,接收当前值进行消费操作 + * @return 当前Pipeline实例,支持链式调用 + */ + fun consume(consumer: P1Function): Pipeline { + consumer.call(value) + return this + } - /** - * 判断当前值是否为null - * @return true表示当前值为null,false表示不为null - */ - fun isNull(): Boolean = (value == null) + /** + * 判断当前值是否为null + * @return true表示当前值为null,false表示不为null + */ + fun isNull(): Boolean = (value == null) - /** - * 判断当前值是否不为null - * @return true表示当前值不为null,false表示为null - */ - fun isNotNull(): Boolean = (value != null) + /** + * 判断当前值是否不为null + * @return true表示当前值不为null,false表示为null + */ + fun isNotNull(): Boolean = (value != null) - /** - * 根据条件过滤当前值,如果条件满足则保持原值,否则设置为null - * @param predicate 过滤条件函数,接收当前值并返回布尔值 - * @return 包含过滤后结果的Pipeline实例 - */ - fun filter(predicate: P1RFunction): Pipeline = - if (predicate.call(value)) Pipeline(value) else Pipeline(null) + /** + * 根据条件过滤当前值,如果条件满足则保持原值,否则设置为null + * @param predicate 过滤条件函数,接收当前值并返回布尔值 + * @return 包含过滤后结果的Pipeline实例 + */ + fun filter(predicate: P1RFunction): Pipeline = + if (predicate.call(value)) Pipeline(value) else Pipeline(null) - /** - * 获取当前流水线中的值 - * @return 当前流水线中存储的值 - */ - fun getValue(): T = value + /** + * 获取当前流水线中的值 + * @return 当前流水线中存储的值 + */ + fun getValue(): T = value - /** - * 安全地转换当前值,允许转换结果为null - * @param transformer 转换函数,可能返回null - * @return 包含转换后结果(可能为null)的Pipeline实例 - */ - fun safeTransform(transformer: P1RFunction): Pipeline = Pipeline(transformer.call(value)) + /** + * 安全地转换当前值,允许转换结果为null + * @param transformer 转换函数,可能返回null + * @return 包含转换后结果(可能为null)的Pipeline实例 + */ + fun safeTransform(transformer: P1RFunction): Pipeline = Pipeline(transformer.call(value)) - /** - * 将当前值映射为另一个Pipeline实例 - * @param mapper 映射函数,接收当前值并返回Pipeline实例 - * @return 映射后的Pipeline实例 - */ - fun flatMap(mapper: P1RFunction>): Pipeline = mapper.call(value) + /** + * 将当前值映射为另一个Pipeline实例 + * @param mapper 映射函数,接收当前值并返回Pipeline实例 + * @return 映射后的Pipeline实例 + */ + fun flatMap(mapper: P1RFunction>): Pipeline = mapper.call(value) - /** - * 将当前值映射为非null结果,如果当前值为null则直接返回null - * @param mapper 映射函数,可能返回null - * @return 包含映射后结果的Pipeline实例 - */ - fun mapNotNull(mapper: P1RFunction): Pipeline = - if (value != null) Pipeline(mapper.call(value)!!) else Pipeline(null) + /** + * 将当前值映射为非null结果,如果当前值为null则直接返回null + * @param mapper 映射函数,可能返回null + * @return 包含映射后结果的Pipeline实例 + */ + fun mapNotNull(mapper: P1RFunction): Pipeline = + if (value != null) Pipeline(mapper.call(value)!!) else Pipeline(null) - /** - * 将当前值强制转换为指定类型 - * @param type 目标类型Class对象 - * @return 包含转换后类型的Pipeline实例 - * @throws ClassCastException 当类型转换失败时抛出异常 - */ - @Throws(ClassCastException::class) - @Suppress("UNCHECKED_CAST") - fun cast(type: Class): Pipeline = Pipeline(value as E) + /** + * 将当前值强制转换为指定类型 + * @param type 目标类型Class对象 + * @return 包含转换后类型的Pipeline实例 + * @throws ClassCastException 当类型转换失败时抛出异常 + */ + @Throws(ClassCastException::class) + @Suppress("UNCHECKED_CAST") + fun cast(type: Class): Pipeline = Pipeline(value as E) - /** - * 根据条件判断是否保留当前值,条件满足时保留,否则返回null - * @param predicate 条件判断函数 - * @return 包含条件判断结果的Pipeline实例 - */ - fun takeIf(predicate: P1RFunction): Pipeline = Pipeline(if (predicate.call(value)) value else null) + /** + * 根据条件判断是否保留当前值,条件满足时保留,否则返回null + * @param predicate 条件判断函数 + * @return 包含条件判断结果的Pipeline实例 + */ + fun takeIf(predicate: P1RFunction): Pipeline = Pipeline(if (predicate.call(value)) value else null) - /** - * 根据条件判断是否保留当前值,条件不满足时保留,否则返回null - * @param predicate 条件判断函数 - * @return 包含条件判断结果的Pipeline实例 - */ - fun takeUnless(predicate: P1RFunction): Pipeline = - Pipeline(if (!predicate.call(value)) value else null) + /** + * 根据条件判断是否保留当前值,条件不满足时保留,否则返回null + * @param predicate 条件判断函数 + * @return 包含条件判断结果的Pipeline实例 + */ + fun takeUnless(predicate: P1RFunction): Pipeline = + Pipeline(if (!predicate.call(value)) value else null) - /** - * 在当前值上执行指定操作并返回操作结果 - * @param block 执行函数,接收当前值并返回结果 - * @return 包含执行结果的Pipeline实例 - */ - fun let(block: P1RFunction): Pipeline = Pipeline(block.call(value)) + /** + * 在当前值上执行指定操作并返回操作结果 + * @param block 执行函数,接收当前值并返回结果 + * @return 包含执行结果的Pipeline实例 + */ + fun let(block: P1RFunction): Pipeline = Pipeline(block.call(value)) - /** - * 如果当前值不为null则返回自身,否则返回默认值的Pipeline实例 - * @param defaultValue 默认值 - * @return 当前值或默认值的Pipeline实例 - */ - fun orElse(defaultValue: T): Pipeline = if (value != null) this else Pipeline(defaultValue) + /** + * 如果当前值不为null则返回自身,否则返回默认值的Pipeline实例 + * @param defaultValue 默认值 + * @return 当前值或默认值的Pipeline实例 + */ + fun orElse(defaultValue: T): Pipeline = if (value != null) this else Pipeline(defaultValue) - /** - * 如果当前值不为null则返回自身,否则通过供应商函数获取默认值 - * @param supplier 默认值供应商函数 - * @return 当前值或供应商提供的值的Pipeline实例 - */ - fun orElseGet(supplier: RFunction): Pipeline = if (value != null) this else Pipeline(supplier.call()) + /** + * 如果当前值不为null则返回自身,否则通过供应商函数获取默认值 + * @param supplier 默认值供应商函数 + * @return 当前值或供应商提供的值的Pipeline实例 + */ + fun orElseGet(supplier: RFunction): Pipeline = if (value != null) this else Pipeline(supplier.call()) - /** - * 验证当前值是否等于指定值,如果不相等则抛出异常 - * @param any 比较的目标值 - * @param message 错误消息 - * @param exception 异常类型,默认为IllegalArgumentException - * @return 当前Pipeline实例 - */ - fun require( - any: Any, message: String, exception: Class = IllegalArgumentException::class.java, - ): Pipeline { - requireTrue(any == value, exception, message) - return this - } + /** + * 验证当前值是否等于指定值,如果不相等则抛出异常 + * @param any 比较的目标值 + * @param message 错误消息 + * @param exception 异常类型,默认为IllegalArgumentException + * @return 当前Pipeline实例 + */ + fun require( + any: Any, message: String, exception: Class = IllegalArgumentException::class.java, + ): Pipeline { + requireTrue(any == value, exception, message) + return this + } - /** - * 验证当前值是否等于指定值,如果不相等则抛出IllegalArgumentException异常 - * @param any 比较的目标值 - * @param message 错误消息 - * @return 当前Pipeline实例 - */ - fun require( - any: Any, message: String, - ): Pipeline { - requireTrue(any == value, message) - return this - } + /** + * 验证当前值是否等于指定值,如果不相等则抛出IllegalArgumentException异常 + * @param any 比较的目标值 + * @param message 错误消息 + * @return 当前Pipeline实例 + */ + fun require( + any: Any, message: String, + ): Pipeline { + requireTrue(any == value, message) + return this + } - /** - * 使用P1RFunction验证当前值是否满足条件,不满足则抛出异常 - * @param must 验证条件函数 - * @param message 错误消息 - * @param exception 异常类型,默认为IllegalArgumentException - * @return 当前Pipeline实例 - */ - fun require( - must: P1RFunction, - message: String, - exception: Class = IllegalArgumentException::class.java, - ): Pipeline { - requireTrue(must.call(value), exception, message) - return this - } + /** + * 使用P1RFunction验证当前值是否满足条件,不满足则抛出异常 + * @param must 验证条件函数 + * @param message 错误消息 + * @param exception 异常类型,默认为IllegalArgumentException + * @return 当前Pipeline实例 + */ + fun require( + must: P1RFunction, + message: String, + exception: Class = IllegalArgumentException::class.java, + ): Pipeline { + requireTrue(must.call(value), exception, message) + return this + } - /** - * 验证当前值是否等于指定值,如果不相等则抛出异常 - * @param any 比较的目标值 - * @param message 错误消息 - * @param exception 异常类型,默认为IllegalArgumentException - * @return 当前Pipeline实例 - */ - fun require( - any: Any, - message: String, - exception: KClass = IllegalArgumentException::class, - ): Pipeline { - requireTrue(any == value, exception.java, message) - return this - } + /** + * 验证当前值是否等于指定值,如果不相等则抛出异常 + * @param any 比较的目标值 + * @param message 错误消息 + * @param exception 异常类型,默认为IllegalArgumentException + * @return 当前Pipeline实例 + */ + fun require( + any: Any, + message: String, + exception: KClass = IllegalArgumentException::class, + ): Pipeline { + requireTrue(any == value, exception.java, message) + return this + } - /** - * 使用P1RFunction验证当前值是否满足条件,不满足则抛出异常 - * @param must 验证条件函数 - * @param message 错误消息 - * @param exception 异常类型,默认为IllegalArgumentException - * @return 当前Pipeline实例 - */ - fun require( - must: (T) -> Boolean, - message: String, - exception: KClass = IllegalArgumentException::class, - ): Pipeline { - requireTrue(must(value), exception.java, message) - return this - } + /** + * 使用P1RFunction验证当前值是否满足条件,不满足则抛出异常 + * @param must 验证条件函数 + * @param message 错误消息 + * @param exception 异常类型,默认为IllegalArgumentException + * @return 当前Pipeline实例 + */ + fun require( + must: (T) -> Boolean, + message: String, + exception: KClass = IllegalArgumentException::class, + ): Pipeline { + requireTrue(must(value), exception.java, message) + return this + } - /** - * 使用P1RFunction验证当前值是否满足条件,不满足则抛出IllegalArgumentException异常 - * @param must 验证条件函数 - * @param message 错误消息 - * @return 当前Pipeline实例 - */ - fun require( - must: P1RFunction, message: String, - ): Pipeline { - requireTrue(must.call(value), message) - return this - } + /** + * 使用P1RFunction验证当前值是否满足条件,不满足则抛出IllegalArgumentException异常 + * @param must 验证条件函数 + * @param message 错误消息 + * @return 当前Pipeline实例 + */ + fun require( + must: P1RFunction, message: String, + ): Pipeline { + requireTrue(must.call(value), message) + return this + } - /** - * 对当前值执行指定操作但不改变流水线状态 - * @param block 执行函数,接收当前值 - * @return 当前Pipeline实例 - */ - fun also(block: P1Function): Pipeline { - block.call(value) - return this - } + /** + * 对当前值执行指定操作但不改变流水线状态 + * @param block 执行函数,接收当前值 + * @return 当前Pipeline实例 + */ + fun also(block: P1Function): Pipeline { + block.call(value) + return this + } - /** - * 验证当前值是否满足指定条件,不满足则抛出IllegalArgumentException异常 - * @param predicate 验证条件函数 - * @param lazyMessage 延迟错误消息生成函数,默认返回"Requirement failed" - * @return 当前Pipeline实例 - */ - fun require( - predicate: P1RFunction, - lazyMessage: P1RFunction = P1RFunction { "Requirement failed" }, - ): Pipeline { - if (!predicate.call(value)) { - throw IllegalArgumentException(lazyMessage.call(value).toString()) - } - return this - } + /** + * 验证当前值是否满足指定条件,不满足则抛出IllegalArgumentException异常 + * @param predicate 验证条件函数 + * @param lazyMessage 延迟错误消息生成函数,默认返回"Requirement failed" + * @return 当前Pipeline实例 + */ + fun require( + predicate: P1RFunction, + lazyMessage: P1RFunction = P1RFunction { "Requirement failed" }, + ): Pipeline { + if (!predicate.call(value)) { + throw IllegalArgumentException(lazyMessage.call(value).toString()) + } + return this + } - /** - * 使用比较器比较当前值与另一个值 - * @param other 另一个比较值 - * @param comparator 比较器 - * @return 比较结果,负数表示小于,0表示相等,正数表示大于 - */ - fun compareWith(other: T, comparator: Comparator): Int = comparator.compare(value, other) + /** + * 使用比较器比较当前值与另一个值 + * @param other 另一个比较值 + * @param comparator 比较器 + * @return 比较结果,负数表示小于,0表示相等,正数表示大于 + */ + fun compareWith(other: T, comparator: Comparator): Int = comparator.compare(value, other) - /** - * 使用选择器将当前值转换为可比较类型后与另一个值比较 - * @param other 另一个比较值 - * @param selector 选择器函数,将当前值转换为可比较类型 - * @return 比较结果 - */ - fun > compareTo(other: R, selector: P1RFunction): Int = - selector.call(value).compareTo(other) + /** + * 使用选择器将当前值转换为可比较类型后与另一个值比较 + * @param other 另一个比较值 + * @param selector 选择器函数,将当前值转换为可比较类型 + * @return 比较结果 + */ + fun > compareTo(other: R, selector: P1RFunction): Int = + selector.call(value).compareTo(other) - companion object { - /** - * 创建包含指定值的Pipeline实例 - * @param value 要包装的值 - * @return 新的Pipeline实例 - */ - @JvmStatic - fun of(value: T): Pipeline = Pipeline(value) + companion object { + /** + * 创建包含指定值的Pipeline实例 + * @param value 要包装的值 + * @return 新的Pipeline实例 + */ + @JvmStatic + fun of(value: T): Pipeline = Pipeline(value) - /** - * 通过供应商函数创建Pipeline实例 - * @param transformer 值供应商函数 - * @return 新的Pipeline实例 - */ - @JvmStatic - fun of(transformer: RFunction): Pipeline = Pipeline(transformer.call()) - } + /** + * 通过供应商函数创建Pipeline实例 + * @param transformer 值供应商函数 + * @return 新的Pipeline实例 + */ + @JvmStatic + fun of(transformer: RFunction): Pipeline = Pipeline(transformer.call()) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/hash/HashUtils.kt b/src/main/kotlin/com/mingliqiye/utils/hash/HashUtils.kt index 177e319..2fa5c26 100644 --- a/src/main/kotlin/com/mingliqiye/utils/hash/HashUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/hash/HashUtils.kt @@ -44,24 +44,24 @@ import java.security.NoSuchAlgorithmException */ @Throws(IOException::class, NoSuchAlgorithmException::class) fun calculateFileHash(file: File, algorithm: String): String { - // 检查文件是否存在 - if (!file.exists()) { - throw IOException("File not found: " + file.absolutePath) - } + // 检查文件是否存在 + if (!file.exists()) { + throw IOException("File not found: " + file.absolutePath) + } - val digest = MessageDigest.getInstance(algorithm) + val digest = MessageDigest.getInstance(algorithm) - FileInputStream(file).use { fis -> - val buffer = ByteArray(8192) - var bytesRead: Int + FileInputStream(file).use { fis -> + val buffer = ByteArray(8192) + var bytesRead: Int - // 分块读取文件内容并更新摘要 - while (fis.read(buffer).also { bytesRead = it } != -1) { - digest.update(buffer, 0, bytesRead) - } - } + // 分块读取文件内容并更新摘要 + while (fis.read(buffer).also { bytesRead = it } != -1) { + digest.update(buffer, 0, bytesRead) + } + } - return bytesToHex(digest.digest()) + return bytesToHex(digest.digest()) } /** @@ -71,7 +71,7 @@ fun calculateFileHash(file: File, algorithm: String): String { * @return 加密后的 BCrypt 哈希字符串 */ fun bcrypt(string: String): String { - return hashpw(string) + return hashpw(string) } /** @@ -82,5 +82,5 @@ fun bcrypt(string: String): String { * @return 如果匹配返回 true,否则返回 false */ fun checkBcrypt(string: String, bcrypted: String): Boolean { - return checkpw(string, bcrypted) + return checkpw(string, bcrypted) } diff --git a/src/main/kotlin/com/mingliqiye/utils/http/BaseResponse.kt b/src/main/kotlin/com/mingliqiye/utils/http/BaseResponse.kt index aea9438..7780544 100644 --- a/src/main/kotlin/com/mingliqiye/utils/http/BaseResponse.kt +++ b/src/main/kotlin/com/mingliqiye/utils/http/BaseResponse.kt @@ -23,20 +23,20 @@ package com.mingliqiye.utils.http open class BaseResponse( - open val time: String, - open var message: String, - open var data: T, - open var statusCode: Int, + open val time: String, + open var message: String, + open var data: T, + open var statusCode: Int, - ) { - /** - * 返回响应对象的字符串表示 - * - * 重写toString方法以提供更有意义的对象表示,便于日志记录和调试。 - * 显示时间、消息、数据类型和值以及状态码。 - * - * @return 格式化的字符串表示 - */ - override fun toString(): String = - "${javaClass.simpleName}(time=${time}, message=${message}, data=${data}, statusCode=${statusCode})" + ) { + /** + * 返回响应对象的字符串表示 + * + * 重写toString方法以提供更有意义的对象表示,便于日志记录和调试。 + * 显示时间、消息、数据类型和值以及状态码。 + * + * @return 格式化的字符串表示 + */ + override fun toString(): String = + "${javaClass.simpleName}(time=${time}, message=${message}, data=${data}, statusCode=${statusCode})" } diff --git a/src/main/kotlin/com/mingliqiye/utils/http/MediaType.kt b/src/main/kotlin/com/mingliqiye/utils/http/MediaType.kt index ca1fd40..cb97d1c 100644 --- a/src/main/kotlin/com/mingliqiye/utils/http/MediaType.kt +++ b/src/main/kotlin/com/mingliqiye/utils/http/MediaType.kt @@ -23,2256 +23,2256 @@ package com.mingliqiye.utils.http enum class MediaType(val value: String) { - APPLICATION_1D_INTERLEAVED_PARITYFEC("application/1d-interleaved-parityfec"), - APPLICATION_3GPDASH_QOE_REPORT_XML("application/3gpdash-qoe-report+xml"), - APPLICATION_3GPP_IMS_XML("application/3gpp-ims+xml"), - APPLICATION_3GPP_MBS_OBJECT_MANIFEST_JSON("application/3gpp-mbs-object-manifest+json"), - APPLICATION_3GPP_MBS_USER_SERVICE_DESCRIPTIONS_JSON("application/3gpp-mbs-user-service-descriptions+json"), - APPLICATION_3GPP_MEDIA_DELIVERY_METRICS_REPORT_JSON("application/3gpp-media-delivery-metrics-report+json"), - APPLICATION_3GPPHAL_JSON("application/3gppHal+json"), - APPLICATION_3GPPHALFORMS_JSON("application/3gppHalForms+json"), - APPLICATION_AAS_ZIP("application/aas+zip"), - APPLICATION_A2L("application/A2L"), - APPLICATION_ACE_GROUPCOMM_CBOR("application/ace-groupcomm+cbor"), - APPLICATION_ACE_TRL_CBOR("application/ace-trl+cbor"), - APPLICATION_ACE_CBOR("application/ace+cbor"), - APPLICATION_ACE_JSON("application/ace+json"), - APPLICATION_ACTIVEMESSAGE("application/activemessage"), - APPLICATION_ACTIVITY_JSON("application/activity+json"), - APPLICATION_AIF_CBOR("application/aif+cbor"), - APPLICATION_AIF_JSON("application/aif+json"), - APPLICATION_ALTO_CDNI_JSON("application/alto-cdni+json"), - APPLICATION_ALTO_CDNIFILTER_JSON("application/alto-cdnifilter+json"), - APPLICATION_ALTO_COSTMAP_JSON("application/alto-costmap+json"), - APPLICATION_ALTO_COSTMAPFILTER_JSON("application/alto-costmapfilter+json"), - APPLICATION_ALTO_DIRECTORY_JSON("application/alto-directory+json"), - APPLICATION_ALTO_ENDPOINTPROP_JSON("application/alto-endpointprop+json"), - APPLICATION_ALTO_ENDPOINTPROPPARAMS_JSON("application/alto-endpointpropparams+json"), - APPLICATION_ALTO_ENDPOINTCOST_JSON("application/alto-endpointcost+json"), - APPLICATION_ALTO_ENDPOINTCOSTPARAMS_JSON("application/alto-endpointcostparams+json"), - APPLICATION_ALTO_ERROR_JSON("application/alto-error+json"), - APPLICATION_ALTO_NETWORKMAPFILTER_JSON("application/alto-networkmapfilter+json"), - APPLICATION_ALTO_NETWORKMAP_JSON("application/alto-networkmap+json"), - APPLICATION_ALTO_PROPMAP_JSON("application/alto-propmap+json"), - APPLICATION_ALTO_PROPMAPPARAMS_JSON("application/alto-propmapparams+json"), - APPLICATION_ALTO_TIPS_JSON("application/alto-tips+json"), - APPLICATION_ALTO_TIPSPARAMS_JSON("application/alto-tipsparams+json"), - APPLICATION_ALTO_UPDATESTREAMCONTROL_JSON("application/alto-updatestreamcontrol+json"), - APPLICATION_ALTO_UPDATESTREAMPARAMS_JSON("application/alto-updatestreamparams+json"), - APPLICATION_AML("application/AML"), - APPLICATION_ANDREW_INSET("application/andrew-inset"), - APPLICATION_APPLEFILE("application/applefile"), - APPLICATION_ASYNCAPI_JSON("application/asyncapi+json"), - APPLICATION_ASYNCAPI_YAML("application/asyncapi+yaml"), - APPLICATION_AT_JWT("application/at+jwt"), - APPLICATION_ATF("application/ATF"), - APPLICATION_ATFX("application/ATFX"), - APPLICATION_ATOM_XML("application/atom+xml"), - APPLICATION_ATOMCAT_XML("application/atomcat+xml"), - APPLICATION_ATOMDELETED_XML("application/atomdeleted+xml"), - APPLICATION_ATOMICMAIL("application/atomicmail"), - APPLICATION_ATOMSVC_XML("application/atomsvc+xml"), - APPLICATION_ATSC_DWD_XML("application/atsc-dwd+xml"), - APPLICATION_ATSC_DYNAMIC_EVENT_MESSAGE("application/atsc-dynamic-event-message"), - APPLICATION_ATSC_HELD_XML("application/atsc-held+xml"), - APPLICATION_ATSC_RDT_JSON("application/atsc-rdt+json"), - APPLICATION_ATSC_RSAT_XML("application/atsc-rsat+xml"), - APPLICATION_ATXML("application/ATXML"), - APPLICATION_AUTH_POLICY_XML("application/auth-policy+xml"), - APPLICATION_AUTOMATIONML_AML_XML("application/automationml-aml+xml"), - APPLICATION_AUTOMATIONML_AMLX_ZIP("application/automationml-amlx+zip"), - APPLICATION_BACNET_XDD_ZIP("application/bacnet-xdd+zip"), - APPLICATION_BATCH_SMTP("application/batch-SMTP"), - APPLICATION_BEEP_XML("application/beep+xml"), - APPLICATION_BUFR("application/bufr"), - APPLICATION_C2PA("application/c2pa"), - APPLICATION_CALENDAR_JSON("application/calendar+json"), - APPLICATION_CALENDAR_XML("application/calendar+xml"), - APPLICATION_CALL_COMPLETION("application/call-completion"), - APPLICATION_CALS_1840("application/CALS-1840"), - APPLICATION_CAPTIVE_JSON("application/captive+json"), - APPLICATION_CBOR("application/cbor"), - APPLICATION_CBOR_SEQ("application/cbor-seq"), - APPLICATION_CCCEX("application/cccex"), - APPLICATION_CCMP_XML("application/ccmp+xml"), - APPLICATION_CCXML_XML("application/ccxml+xml"), - APPLICATION_CDA_XML("application/cda+xml"), - APPLICATION_CDFX_XML("application/CDFX+XML"), - APPLICATION_CDMI_CAPABILITY("application/cdmi-capability"), - APPLICATION_CDMI_CONTAINER("application/cdmi-container"), - APPLICATION_CDMI_DOMAIN("application/cdmi-domain"), - APPLICATION_CDMI_OBJECT("application/cdmi-object"), - APPLICATION_CDMI_QUEUE("application/cdmi-queue"), - APPLICATION_CDNI("application/cdni"), - APPLICATION_CE_CBOR("application/ce+cbor"), - APPLICATION_CEA("application/CEA"), - APPLICATION_CEA_2018_XML("application/cea-2018+xml"), - APPLICATION_CELLML_XML("application/cellml+xml"), - APPLICATION_CFW("application/cfw"), - APPLICATION_CID("application/cid"), - APPLICATION_CID_EDHOC_CBOR_SEQ("application/cid-edhoc+cbor-seq"), - APPLICATION_CITY_JSON("application/city+json"), - APPLICATION_CITY_JSON_SEQ("application/city+json-seq"), - APPLICATION_CLR("application/clr"), - APPLICATION_CLUE_INFO_XML("application/clue_info+xml"), - APPLICATION_CLUE_XML("application/clue+xml"), - APPLICATION_CMS("application/cms"), - APPLICATION_CMW_CBOR("application/cmw+cbor"), - APPLICATION_CMW_COSE("application/cmw+cose"), - APPLICATION_CMW_JSON("application/cmw+json"), - APPLICATION_CMW_JWS("application/cmw+jws"), - APPLICATION_CNRP_XML("application/cnrp+xml"), - APPLICATION_COAP_EAP("application/coap-eap"), - APPLICATION_COAP_GROUP_JSON("application/coap-group+json"), - APPLICATION_COAP_PAYLOAD("application/coap-payload"), - APPLICATION_COMMONGROUND("application/commonground"), - APPLICATION_CONCISE_PROBLEM_DETAILS_CBOR("application/concise-problem-details+cbor"), - APPLICATION_CONFERENCE_INFO_XML("application/conference-info+xml"), - APPLICATION_CPL_XML("application/cpl+xml"), - APPLICATION_COSE("application/cose"), - APPLICATION_COSE_KEY("application/cose-key"), - APPLICATION_COSE_KEY_SET("application/cose-key-set"), - APPLICATION_COSE_X509("application/cose-x509"), - APPLICATION_CSRATTRS("application/csrattrs"), - APPLICATION_CSTA_XML("application/csta+xml"), - APPLICATION_CSTADATA_XML("application/CSTAdata+xml"), - APPLICATION_CSVM_JSON("application/csvm+json"), - APPLICATION_CWL("application/cwl"), - APPLICATION_CWL_JSON("application/cwl+json"), - APPLICATION_CWL_YAML("application/cwl+yaml"), - APPLICATION_CWT("application/cwt"), - APPLICATION_CYBERCASH("application/cybercash"), - APPLICATION_DASH_XML("application/dash+xml"), - APPLICATION_DASH_PATCH_XML("application/dash-patch+xml"), - APPLICATION_DASHDELTA("application/dashdelta"), - APPLICATION_DAVMOUNT_XML("application/davmount+xml"), - APPLICATION_DCA_RFT("application/dca-rft"), - APPLICATION_DCD("application/DCD"), - APPLICATION_DEC_DX("application/dec-dx"), - APPLICATION_DIALOG_INFO_XML("application/dialog-info+xml"), - APPLICATION_DICOM("application/dicom"), - APPLICATION_DICOM_JSON("application/dicom+json"), - APPLICATION_DICOM_XML("application/dicom+xml"), - APPLICATION_DID("application/did"), - APPLICATION_DII("application/DII"), - APPLICATION_DIT("application/DIT"), - APPLICATION_DNS("application/dns"), - APPLICATION_DNS_JSON("application/dns+json"), - APPLICATION_DNS_MESSAGE("application/dns-message"), - APPLICATION_DOTS_CBOR("application/dots+cbor"), - APPLICATION_DPOP_JWT("application/dpop+jwt"), - APPLICATION_DSKPP_XML("application/dskpp+xml"), - APPLICATION_DSSC_DER("application/dssc+der"), - APPLICATION_DSSC_XML("application/dssc+xml"), - APPLICATION_DVCS("application/dvcs"), - APPLICATION_EAT_CWT("application/eat+cwt"), - APPLICATION_EAT_JWT("application/eat+jwt"), - APPLICATION_EAT_BUN_CBOR("application/eat-bun+cbor"), - APPLICATION_EAT_BUN_JSON("application/eat-bun+json"), - APPLICATION_EAT_UCS_CBOR("application/eat-ucs+cbor"), - APPLICATION_EAT_UCS_JSON("application/eat-ucs+json"), - APPLICATION_ECMASCRIPT("application/ecmascript"), - APPLICATION_EDHOC_CBOR_SEQ("application/edhoc+cbor-seq"), - APPLICATION_EDI_CONSENT("application/EDI-consent"), - APPLICATION_EDIFACT("application/EDIFACT"), - APPLICATION_EDI_X12("application/EDI-X12"), - APPLICATION_EFI("application/efi"), - APPLICATION_ELM_JSON("application/elm+json"), - APPLICATION_ELM_XML("application/elm+xml"), - APPLICATION_EMERGENCYCALLDATA_CAP_XML("application/EmergencyCallData.cap+xml"), - APPLICATION_EMERGENCYCALLDATA_COMMENT_XML("application/EmergencyCallData.Comment+xml"), - APPLICATION_EMERGENCYCALLDATA_CONTROL_XML("application/EmergencyCallData.Control+xml"), - APPLICATION_EMERGENCYCALLDATA_DEVICEINFO_XML("application/EmergencyCallData.DeviceInfo+xml"), - APPLICATION_EMERGENCYCALLDATA_ECALL_MSD("application/EmergencyCallData.eCall.MSD"), - APPLICATION_EMERGENCYCALLDATA_LEGACYESN_JSON("application/EmergencyCallData.LegacyESN+json"), - APPLICATION_EMERGENCYCALLDATA_PROVIDERINFO_XML("application/EmergencyCallData.ProviderInfo+xml"), - APPLICATION_EMERGENCYCALLDATA_SERVICEINFO_XML("application/EmergencyCallData.ServiceInfo+xml"), - APPLICATION_EMERGENCYCALLDATA_SUBSCRIBERINFO_XML("application/EmergencyCallData.SubscriberInfo+xml"), - APPLICATION_EMERGENCYCALLDATA_VEDS_XML("application/EmergencyCallData.VEDS+xml"), - APPLICATION_EMMA_XML("application/emma+xml"), - APPLICATION_EMOTIONML_XML("application/emotionml+xml"), - APPLICATION_ENCAPRTP("application/encaprtp"), - APPLICATION_ENTITY_STATEMENT_JWT("application/entity-statement+jwt"), - APPLICATION_EPP_XML("application/epp+xml"), - APPLICATION_EPUB_ZIP("application/epub+zip"), - APPLICATION_ESHOP("application/eshop"), - APPLICATION_EXAMPLE("application/example"), - APPLICATION_EXI("application/exi"), - APPLICATION_EXPECT_CT_REPORT_JSON("application/expect-ct-report+json"), - APPLICATION_EXPLICIT_REGISTRATION_RESPONSE_JWT("application/explicit-registration-response+jwt"), - APPLICATION_EXPRESS("application/express"), - APPLICATION_FASTINFOSET("application/fastinfoset"), - APPLICATION_FASTSOAP("application/fastsoap"), - APPLICATION_FDF("application/fdf"), - APPLICATION_FDT_XML("application/fdt+xml"), - APPLICATION_FHIR_JSON("application/fhir+json"), - APPLICATION_FHIR_XML("application/fhir+xml"), - APPLICATION_FITS("application/fits"), - APPLICATION_FLEXFEC("application/flexfec"), - APPLICATION_FONT_SFNT("application/font-sfnt"), - APPLICATION_FONT_TDPFR("application/font-tdpfr"), - APPLICATION_FONT_WOFF("application/font-woff"), - APPLICATION_FRAMEWORK_ATTRIBUTES_XML("application/framework-attributes+xml"), - APPLICATION_GEO_JSON("application/geo+json"), - APPLICATION_GEO_JSON_SEQ("application/geo+json-seq"), - APPLICATION_GEOFEED_CSV("application/geofeed+csv"), - APPLICATION_GEOPACKAGE_SQLITE3("application/geopackage+sqlite3"), - APPLICATION_GEOPOSE_JSON("application/geopose+json"), - APPLICATION_GEOXACML_JSON("application/geoxacml+json"), - APPLICATION_GEOXACML_XML("application/geoxacml+xml"), - APPLICATION_GLTF_BUFFER("application/gltf-buffer"), - APPLICATION_GML_XML("application/gml+xml"), - APPLICATION_GNAP_BINDING_JWS("application/gnap-binding-jws"), - APPLICATION_GNAP_BINDING_JWSD("application/gnap-binding-jwsd"), - APPLICATION_GNAP_BINDING_ROTATION_JWS("application/gnap-binding-rotation-jws"), - APPLICATION_GNAP_BINDING_ROTATION_JWSD("application/gnap-binding-rotation-jwsd"), - APPLICATION_GRIB("application/grib"), - APPLICATION_GZIP("application/gzip"), - APPLICATION_H224("application/H224"), - APPLICATION_HELD_XML("application/held+xml"), - APPLICATION_HL7V2_XML("application/hl7v2+xml"), - APPLICATION_HTTP("application/http"), - APPLICATION_HYPERSTUDIO("application/hyperstudio"), - APPLICATION_IBE_KEY_REQUEST_XML("application/ibe-key-request+xml"), - APPLICATION_IBE_PKG_REPLY_XML("application/ibe-pkg-reply+xml"), - APPLICATION_IBE_PP_DATA("application/ibe-pp-data"), - APPLICATION_IGES("application/iges"), - APPLICATION_IM_ISCOMPOSING_XML("application/im-iscomposing+xml"), - APPLICATION_INDEX("application/index"), - APPLICATION_INDEX_CMD("application/index.cmd"), - APPLICATION_INDEX_OBJ("application/index.obj"), - APPLICATION_INDEX_RESPONSE("application/index.response"), - APPLICATION_INDEX_VND("application/index.vnd"), - APPLICATION_INKML_XML("application/inkml+xml"), - APPLICATION_IOTP("application/IOTP"), - APPLICATION_IPFIX("application/ipfix"), - APPLICATION_IPP("application/ipp"), - APPLICATION_ISUP("application/ISUP"), - APPLICATION_ITS_XML("application/its+xml"), - APPLICATION_JAVA_ARCHIVE("application/java-archive"), - APPLICATION_JAVASCRIPT("application/javascript"), - APPLICATION_JF2FEED_JSON("application/jf2feed+json"), - APPLICATION_JOSE("application/jose"), - APPLICATION_JOSE_JSON("application/jose+json"), - APPLICATION_JRD_JSON("application/jrd+json"), - APPLICATION_JSCALENDAR_JSON("application/jscalendar+json"), - APPLICATION_JSCONTACT_JSON("application/jscontact+json"), - APPLICATION_JSON("application/json"), - APPLICATION_JSON_PATCH_JSON("application/json-patch+json"), - APPLICATION_JSON_PATCH_QUERY_JSON("application/json-patch-query+json"), - APPLICATION_JSON_SEQ("application/json-seq"), - APPLICATION_JSONPATH("application/jsonpath"), - APPLICATION_JWK_JSON("application/jwk+json"), - APPLICATION_JWK_SET_JSON("application/jwk-set+json"), - APPLICATION_JWK_SET_JWT("application/jwk-set+jwt"), - APPLICATION_JWT("application/jwt"), - APPLICATION_KB_JWT("application/kb+jwt"), - APPLICATION_KBL_XML("application/kbl+xml"), - APPLICATION_KPML_REQUEST_XML("application/kpml-request+xml"), - APPLICATION_KPML_RESPONSE_XML("application/kpml-response+xml"), - APPLICATION_LD_JSON("application/ld+json"), - APPLICATION_LGR_XML("application/lgr+xml"), - APPLICATION_LINK_FORMAT("application/link-format"), - APPLICATION_LINKSET("application/linkset"), - APPLICATION_LINKSET_JSON("application/linkset+json"), - APPLICATION_LOAD_CONTROL_XML("application/load-control+xml"), - APPLICATION_LOGOUT_JWT("application/logout+jwt"), - APPLICATION_LOST_XML("application/lost+xml"), - APPLICATION_LOSTSYNC_XML("application/lostsync+xml"), - APPLICATION_LPF_ZIP("application/lpf+zip"), - APPLICATION_LXF("application/LXF"), - APPLICATION_MAC_BINHEX40("application/mac-binhex40"), - APPLICATION_MACWRITEII("application/macwriteii"), - APPLICATION_MADS_XML("application/mads+xml"), - APPLICATION_MANIFEST_JSON("application/manifest+json"), - APPLICATION_MARC("application/marc"), - APPLICATION_MARCXML_XML("application/marcxml+xml"), - APPLICATION_MATHEMATICA("application/mathematica"), - APPLICATION_MATHML_XML("application/mathml+xml"), - APPLICATION_MATHML_CONTENT_XML("application/mathml-content+xml"), - APPLICATION_MATHML_PRESENTATION_XML("application/mathml-presentation+xml"), - APPLICATION_MBMS_ASSOCIATED_PROCEDURE_DESCRIPTION_XML("application/mbms-associated-procedure-description+xml"), - APPLICATION_MBMS_DEREGISTER_XML("application/mbms-deregister+xml"), - APPLICATION_MBMS_ENVELOPE_XML("application/mbms-envelope+xml"), - APPLICATION_MBMS_MSK_RESPONSE_XML("application/mbms-msk-response+xml"), - APPLICATION_MBMS_MSK_XML("application/mbms-msk+xml"), - APPLICATION_MBMS_PROTECTION_DESCRIPTION_XML("application/mbms-protection-description+xml"), - APPLICATION_MBMS_RECEPTION_REPORT_XML("application/mbms-reception-report+xml"), - APPLICATION_MBMS_REGISTER_RESPONSE_XML("application/mbms-register-response+xml"), - APPLICATION_MBMS_REGISTER_XML("application/mbms-register+xml"), - APPLICATION_MBMS_SCHEDULE_XML("application/mbms-schedule+xml"), - APPLICATION_MBMS_USER_SERVICE_DESCRIPTION_XML("application/mbms-user-service-description+xml"), - APPLICATION_MBOX("application/mbox"), - APPLICATION_MEDIA_CONTROL_XML("application/media_control+xml"), - APPLICATION_MEDIA_POLICY_DATASET_XML("application/media-policy-dataset+xml"), - APPLICATION_MEDIASERVERCONTROL_XML("application/mediaservercontrol+xml"), - APPLICATION_MERGE_PATCH_JSON("application/merge-patch+json"), - APPLICATION_METALINK4_XML("application/metalink4+xml"), - APPLICATION_METS_XML("application/mets+xml"), - APPLICATION_MF4("application/MF4"), - APPLICATION_MIKEY("application/mikey"), - APPLICATION_MIPC("application/mipc"), - APPLICATION_MISSING_BLOCKS_CBOR_SEQ("application/missing-blocks+cbor-seq"), - APPLICATION_MMT_AEI_XML("application/mmt-aei+xml"), - APPLICATION_MMT_USD_XML("application/mmt-usd+xml"), - APPLICATION_MODS_XML("application/mods+xml"), - APPLICATION_MOSS_KEYS("application/moss-keys"), - APPLICATION_MOSS_SIGNATURE("application/moss-signature"), - APPLICATION_MOSSKEY_DATA("application/mosskey-data"), - APPLICATION_MOSSKEY_REQUEST("application/mosskey-request"), - APPLICATION_MP21("application/mp21"), - APPLICATION_MP4("application/mp4"), - APPLICATION_MPEG4_GENERIC("application/mpeg4-generic"), - APPLICATION_MPEG4_IOD("application/mpeg4-iod"), - APPLICATION_MPEG4_IOD_XMT("application/mpeg4-iod-xmt"), - APPLICATION_MRB_CONSUMER_XML("application/mrb-consumer+xml"), - APPLICATION_MRB_PUBLISH_XML("application/mrb-publish+xml"), - APPLICATION_MSC_IVR_XML("application/msc-ivr+xml"), - APPLICATION_MSC_MIXER_XML("application/msc-mixer+xml"), - APPLICATION_MSWORD("application/msword"), - APPLICATION_MUD_JSON("application/mud+json"), - APPLICATION_MULTIPART_CORE("application/multipart-core"), - APPLICATION_MXF("application/mxf"), - APPLICATION_N_QUADS("application/n-quads"), - APPLICATION_N_TRIPLES("application/n-triples"), - APPLICATION_NASDATA("application/nasdata"), - APPLICATION_NEWS_CHECKGROUPS("application/news-checkgroups"), - APPLICATION_NEWS_GROUPINFO("application/news-groupinfo"), - APPLICATION_NEWS_TRANSMISSION("application/news-transmission"), - APPLICATION_NLSML_XML("application/nlsml+xml"), - APPLICATION_NODE("application/node"), - APPLICATION_NSS("application/nss"), - APPLICATION_OAUTH_AUTHZ_REQ_JWT("application/oauth-authz-req+jwt"), - APPLICATION_OBLIVIOUS_DNS_MESSAGE("application/oblivious-dns-message"), - APPLICATION_OCSP_REQUEST("application/ocsp-request"), - APPLICATION_OCSP_RESPONSE("application/ocsp-response"), - APPLICATION_OCTET_STREAM("application/octet-stream"), - APPLICATION_ODA("application/ODA"), - APPLICATION_ODM_XML("application/odm+xml"), - APPLICATION_ODX("application/ODX"), - APPLICATION_OEBPS_PACKAGE_XML("application/oebps-package+xml"), - APPLICATION_OGG("application/ogg"), - APPLICATION_OHTTP_KEYS("application/ohttp-keys"), - APPLICATION_OPC_NODESET_XML("application/opc-nodeset+xml"), - APPLICATION_OSCORE("application/oscore"), - APPLICATION_OXPS("application/oxps"), - APPLICATION_P21("application/p21"), - APPLICATION_P21_ZIP("application/p21+zip"), - APPLICATION_P2P_OVERLAY_XML("application/p2p-overlay+xml"), - APPLICATION_PARITYFEC("application/parityfec"), - APPLICATION_PASSPORT("application/passport"), - APPLICATION_PATCH_OPS_ERROR_XML("application/patch-ops-error+xml"), - APPLICATION_PDF("application/pdf"), - APPLICATION_PDX("application/PDX"), - APPLICATION_PEM_CERTIFICATE_CHAIN("application/pem-certificate-chain"), - APPLICATION_PGP_ENCRYPTED("application/pgp-encrypted"), - APPLICATION_PGP_KEYS("application/pgp-keys"), - APPLICATION_PGP_SIGNATURE("application/pgp-signature"), - APPLICATION_PIDF_DIFF_XML("application/pidf-diff+xml"), - APPLICATION_PIDF_XML("application/pidf+xml"), - APPLICATION_PKCS10("application/pkcs10"), - APPLICATION_PKCS7_MIME("application/pkcs7-mime"), - APPLICATION_PKCS7_SIGNATURE("application/pkcs7-signature"), - APPLICATION_PKCS8("application/pkcs8"), - APPLICATION_PKCS8_ENCRYPTED("application/pkcs8-encrypted"), - APPLICATION_PKCS12("application/pkcs12"), - APPLICATION_PKIX_ATTR_CERT("application/pkix-attr-cert"), - APPLICATION_PKIX_CERT("application/pkix-cert"), - APPLICATION_PKIX_CRL("application/pkix-crl"), - APPLICATION_PKIX_PKIPATH("application/pkix-pkipath"), - APPLICATION_PKIXCMP("application/pkixcmp"), - APPLICATION_PLS_XML("application/pls+xml"), - APPLICATION_POC_SETTINGS_XML("application/poc-settings+xml"), - APPLICATION_POSTSCRIPT("application/postscript"), - APPLICATION_PPSP_TRACKER_JSON("application/ppsp-tracker+json"), - APPLICATION_PRIVATE_TOKEN_ISSUER_DIRECTORY("application/private-token-issuer-directory"), - APPLICATION_PRIVATE_TOKEN_REQUEST("application/private-token-request"), - APPLICATION_PRIVATE_TOKEN_RESPONSE("application/private-token-response"), - APPLICATION_PROBLEM_JSON("application/problem+json"), - APPLICATION_PROBLEM_XML("application/problem+xml"), - APPLICATION_PROTOBUF("application/protobuf"), - APPLICATION_PROTOBUF_JSON("application/protobuf+json"), - APPLICATION_PROVENANCE_XML("application/provenance+xml"), - APPLICATION_PROVIDED_CLAIMS_JWT("application/provided-claims+jwt"), - APPLICATION_PRS_ALVESTRAND_TITRAX_SHEET("application/prs.alvestrand.titrax-sheet"), - APPLICATION_PRS_CWW("application/prs.cww"), - APPLICATION_PRS_CYN("application/prs.cyn"), - APPLICATION_PRS_HPUB_ZIP("application/prs.hpub+zip"), - APPLICATION_PRS_IMPLIED_DOCUMENT_XML("application/prs.implied-document+xml"), - APPLICATION_PRS_IMPLIED_EXECUTABLE("application/prs.implied-executable"), - APPLICATION_PRS_IMPLIED_OBJECT_JSON("application/prs.implied-object+json"), - APPLICATION_PRS_IMPLIED_OBJECT_JSON_SEQ("application/prs.implied-object+json-seq"), - APPLICATION_PRS_IMPLIED_OBJECT_YAML("application/prs.implied-object+yaml"), - APPLICATION_PRS_IMPLIED_STRUCTURE("application/prs.implied-structure"), - APPLICATION_PRS_MAYFILE("application/prs.mayfile"), - APPLICATION_PRS_NPREND("application/prs.nprend"), - APPLICATION_PRS_PLUCKER("application/prs.plucker"), - APPLICATION_PRS_RDF_XML_CRYPT("application/prs.rdf-xml-crypt"), - APPLICATION_PRS_SCLT("application/prs.sclt"), - APPLICATION_PRS_VCFBZIP2("application/prs.vcfbzip2"), - APPLICATION_PRS_XSF_XML("application/prs.xsf+xml"), - APPLICATION_PSKC_XML("application/pskc+xml"), - APPLICATION_PVD_JSON("application/pvd+json"), - APPLICATION_RDF_XML("application/rdf+xml"), - APPLICATION_ROUTE_APD_XML("application/route-apd+xml"), - APPLICATION_ROUTE_S_TSID_XML("application/route-s-tsid+xml"), - APPLICATION_ROUTE_USD_XML("application/route-usd+xml"), - APPLICATION_QSIG("application/QSIG"), - APPLICATION_RAPTORFEC("application/raptorfec"), - APPLICATION_RDAP_JSON("application/rdap+json"), - APPLICATION_REGINFO_XML("application/reginfo+xml"), - APPLICATION_RELAX_NG_COMPACT_SYNTAX("application/relax-ng-compact-syntax"), - APPLICATION_REMOTE_PRINTING("application/remote-printing"), - APPLICATION_REPUTON_JSON("application/reputon+json"), - APPLICATION_RESOLVE_RESPONSE_JWT("application/resolve-response+jwt"), - APPLICATION_RESOURCE_LISTS_DIFF_XML("application/resource-lists-diff+xml"), - APPLICATION_RESOURCE_LISTS_XML("application/resource-lists+xml"), - APPLICATION_RFC_XML("application/rfc+xml"), - APPLICATION_RISCOS("application/riscos"), - APPLICATION_RLMI_XML("application/rlmi+xml"), - APPLICATION_RLS_SERVICES_XML("application/rls-services+xml"), - APPLICATION_RPKI_CHECKLIST("application/rpki-checklist"), - APPLICATION_RPKI_GHOSTBUSTERS("application/rpki-ghostbusters"), - APPLICATION_RPKI_MANIFEST("application/rpki-manifest"), - APPLICATION_RPKI_PUBLICATION("application/rpki-publication"), - APPLICATION_RPKI_ROA("application/rpki-roa"), - APPLICATION_RPKI_SIGNED_TAL("application/rpki-signed-tal"), - APPLICATION_RPKI_UPDOWN("application/rpki-updown"), - APPLICATION_RS_METADATA_XML("application/rs-metadata+xml"), - APPLICATION_RTF("application/rtf"), - APPLICATION_RTPLOOPBACK("application/rtploopback"), - APPLICATION_RTX("application/rtx"), - APPLICATION_SAMLASSERTION_XML("application/samlassertion+xml"), - APPLICATION_SAMLMETADATA_XML("application/samlmetadata+xml"), - APPLICATION_SARIF_EXTERNAL_PROPERTIES_JSON("application/sarif-external-properties+json"), - APPLICATION_SARIF_JSON("application/sarif+json"), - APPLICATION_SBE("application/sbe"), - APPLICATION_SBML_XML("application/sbml+xml"), - APPLICATION_SCAIP_XML("application/scaip+xml"), - APPLICATION_SCIM_JSON("application/scim+json"), - APPLICATION_SCITT_RECEIPT_COSE("application/scitt-receipt+cose"), - APPLICATION_SCITT_STATEMENT_COSE("application/scitt-statement+cose"), - APPLICATION_SCVP_CV_REQUEST("application/scvp-cv-request"), - APPLICATION_SCVP_CV_RESPONSE("application/scvp-cv-response"), - APPLICATION_SCVP_VP_REQUEST("application/scvp-vp-request"), - APPLICATION_SCVP_VP_RESPONSE("application/scvp-vp-response"), - APPLICATION_SD_JWT("application/sd-jwt"), - APPLICATION_SD_JWT_JSON("application/sd-jwt+json"), - APPLICATION_SDF_JSON("application/sdf+json"), - APPLICATION_SDP("application/sdp"), - APPLICATION_SECEVENT_JWT("application/secevent+jwt"), - APPLICATION_SENML_ETCH_CBOR("application/senml-etch+cbor"), - APPLICATION_SENML_ETCH_JSON("application/senml-etch+json"), - APPLICATION_SENML_EXI("application/senml-exi"), - APPLICATION_SENML_CBOR("application/senml+cbor"), - APPLICATION_SENML_JSON("application/senml+json"), - APPLICATION_SENML_XML("application/senml+xml"), - APPLICATION_SENSML_EXI("application/sensml-exi"), - APPLICATION_SENSML_CBOR("application/sensml+cbor"), - APPLICATION_SENSML_JSON("application/sensml+json"), - APPLICATION_SENSML_XML("application/sensml+xml"), - APPLICATION_SEP_EXI("application/sep-exi"), - APPLICATION_SEP_XML("application/sep+xml"), - APPLICATION_SESSION_INFO("application/session-info"), - APPLICATION_SET_PAYMENT("application/set-payment"), - APPLICATION_SET_PAYMENT_INITIATION("application/set-payment-initiation"), - APPLICATION_SET_REGISTRATION("application/set-registration"), - APPLICATION_SET_REGISTRATION_INITIATION("application/set-registration-initiation"), - APPLICATION_SGML("application/SGML"), - APPLICATION_SGML_OPEN_CATALOG("application/sgml-open-catalog"), - APPLICATION_SHF_XML("application/shf+xml"), - APPLICATION_SIEVE("application/sieve"), - APPLICATION_SIMPLE_FILTER_XML("application/simple-filter+xml"), - APPLICATION_SIMPLE_MESSAGE_SUMMARY("application/simple-message-summary"), - APPLICATION_SIMPLESYMBOLCONTAINER("application/simpleSymbolContainer"), - APPLICATION_SIPC("application/sipc"), - APPLICATION_SLATE("application/slate"), - APPLICATION_SMIL("application/smil"), - APPLICATION_SMIL_XML("application/smil+xml"), - APPLICATION_SMPTE336M("application/smpte336m"), - APPLICATION_SOAP_FASTINFOSET("application/soap+fastinfoset"), - APPLICATION_SOAP_XML("application/soap+xml"), - APPLICATION_SPARQL_QUERY("application/sparql-query"), - APPLICATION_SPDX_JSON("application/spdx+json"), - APPLICATION_SPARQL_RESULTS_XML("application/sparql-results+xml"), - APPLICATION_SPIRITS_EVENT_XML("application/spirits-event+xml"), - APPLICATION_SQL("application/sql"), - APPLICATION_SRGS("application/srgs"), - APPLICATION_SRGS_XML("application/srgs+xml"), - APPLICATION_SRU_XML("application/sru+xml"), - APPLICATION_SSLKEYLOGFILE("application/sslkeylogfile"), - APPLICATION_SSML_XML("application/ssml+xml"), - APPLICATION_ST2110_41("application/ST2110-41"), - APPLICATION_STIX_JSON("application/stix+json"), - APPLICATION_STRATUM("application/stratum"), - APPLICATION_SUIT_ENVELOPE_COSE("application/suit-envelope+cose"), - APPLICATION_SUIT_REPORT_COSE("application/suit-report+cose"), - APPLICATION_SWID_CBOR("application/swid+cbor"), - APPLICATION_SWID_XML("application/swid+xml"), - APPLICATION_TAMP_APEX_UPDATE("application/tamp-apex-update"), - APPLICATION_TAMP_APEX_UPDATE_CONFIRM("application/tamp-apex-update-confirm"), - APPLICATION_TAMP_COMMUNITY_UPDATE("application/tamp-community-update"), - APPLICATION_TAMP_COMMUNITY_UPDATE_CONFIRM("application/tamp-community-update-confirm"), - APPLICATION_TAMP_ERROR("application/tamp-error"), - APPLICATION_TAMP_SEQUENCE_ADJUST("application/tamp-sequence-adjust"), - APPLICATION_TAMP_SEQUENCE_ADJUST_CONFIRM("application/tamp-sequence-adjust-confirm"), - APPLICATION_TAMP_STATUS_QUERY("application/tamp-status-query"), - APPLICATION_TAMP_STATUS_RESPONSE("application/tamp-status-response"), - APPLICATION_TAMP_UPDATE("application/tamp-update"), - APPLICATION_TAMP_UPDATE_CONFIRM("application/tamp-update-confirm"), - APPLICATION_TAXII_JSON("application/taxii+json"), - APPLICATION_TD_JSON("application/td+json"), - APPLICATION_TEI_XML("application/tei+xml"), - APPLICATION_TETRA_ISI("application/TETRA_ISI"), - APPLICATION_TEXINFO("application/texinfo"), - APPLICATION_THRAUD_XML("application/thraud+xml"), - APPLICATION_TIMESTAMP_QUERY("application/timestamp-query"), - APPLICATION_TIMESTAMP_REPLY("application/timestamp-reply"), - APPLICATION_TIMESTAMPED_DATA("application/timestamped-data"), - APPLICATION_TLSRPT_GZIP("application/tlsrpt+gzip"), - APPLICATION_TLSRPT_JSON("application/tlsrpt+json"), - APPLICATION_TM_JSON("application/tm+json"), - APPLICATION_TNAUTHLIST("application/tnauthlist"), - APPLICATION_TOC_CBOR("application/toc+cbor"), - APPLICATION_TOKEN_INTROSPECTION_JWT("application/token-introspection+jwt"), - APPLICATION_TOML("application/toml"), - APPLICATION_TRICKLE_ICE_SDPFRAG("application/trickle-ice-sdpfrag"), - APPLICATION_TRIG("application/trig"), - APPLICATION_TRUST_CHAIN_JSON("application/trust-chain+json"), - APPLICATION_TRUST_MARK_JWT("application/trust-mark+jwt"), - APPLICATION_TRUST_MARK_DELEGATION_JWT("application/trust-mark-delegation+jwt"), - APPLICATION_TRUST_MARK_STATUS_RESPONSE_JWT("application/trust-mark-status-response+jwt"), - APPLICATION_TTML_XML("application/ttml+xml"), - APPLICATION_TVE_TRIGGER("application/tve-trigger"), - APPLICATION_TZIF("application/tzif"), - APPLICATION_TZIF_LEAP("application/tzif-leap"), - APPLICATION_UCCS_CBOR("application/uccs+cbor"), - APPLICATION_UJCS_JSON("application/ujcs+json"), - APPLICATION_ULPFEC("application/ulpfec"), - APPLICATION_URC_GRPSHEET_XML("application/urc-grpsheet+xml"), - APPLICATION_URC_RESSHEET_XML("application/urc-ressheet+xml"), - APPLICATION_URC_TARGETDESC_XML("application/urc-targetdesc+xml"), - APPLICATION_URC_UISOCKETDESC_XML("application/urc-uisocketdesc+xml"), - APPLICATION_VC("application/vc"), - APPLICATION_VC_COSE("application/vc+cose"), - APPLICATION_VC_JWT("application/vc+jwt"), - APPLICATION_VC_SD_JWT("application/vc+sd-jwt"), - APPLICATION_VCARD_JSON("application/vcard+json"), - APPLICATION_VCARD_XML("application/vcard+xml"), - APPLICATION_VEC_XML("application/vec+xml"), - APPLICATION_VEC_PACKAGE_GZIP("application/vec-package+gzip"), - APPLICATION_VEC_PACKAGE_ZIP("application/vec-package+zip"), - APPLICATION_VEMMI("application/vemmi"), - APPLICATION_VND_1000MINDS_DECISION_MODEL_XML("application/vnd.1000minds.decision-model+xml"), - APPLICATION_VND_1OB("application/vnd.1ob"), - APPLICATION_VND_3GPP_5GNAS("application/vnd.3gpp.5gnas"), - APPLICATION_VND_3GPP_5GSA2X("application/vnd.3gpp.5gsa2x"), - APPLICATION_VND_3GPP_5GSA2X_LOCAL_SERVICE_INFORMATION("application/vnd.3gpp.5gsa2x-local-service-information"), - APPLICATION_VND_3GPP_5GSV2X("application/vnd.3gpp.5gsv2x"), - APPLICATION_VND_3GPP_5GSV2X_LOCAL_SERVICE_INFORMATION("application/vnd.3gpp.5gsv2x-local-service-information"), - APPLICATION_VND_3GPP_ACCESS_TRANSFER_EVENTS_XML("application/vnd.3gpp.access-transfer-events+xml"), - APPLICATION_VND_3GPP_BSF_XML("application/vnd.3gpp.bsf+xml"), - APPLICATION_VND_3GPP_CRS_XML("application/vnd.3gpp.crs+xml"), - APPLICATION_VND_3GPP_CURRENT_LOCATION_DISCOVERY_XML("application/vnd.3gpp.current-location-discovery+xml"), - APPLICATION_VND_3GPP_GMOP_XML("application/vnd.3gpp.GMOP+xml"), - APPLICATION_VND_3GPP_GTPC("application/vnd.3gpp.gtpc"), - APPLICATION_VND_3GPP_INTERWORKING_DATA("application/vnd.3gpp.interworking-data"), - APPLICATION_VND_3GPP_LPP("application/vnd.3gpp.lpp"), - APPLICATION_VND_3GPP_MC_SIGNALLING_EAR("application/vnd.3gpp.mc-signalling-ear"), - APPLICATION_VND_3GPP_MCDATA_AFFILIATION_COMMAND_XML("application/vnd.3gpp.mcdata-affiliation-command+xml"), - APPLICATION_VND_3GPP_MCDATA_INFO_XML("application/vnd.3gpp.mcdata-info+xml"), - APPLICATION_VND_3GPP_MCDATA_MSGSTORE_CTRL_REQUEST_XML("application/vnd.3gpp.mcdata-msgstore-ctrl-request+xml"), - APPLICATION_VND_3GPP_MCDATA_PAYLOAD("application/vnd.3gpp.mcdata-payload"), - APPLICATION_VND_3GPP_MCDATA_REGROUP_XML("application/vnd.3gpp.mcdata-regroup+xml"), - APPLICATION_VND_3GPP_MCDATA_SERVICE_CONFIG_XML("application/vnd.3gpp.mcdata-service-config+xml"), - APPLICATION_VND_3GPP_MCDATA_SIGNALLING("application/vnd.3gpp.mcdata-signalling"), - APPLICATION_VND_3GPP_MCDATA_UE_CONFIG_XML("application/vnd.3gpp.mcdata-ue-config+xml"), - APPLICATION_VND_3GPP_MCDATA_USER_PROFILE_XML("application/vnd.3gpp.mcdata-user-profile+xml"), - APPLICATION_VND_3GPP_MCPTT_AFFILIATION_COMMAND_XML("application/vnd.3gpp.mcptt-affiliation-command+xml"), - APPLICATION_VND_3GPP_MCPTT_FLOOR_REQUEST_XML("application/vnd.3gpp.mcptt-floor-request+xml"), - APPLICATION_VND_3GPP_MCPTT_INFO_XML("application/vnd.3gpp.mcptt-info+xml"), - APPLICATION_VND_3GPP_MCPTT_LOCATION_INFO_XML("application/vnd.3gpp.mcptt-location-info+xml"), - APPLICATION_VND_3GPP_MCPTT_MBMS_USAGE_INFO_XML("application/vnd.3gpp.mcptt-mbms-usage-info+xml"), - APPLICATION_VND_3GPP_MCPTT_REGROUP_XML("application/vnd.3gpp.mcptt-regroup+xml"), - APPLICATION_VND_3GPP_MCPTT_SERVICE_CONFIG_XML("application/vnd.3gpp.mcptt-service-config+xml"), - APPLICATION_VND_3GPP_MCPTT_SIGNED_XML("application/vnd.3gpp.mcptt-signed+xml"), - APPLICATION_VND_3GPP_MCPTT_UE_CONFIG_XML("application/vnd.3gpp.mcptt-ue-config+xml"), - APPLICATION_VND_3GPP_MCPTT_UE_INIT_CONFIG_XML("application/vnd.3gpp.mcptt-ue-init-config+xml"), - APPLICATION_VND_3GPP_MCPTT_USER_PROFILE_XML("application/vnd.3gpp.mcptt-user-profile+xml"), - APPLICATION_VND_3GPP_MCVIDEO_AFFILIATION_COMMAND_XML("application/vnd.3gpp.mcvideo-affiliation-command+xml"), - APPLICATION_VND_3GPP_MCVIDEO_AFFILIATION_INFO_XML("application/vnd.3gpp.mcvideo-affiliation-info+xml"), - APPLICATION_VND_3GPP_MCVIDEO_INFO_XML("application/vnd.3gpp.mcvideo-info+xml"), - APPLICATION_VND_3GPP_MCVIDEO_LOCATION_INFO_XML("application/vnd.3gpp.mcvideo-location-info+xml"), - APPLICATION_VND_3GPP_MCVIDEO_MBMS_USAGE_INFO_XML("application/vnd.3gpp.mcvideo-mbms-usage-info+xml"), - APPLICATION_VND_3GPP_MCVIDEO_REGROUP_XML("application/vnd.3gpp.mcvideo-regroup+xml"), - APPLICATION_VND_3GPP_MCVIDEO_SERVICE_CONFIG_XML("application/vnd.3gpp.mcvideo-service-config+xml"), - APPLICATION_VND_3GPP_MCVIDEO_TRANSMISSION_REQUEST_XML("application/vnd.3gpp.mcvideo-transmission-request+xml"), - APPLICATION_VND_3GPP_MCVIDEO_UE_CONFIG_XML("application/vnd.3gpp.mcvideo-ue-config+xml"), - APPLICATION_VND_3GPP_MCVIDEO_USER_PROFILE_XML("application/vnd.3gpp.mcvideo-user-profile+xml"), - APPLICATION_VND_3GPP_MID_CALL_XML("application/vnd.3gpp.mid-call+xml"), - APPLICATION_VND_3GPP_NGAP("application/vnd.3gpp.ngap"), - APPLICATION_VND_3GPP_PFCP("application/vnd.3gpp.pfcp"), - APPLICATION_VND_3GPP_PIC_BW_LARGE("application/vnd.3gpp.pic-bw-large"), - APPLICATION_VND_3GPP_PIC_BW_SMALL("application/vnd.3gpp.pic-bw-small"), - APPLICATION_VND_3GPP_PIC_BW_VAR("application/vnd.3gpp.pic-bw-var"), - APPLICATION_VND_3GPP_PINAPP_INFO_XML("application/vnd.3gpp.pinapp-info+xml"), - APPLICATION_VND_3GPP_PROSE_PC3A_XML("application/vnd.3gpp-prose-pc3a+xml"), - APPLICATION_VND_3GPP_PROSE_PC3ACH_XML("application/vnd.3gpp-prose-pc3ach+xml"), - APPLICATION_VND_3GPP_PROSE_PC3CH_XML("application/vnd.3gpp-prose-pc3ch+xml"), - APPLICATION_VND_3GPP_PROSE_PC8_XML("application/vnd.3gpp-prose-pc8+xml"), - APPLICATION_VND_3GPP_PROSE_XML("application/vnd.3gpp-prose+xml"), - APPLICATION_VND_3GPP_S1AP("application/vnd.3gpp.s1ap"), - APPLICATION_VND_3GPP_SEAL_APP_COMM_REQUIREMENTS_INFO_XML("application/vnd.3gpp.seal-app-comm-requirements-info+xml"), - APPLICATION_VND_3GPP_SEAL_DATA_DELIVERY_INFO_CBOR("application/vnd.3gpp.seal-data-delivery-info+cbor"), - APPLICATION_VND_3GPP_SEAL_DATA_DELIVERY_INFO_XML("application/vnd.3gpp.seal-data-delivery-info+xml"), - APPLICATION_VND_3GPP_SEAL_GROUP_DOC_XML("application/vnd.3gpp.seal-group-doc+xml"), - APPLICATION_VND_3GPP_SEAL_INFO_XML("application/vnd.3gpp.seal-info+xml"), - APPLICATION_VND_3GPP_SEAL_LOCATION_INFO_CBOR("application/vnd.3gpp.seal-location-info+cbor"), - APPLICATION_VND_3GPP_SEAL_LOCATION_INFO_XML("application/vnd.3gpp.seal-location-info+xml"), - APPLICATION_VND_3GPP_SEAL_MBMS_USAGE_INFO_XML("application/vnd.3gpp.seal-mbms-usage-info+xml"), - APPLICATION_VND_3GPP_SEAL_MBS_USAGE_INFO_XML("application/vnd.3gpp.seal-mbs-usage-info+xml"), - APPLICATION_VND_3GPP_SEAL_NETWORK_QOS_MANAGEMENT_INFO_XML("application/vnd.3gpp.seal-network-QoS-management-info+xml"), - APPLICATION_VND_3GPP_SEAL_NETWORK_RESOURCE_INFO_CBOR("application/vnd.3gpp.seal-network-resource-info+cbor"), - APPLICATION_VND_3GPP_SEAL_UE_CONFIG_INFO_XML("application/vnd.3gpp.seal-ue-config-info+xml"), - APPLICATION_VND_3GPP_SEAL_UNICAST_INFO_XML("application/vnd.3gpp.seal-unicast-info+xml"), - APPLICATION_VND_3GPP_SEAL_USER_PROFILE_INFO_XML("application/vnd.3gpp.seal-user-profile-info+xml"), - APPLICATION_VND_3GPP_SMS("application/vnd.3gpp.sms"), - APPLICATION_VND_3GPP_SMS_XML("application/vnd.3gpp.sms+xml"), - APPLICATION_VND_3GPP_SRVCC_EXT_XML("application/vnd.3gpp.srvcc-ext+xml"), - APPLICATION_VND_3GPP_SRVCC_INFO_XML("application/vnd.3gpp.SRVCC-info+xml"), - APPLICATION_VND_3GPP_STATE_AND_EVENT_INFO_XML("application/vnd.3gpp.state-and-event-info+xml"), - APPLICATION_VND_3GPP_USSD_XML("application/vnd.3gpp.ussd+xml"), - APPLICATION_VND_3GPP_VAE_INFO_XML("application/vnd.3gpp.vae-info+xml"), - APPLICATION_VND_3GPP_V2X_LOCAL_SERVICE_INFORMATION("application/vnd.3gpp-v2x-local-service-information"), - APPLICATION_VND_3GPP2_BCMCSINFO_XML("application/vnd.3gpp2.bcmcsinfo+xml"), - APPLICATION_VND_3GPP2_SMS("application/vnd.3gpp2.sms"), - APPLICATION_VND_3GPP2_TCAP("application/vnd.3gpp2.tcap"), - APPLICATION_VND_3GPP_V2X("application/vnd.3gpp.v2x"), - APPLICATION_VND_3LIGHTSSOFTWARE_IMAGESCAL("application/vnd.3lightssoftware.imagescal"), - APPLICATION_VND_3M_POST_IT_NOTES("application/vnd.3M.Post-it-Notes"), - APPLICATION_VND_ACCPAC_SIMPLY_ASO("application/vnd.accpac.simply.aso"), - APPLICATION_VND_ACCPAC_SIMPLY_IMP("application/vnd.accpac.simply.imp"), - APPLICATION_VND_ACM_ADDRESSXFER_JSON("application/vnd.acm.addressxfer+json"), - APPLICATION_VND_ACM_CHATBOT_JSON("application/vnd.acm.chatbot+json"), - APPLICATION_VND_ACUCOBOL("application/vnd.acucobol"), - APPLICATION_VND_ACUCORP("application/vnd.acucorp"), - APPLICATION_VND_ADOBE_FLASH_MOVIE("application/vnd.adobe.flash.movie"), - APPLICATION_VND_ADOBE_FORMSCENTRAL_FCDT("application/vnd.adobe.formscentral.fcdt"), - APPLICATION_VND_ADOBE_FXP("application/vnd.adobe.fxp"), - APPLICATION_VND_ADOBE_PARTIAL_UPLOAD("application/vnd.adobe.partial-upload"), - APPLICATION_VND_ADOBE_XDP_XML("application/vnd.adobe.xdp+xml"), - APPLICATION_VND_AETHER_IMP("application/vnd.aether.imp"), - APPLICATION_VND_AFPC_AFPLINEDATA("application/vnd.afpc.afplinedata"), - APPLICATION_VND_AFPC_AFPLINEDATA_PAGEDEF("application/vnd.afpc.afplinedata-pagedef"), - APPLICATION_VND_AFPC_CMOCA_CMRESOURCE("application/vnd.afpc.cmoca-cmresource"), - APPLICATION_VND_AFPC_FOCA_CHARSET("application/vnd.afpc.foca-charset"), - APPLICATION_VND_AFPC_FOCA_CODEDFONT("application/vnd.afpc.foca-codedfont"), - APPLICATION_VND_AFPC_FOCA_CODEPAGE("application/vnd.afpc.foca-codepage"), - APPLICATION_VND_AFPC_MODCA("application/vnd.afpc.modca"), - APPLICATION_VND_AFPC_MODCA_CMTABLE("application/vnd.afpc.modca-cmtable"), - APPLICATION_VND_AFPC_MODCA_FORMDEF("application/vnd.afpc.modca-formdef"), - APPLICATION_VND_AFPC_MODCA_MEDIUMMAP("application/vnd.afpc.modca-mediummap"), - APPLICATION_VND_AFPC_MODCA_OBJECTCONTAINER("application/vnd.afpc.modca-objectcontainer"), - APPLICATION_VND_AFPC_MODCA_OVERLAY("application/vnd.afpc.modca-overlay"), - APPLICATION_VND_AFPC_MODCA_PAGESEGMENT("application/vnd.afpc.modca-pagesegment"), - APPLICATION_VND_AGE("application/vnd.age"), - APPLICATION_VND_AH_BARCODE("application/vnd.ah-barcode"), - APPLICATION_VND_AHEAD_SPACE("application/vnd.ahead.space"), - APPLICATION_VND_AIA("application/vnd.aia"), - APPLICATION_VND_AIRZIP_FILESECURE_AZF("application/vnd.airzip.filesecure.azf"), - APPLICATION_VND_AIRZIP_FILESECURE_AZS("application/vnd.airzip.filesecure.azs"), - APPLICATION_VND_AMADEUS_JSON("application/vnd.amadeus+json"), - APPLICATION_VND_AMAZON_MOBI8_EBOOK("application/vnd.amazon.mobi8-ebook"), - APPLICATION_VND_AMERICANDYNAMICS_ACC("application/vnd.americandynamics.acc"), - APPLICATION_VND_AMIGA_AMI("application/vnd.amiga.ami"), - APPLICATION_VND_AMUNDSEN_MAZE_XML("application/vnd.amundsen.maze+xml"), - APPLICATION_VND_ANDROID_OTA("application/vnd.android.ota"), - APPLICATION_VND_ANKI("application/vnd.anki"), - APPLICATION_VND_ANSER_WEB_CERTIFICATE_ISSUE_INITIATION("application/vnd.anser-web-certificate-issue-initiation"), - APPLICATION_VND_ANTIX_GAME_COMPONENT("application/vnd.antix.game-component"), - APPLICATION_VND_APACHE_ARROW_FILE("application/vnd.apache.arrow.file"), - APPLICATION_VND_APACHE_ARROW_STREAM("application/vnd.apache.arrow.stream"), - APPLICATION_VND_APACHE_PARQUET("application/vnd.apache.parquet"), - APPLICATION_VND_APACHE_THRIFT_BINARY("application/vnd.apache.thrift.binary"), - APPLICATION_VND_APACHE_THRIFT_COMPACT("application/vnd.apache.thrift.compact"), - APPLICATION_VND_APACHE_THRIFT_JSON("application/vnd.apache.thrift.json"), - APPLICATION_VND_APEXLANG("application/vnd.apexlang"), - APPLICATION_VND_API_JSON("application/vnd.api+json"), - APPLICATION_VND_APLEXTOR_WARRP_JSON("application/vnd.aplextor.warrp+json"), - APPLICATION_VND_APOTHEKENDE_RESERVATION_JSON("application/vnd.apothekende.reservation+json"), - APPLICATION_VND_APPLE_INSTALLER_XML("application/vnd.apple.installer+xml"), - APPLICATION_VND_APPLE_KEYNOTE("application/vnd.apple.keynote"), - APPLICATION_VND_APPLE_MPEGURL("application/vnd.apple.mpegurl"), - APPLICATION_VND_APPLE_NUMBERS("application/vnd.apple.numbers"), - APPLICATION_VND_APPLE_PAGES("application/vnd.apple.pages"), - APPLICATION_VND_ARASTRA_SWI("application/vnd.arastra.swi"), - APPLICATION_VND_ARISTANETWORKS_SWI("application/vnd.aristanetworks.swi"), - APPLICATION_VND_ARTISAN_JSON("application/vnd.artisan+json"), - APPLICATION_VND_ARTSQUARE("application/vnd.artsquare"), - APPLICATION_VND_AS207960_VAS_CONFIG_JER("application/vnd.as207960.vas.config+jer"), - APPLICATION_VND_AS207960_VAS_CONFIG_UPER("application/vnd.as207960.vas.config+uper"), - APPLICATION_VND_AS207960_VAS_TAP_JER("application/vnd.as207960.vas.tap+jer"), - APPLICATION_VND_AS207960_VAS_TAP_UPER("application/vnd.as207960.vas.tap+uper"), - APPLICATION_VND_ASTRAEA_SOFTWARE_IOTA("application/vnd.astraea-software.iota"), - APPLICATION_VND_AUDIOGRAPH("application/vnd.audiograph"), - APPLICATION_VND_AUTOPACKAGE("application/vnd.autopackage"), - APPLICATION_VND_AVALON_JSON("application/vnd.avalon+json"), - APPLICATION_VND_AVISTAR_XML("application/vnd.avistar+xml"), - APPLICATION_VND_BALSAMIQ_BMML_XML("application/vnd.balsamiq.bmml+xml"), - APPLICATION_VND_BANANA_ACCOUNTING("application/vnd.banana-accounting"), - APPLICATION_VND_BBF_USP_ERROR("application/vnd.bbf.usp.error"), - APPLICATION_VND_BBF_USP_MSG("application/vnd.bbf.usp.msg"), - APPLICATION_VND_BBF_USP_MSG_JSON("application/vnd.bbf.usp.msg+json"), - APPLICATION_VND_BALSAMIQ_BMPR("application/vnd.balsamiq.bmpr"), - APPLICATION_VND_BEKITZUR_STECH_JSON("application/vnd.bekitzur-stech+json"), - APPLICATION_VND_BELIGHTSOFT_LHZD_ZIP("application/vnd.belightsoft.lhzd+zip"), - APPLICATION_VND_BELIGHTSOFT_LHZL_ZIP("application/vnd.belightsoft.lhzl+zip"), - APPLICATION_VND_BINT_MED_CONTENT("application/vnd.bint.med-content"), - APPLICATION_VND_BIOPAX_RDF_XML("application/vnd.biopax.rdf+xml"), - APPLICATION_VND_BLINK_IDB_VALUE_WRAPPER("application/vnd.blink-idb-value-wrapper"), - APPLICATION_VND_BLUEICE_MULTIPASS("application/vnd.blueice.multipass"), - APPLICATION_VND_BLUETOOTH_EP_OOB("application/vnd.bluetooth.ep.oob"), - APPLICATION_VND_BLUETOOTH_LE_OOB("application/vnd.bluetooth.le.oob"), - APPLICATION_VND_BMI("application/vnd.bmi"), - APPLICATION_VND_BPF("application/vnd.bpf"), - APPLICATION_VND_BPF3("application/vnd.bpf3"), - APPLICATION_VND_BUSINESSOBJECTS("application/vnd.businessobjects"), - APPLICATION_VND_BYU_UAPI_JSON("application/vnd.byu.uapi+json"), - APPLICATION_VND_BZIP3("application/vnd.bzip3"), - APPLICATION_VND_C3VOC_SCHEDULE_XML("application/vnd.c3voc.schedule+xml"), - APPLICATION_VND_CAB_JSCRIPT("application/vnd.cab-jscript"), - APPLICATION_VND_CANON_CPDL("application/vnd.canon-cpdl"), - APPLICATION_VND_CANON_LIPS("application/vnd.canon-lips"), - APPLICATION_VND_CAPASYSTEMS_PG_JSON("application/vnd.capasystems-pg+json"), - APPLICATION_VND_CEL("application/vnd.cel"), - APPLICATION_VND_CENDIO_THINLINC_CLIENTCONF("application/vnd.cendio.thinlinc.clientconf"), - APPLICATION_VND_CENTURY_SYSTEMS_TCP_STREAM("application/vnd.century-systems.tcp_stream"), - APPLICATION_VND_CHEMDRAW_XML("application/vnd.chemdraw+xml"), - APPLICATION_VND_CHESS_PGN("application/vnd.chess-pgn"), - APPLICATION_VND_CHIPNUTS_KARAOKE_MMD("application/vnd.chipnuts.karaoke-mmd"), - APPLICATION_VND_CIEDI("application/vnd.ciedi"), - APPLICATION_VND_CINDERELLA("application/vnd.cinderella"), - APPLICATION_VND_CIRPACK_ISDN_EXT("application/vnd.cirpack.isdn-ext"), - APPLICATION_VND_CITATIONSTYLES_STYLE_XML("application/vnd.citationstyles.style+xml"), - APPLICATION_VND_CLAYMORE("application/vnd.claymore"), - APPLICATION_VND_CLOANTO_RP9("application/vnd.cloanto.rp9"), - APPLICATION_VND_CLONK_C4GROUP("application/vnd.clonk.c4group"), - APPLICATION_VND_CLUETRUST_CARTOMOBILE_CONFIG("application/vnd.cluetrust.cartomobile-config"), - APPLICATION_VND_CLUETRUST_CARTOMOBILE_CONFIG_PKG("application/vnd.cluetrust.cartomobile-config-pkg"), - APPLICATION_VND_CNCF_HELM_CHART_CONTENT_V1_TAR_GZIP("application/vnd.cncf.helm.chart.content.v1.tar+gzip"), - APPLICATION_VND_CNCF_HELM_CHART_PROVENANCE_V1_PROV("application/vnd.cncf.helm.chart.provenance.v1.prov"), - APPLICATION_VND_CNCF_HELM_CONFIG_V1_JSON("application/vnd.cncf.helm.config.v1+json"), - APPLICATION_VND_COFFEESCRIPT("application/vnd.coffeescript"), - APPLICATION_VND_COLLABIO_XODOCUMENTS_DOCUMENT("application/vnd.collabio.xodocuments.document"), - APPLICATION_VND_COLLABIO_XODOCUMENTS_DOCUMENT_TEMPLATE("application/vnd.collabio.xodocuments.document-template"), - APPLICATION_VND_COLLABIO_XODOCUMENTS_PRESENTATION("application/vnd.collabio.xodocuments.presentation"), - APPLICATION_VND_COLLABIO_XODOCUMENTS_PRESENTATION_TEMPLATE("application/vnd.collabio.xodocuments.presentation-template"), - APPLICATION_VND_COLLABIO_XODOCUMENTS_SPREADSHEET("application/vnd.collabio.xodocuments.spreadsheet"), - APPLICATION_VND_COLLABIO_XODOCUMENTS_SPREADSHEET_TEMPLATE("application/vnd.collabio.xodocuments.spreadsheet-template"), - APPLICATION_VND_COLLECTION_DOC_JSON("application/vnd.collection.doc+json"), - APPLICATION_VND_COLLECTION_JSON("application/vnd.collection+json"), - APPLICATION_VND_COLLECTION_NEXT_JSON("application/vnd.collection.next+json"), - APPLICATION_VND_COMICBOOK_RAR("application/vnd.comicbook-rar"), - APPLICATION_VND_COMICBOOK_ZIP("application/vnd.comicbook+zip"), - APPLICATION_VND_COMMERCE_BATTELLE("application/vnd.commerce-battelle"), - APPLICATION_VND_COMMONSPACE("application/vnd.commonspace"), - APPLICATION_VND_COREOS_IGNITION_JSON("application/vnd.coreos.ignition+json"), - APPLICATION_VND_COSMOCALLER("application/vnd.cosmocaller"), - APPLICATION_VND_CONTACT_CMSG("application/vnd.contact.cmsg"), - APPLICATION_VND_CRICK_CLICKER("application/vnd.crick.clicker"), - APPLICATION_VND_CRICK_CLICKER_KEYBOARD("application/vnd.crick.clicker.keyboard"), - APPLICATION_VND_CRICK_CLICKER_PALETTE("application/vnd.crick.clicker.palette"), - APPLICATION_VND_CRICK_CLICKER_TEMPLATE("application/vnd.crick.clicker.template"), - APPLICATION_VND_CRICK_CLICKER_WORDBANK("application/vnd.crick.clicker.wordbank"), - APPLICATION_VND_CRITICALTOOLS_WBS_XML("application/vnd.criticaltools.wbs+xml"), - APPLICATION_VND_CRYPTII_PIPE_JSON("application/vnd.cryptii.pipe+json"), - APPLICATION_VND_CRYPTO_SHADE_FILE("application/vnd.crypto-shade-file"), - APPLICATION_VND_CRYPTOMATOR_ENCRYPTED("application/vnd.cryptomator.encrypted"), - APPLICATION_VND_CRYPTOMATOR_VAULT("application/vnd.cryptomator.vault"), - APPLICATION_VND_CTC_POSML("application/vnd.ctc-posml"), - APPLICATION_VND_CTCT_WS_XML("application/vnd.ctct.ws+xml"), - APPLICATION_VND_CUPS_PDF("application/vnd.cups-pdf"), - APPLICATION_VND_CUPS_POSTSCRIPT("application/vnd.cups-postscript"), - APPLICATION_VND_CUPS_PPD("application/vnd.cups-ppd"), - APPLICATION_VND_CUPS_RASTER("application/vnd.cups-raster"), - APPLICATION_VND_CUPS_RAW("application/vnd.cups-raw"), - APPLICATION_VND_CURL("application/vnd.curl"), - APPLICATION_VND_CYAN_DEAN_ROOT_XML("application/vnd.cyan.dean.root+xml"), - APPLICATION_VND_CYBANK("application/vnd.cybank"), - APPLICATION_VND_CYCLONEDX_JSON("application/vnd.cyclonedx+json"), - APPLICATION_VND_CYCLONEDX_XML("application/vnd.cyclonedx+xml"), - APPLICATION_VND_D2L_COURSEPACKAGE1P0_ZIP("application/vnd.d2l.coursepackage1p0+zip"), - APPLICATION_VND_D3M_DATASET("application/vnd.d3m-dataset"), - APPLICATION_VND_D3M_PROBLEM("application/vnd.d3m-problem"), - APPLICATION_VND_DART("application/vnd.dart"), - APPLICATION_VND_DATA_VISION_RDZ("application/vnd.data-vision.rdz"), - APPLICATION_VND_DATALOG("application/vnd.datalog"), - APPLICATION_VND_DATAPACKAGE_JSON("application/vnd.datapackage+json"), - APPLICATION_VND_DATARESOURCE_JSON("application/vnd.dataresource+json"), - APPLICATION_VND_DBF("application/vnd.dbf"), - APPLICATION_VND_DCMP_XML("application/vnd.dcmp+xml"), - APPLICATION_VND_DEBIAN_BINARY_PACKAGE("application/vnd.debian.binary-package"), - APPLICATION_VND_DECE_DATA("application/vnd.dece.data"), - APPLICATION_VND_DECE_TTML_XML("application/vnd.dece.ttml+xml"), - APPLICATION_VND_DECE_UNSPECIFIED("application/vnd.dece.unspecified"), - APPLICATION_VND_DECE_ZIP("application/vnd.dece.zip"), - APPLICATION_VND_DENOVO_FCSELAYOUT_LINK("application/vnd.denovo.fcselayout-link"), - APPLICATION_VND_DESMUME_MOVIE("application/vnd.desmume.movie"), - APPLICATION_VND_DIR_BI_PLATE_DL_NOSUFFIX("application/vnd.dir-bi.plate-dl-nosuffix"), - APPLICATION_VND_DM_DELEGATION_XML("application/vnd.dm.delegation+xml"), - APPLICATION_VND_DNA("application/vnd.dna"), - APPLICATION_VND_DOCUMENT_JSON("application/vnd.document+json"), - APPLICATION_VND_DOLBY_MOBILE_1("application/vnd.dolby.mobile.1"), - APPLICATION_VND_DOLBY_MOBILE_2("application/vnd.dolby.mobile.2"), - APPLICATION_VND_DOREMIR_SCORECLOUD_BINARY_DOCUMENT("application/vnd.doremir.scorecloud-binary-document"), - APPLICATION_VND_DPGRAPH("application/vnd.dpgraph"), - APPLICATION_VND_DREAMFACTORY("application/vnd.dreamfactory"), - APPLICATION_VND_DRIVE_JSON("application/vnd.drive+json"), - APPLICATION_VND_DTG_LOCAL("application/vnd.dtg.local"), - APPLICATION_VND_DTG_LOCAL_FLASH("application/vnd.dtg.local.flash"), - APPLICATION_VND_DTG_LOCAL_HTML("application/vnd.dtg.local.html"), - APPLICATION_VND_DVB_AIT("application/vnd.dvb.ait"), - APPLICATION_VND_DVB_DVBISL_XML("application/vnd.dvb.dvbisl+xml"), - APPLICATION_VND_DVB_DVBJ("application/vnd.dvb.dvbj"), - APPLICATION_VND_DVB_ESGCONTAINER("application/vnd.dvb.esgcontainer"), - APPLICATION_VND_DVB_IPDCDFTNOTIFACCESS("application/vnd.dvb.ipdcdftnotifaccess"), - APPLICATION_VND_DVB_IPDCESGACCESS("application/vnd.dvb.ipdcesgaccess"), - APPLICATION_VND_DVB_IPDCESGACCESS2("application/vnd.dvb.ipdcesgaccess2"), - APPLICATION_VND_DVB_IPDCESGPDD("application/vnd.dvb.ipdcesgpdd"), - APPLICATION_VND_DVB_IPDCROAMING("application/vnd.dvb.ipdcroaming"), - APPLICATION_VND_DVB_IPTV_ALFEC_BASE("application/vnd.dvb.iptv.alfec-base"), - APPLICATION_VND_DVB_IPTV_ALFEC_ENHANCEMENT("application/vnd.dvb.iptv.alfec-enhancement"), - APPLICATION_VND_DVB_NOTIF_AGGREGATE_ROOT_XML("application/vnd.dvb.notif-aggregate-root+xml"), - APPLICATION_VND_DVB_NOTIF_CONTAINER_XML("application/vnd.dvb.notif-container+xml"), - APPLICATION_VND_DVB_NOTIF_GENERIC_XML("application/vnd.dvb.notif-generic+xml"), - APPLICATION_VND_DVB_NOTIF_IA_MSGLIST_XML("application/vnd.dvb.notif-ia-msglist+xml"), - APPLICATION_VND_DVB_NOTIF_IA_REGISTRATION_REQUEST_XML("application/vnd.dvb.notif-ia-registration-request+xml"), - APPLICATION_VND_DVB_NOTIF_IA_REGISTRATION_RESPONSE_XML("application/vnd.dvb.notif-ia-registration-response+xml"), - APPLICATION_VND_DVB_NOTIF_INIT_XML("application/vnd.dvb.notif-init+xml"), - APPLICATION_VND_DVB_PFR("application/vnd.dvb.pfr"), - APPLICATION_VND_DVB_SERVICE("application/vnd.dvb.service"), - APPLICATION_VND_DXR("application/vnd.dxr"), - APPLICATION_VND_DYNAGEO("application/vnd.dynageo"), - APPLICATION_VND_DZR("application/vnd.dzr"), - APPLICATION_VND_EASYKARAOKE_CDGDOWNLOAD("application/vnd.easykaraoke.cdgdownload"), - APPLICATION_VND_ECIP_RLP("application/vnd.ecip.rlp"), - APPLICATION_VND_ECDIS_UPDATE("application/vnd.ecdis-update"), - APPLICATION_VND_ECLIPSE_DITTO_JSON("application/vnd.eclipse.ditto+json"), - APPLICATION_VND_ECOWIN_CHART("application/vnd.ecowin.chart"), - APPLICATION_VND_ECOWIN_FILEREQUEST("application/vnd.ecowin.filerequest"), - APPLICATION_VND_ECOWIN_FILEUPDATE("application/vnd.ecowin.fileupdate"), - APPLICATION_VND_ECOWIN_SERIES("application/vnd.ecowin.series"), - APPLICATION_VND_ECOWIN_SERIESREQUEST("application/vnd.ecowin.seriesrequest"), - APPLICATION_VND_ECOWIN_SERIESUPDATE("application/vnd.ecowin.seriesupdate"), - APPLICATION_VND_EFI_IMG("application/vnd.efi.img"), - APPLICATION_VND_EFI_ISO("application/vnd.efi.iso"), - APPLICATION_VND_ELN_ZIP("application/vnd.eln+zip"), - APPLICATION_VND_EMCLIENT_ACCESSREQUEST_XML("application/vnd.emclient.accessrequest+xml"), - APPLICATION_VND_ENLIVEN("application/vnd.enliven"), - APPLICATION_VND_ENPHASE_ENVOY("application/vnd.enphase.envoy"), - APPLICATION_VND_EPRINTS_DATA_XML("application/vnd.eprints.data+xml"), - APPLICATION_VND_EPSON_ESF("application/vnd.epson.esf"), - APPLICATION_VND_EPSON_MSF("application/vnd.epson.msf"), - APPLICATION_VND_EPSON_QUICKANIME("application/vnd.epson.quickanime"), - APPLICATION_VND_EPSON_SALT("application/vnd.epson.salt"), - APPLICATION_VND_EPSON_SSF("application/vnd.epson.ssf"), - APPLICATION_VND_ERICSSON_QUICKCALL("application/vnd.ericsson.quickcall"), - APPLICATION_VND_EROFS("application/vnd.erofs"), - APPLICATION_VND_ESPASS_ESPASS_ZIP("application/vnd.espass-espass+zip"), - APPLICATION_VND_ESZIGNO3_XML("application/vnd.eszigno3+xml"), - APPLICATION_VND_ETSI_AOC_XML("application/vnd.etsi.aoc+xml"), - APPLICATION_VND_ETSI_ASIC_S_ZIP("application/vnd.etsi.asic-s+zip"), - APPLICATION_VND_ETSI_ASIC_E_ZIP("application/vnd.etsi.asic-e+zip"), - APPLICATION_VND_ETSI_CUG_XML("application/vnd.etsi.cug+xml"), - APPLICATION_VND_ETSI_IPTVCOMMAND_XML("application/vnd.etsi.iptvcommand+xml"), - APPLICATION_VND_ETSI_IPTVDISCOVERY_XML("application/vnd.etsi.iptvdiscovery+xml"), - APPLICATION_VND_ETSI_IPTVPROFILE_XML("application/vnd.etsi.iptvprofile+xml"), - APPLICATION_VND_ETSI_IPTVSAD_BC_XML("application/vnd.etsi.iptvsad-bc+xml"), - APPLICATION_VND_ETSI_IPTVSAD_COD_XML("application/vnd.etsi.iptvsad-cod+xml"), - APPLICATION_VND_ETSI_IPTVSAD_NPVR_XML("application/vnd.etsi.iptvsad-npvr+xml"), - APPLICATION_VND_ETSI_IPTVSERVICE_XML("application/vnd.etsi.iptvservice+xml"), - APPLICATION_VND_ETSI_IPTVSYNC_XML("application/vnd.etsi.iptvsync+xml"), - APPLICATION_VND_ETSI_IPTVUEPROFILE_XML("application/vnd.etsi.iptvueprofile+xml"), - APPLICATION_VND_ETSI_MCID_XML("application/vnd.etsi.mcid+xml"), - APPLICATION_VND_ETSI_MHEG5("application/vnd.etsi.mheg5"), - APPLICATION_VND_ETSI_OVERLOAD_CONTROL_POLICY_DATASET_XML("application/vnd.etsi.overload-control-policy-dataset+xml"), - APPLICATION_VND_ETSI_PSTN_XML("application/vnd.etsi.pstn+xml"), - APPLICATION_VND_ETSI_SCI_XML("application/vnd.etsi.sci+xml"), - APPLICATION_VND_ETSI_SIMSERVS_XML("application/vnd.etsi.simservs+xml"), - APPLICATION_VND_ETSI_TIMESTAMP_TOKEN("application/vnd.etsi.timestamp-token"), - APPLICATION_VND_ETSI_TSL_XML("application/vnd.etsi.tsl+xml"), - APPLICATION_VND_ETSI_TSL_DER("application/vnd.etsi.tsl.der"), - APPLICATION_VND_EU_KASPARIAN_CAR_JSON("application/vnd.eu.kasparian.car+json"), - APPLICATION_VND_EUDORA_DATA("application/vnd.eudora.data"), - APPLICATION_VND_EVOLV_ECIG_PROFILE("application/vnd.evolv.ecig.profile"), - APPLICATION_VND_EVOLV_ECIG_SETTINGS("application/vnd.evolv.ecig.settings"), - APPLICATION_VND_EVOLV_ECIG_THEME("application/vnd.evolv.ecig.theme"), - APPLICATION_VND_EXSTREAM_EMPOWER_ZIP("application/vnd.exstream-empower+zip"), - APPLICATION_VND_EXSTREAM_PACKAGE("application/vnd.exstream-package"), - APPLICATION_VND_EZPIX_ALBUM("application/vnd.ezpix-album"), - APPLICATION_VND_EZPIX_PACKAGE("application/vnd.ezpix-package"), - APPLICATION_VND_F_SECURE_MOBILE("application/vnd.f-secure.mobile"), - APPLICATION_VND_FAF_YAML("application/vnd.faf+yaml"), - APPLICATION_VND_FASTCOPY_DISK_IMAGE("application/vnd.fastcopy-disk-image"), - APPLICATION_VND_FAMILYSEARCH_GEDCOM_ZIP("application/vnd.familysearch.gedcom+zip"), - APPLICATION_VND_FDSN_MSEED("application/vnd.fdsn.mseed"), - APPLICATION_VND_FDSN_SEED("application/vnd.fdsn.seed"), - APPLICATION_VND_FDSN_STATIONXML_XML("application/vnd.fdsn.stationxml+xml"), - APPLICATION_VND_FFSNS("application/vnd.ffsns"), - APPLICATION_VND_FGB("application/vnd.fgb"), - APPLICATION_VND_FICLAB_FLB_ZIP("application/vnd.ficlab.flb+zip"), - APPLICATION_VND_FILMIT_ZFC("application/vnd.filmit.zfc"), - APPLICATION_VND_FINTS("application/vnd.fints"), - APPLICATION_VND_FIREMONKEYS_CLOUDCELL("application/vnd.firemonkeys.cloudcell"), - APPLICATION_VND_FLOGRAPHIT("application/vnd.FloGraphIt"), - APPLICATION_VND_FLUXTIME_CLIP("application/vnd.fluxtime.clip"), - APPLICATION_VND_FONT_FONTFORGE_SFD("application/vnd.font-fontforge-sfd"), - APPLICATION_VND_FRAMEMAKER("application/vnd.framemaker"), - APPLICATION_VND_FREELOG_COMIC("application/vnd.freelog.comic"), - APPLICATION_VND_FROGANS_FNC("application/vnd.frogans.fnc"), - APPLICATION_VND_FROGANS_LTF("application/vnd.frogans.ltf"), - APPLICATION_VND_FSC_WEBLAUNCH("application/vnd.fsc.weblaunch"), - APPLICATION_VND_FUJIFILM_FB_DOCUWORKS("application/vnd.fujifilm.fb.docuworks"), - APPLICATION_VND_FUJIFILM_FB_DOCUWORKS_BINDER("application/vnd.fujifilm.fb.docuworks.binder"), - APPLICATION_VND_FUJIFILM_FB_DOCUWORKS_CONTAINER("application/vnd.fujifilm.fb.docuworks.container"), - APPLICATION_VND_FUJIFILM_FB_JFI_XML("application/vnd.fujifilm.fb.jfi+xml"), - APPLICATION_VND_FUJITSU_OASYS("application/vnd.fujitsu.oasys"), - APPLICATION_VND_FUJITSU_OASYS2("application/vnd.fujitsu.oasys2"), - APPLICATION_VND_FUJITSU_OASYS3("application/vnd.fujitsu.oasys3"), - APPLICATION_VND_FUJITSU_OASYSGP("application/vnd.fujitsu.oasysgp"), - APPLICATION_VND_FUJITSU_OASYSPRS("application/vnd.fujitsu.oasysprs"), - APPLICATION_VND_FUJIXEROX_ART4("application/vnd.fujixerox.ART4"), - APPLICATION_VND_FUJIXEROX_ART_EX("application/vnd.fujixerox.ART-EX"), - APPLICATION_VND_FUJIXEROX_DDD("application/vnd.fujixerox.ddd"), - APPLICATION_VND_FUJIXEROX_DOCUWORKS("application/vnd.fujixerox.docuworks"), - APPLICATION_VND_FUJIXEROX_DOCUWORKS_BINDER("application/vnd.fujixerox.docuworks.binder"), - APPLICATION_VND_FUJIXEROX_DOCUWORKS_CONTAINER("application/vnd.fujixerox.docuworks.container"), - APPLICATION_VND_FUJIXEROX_HBPL("application/vnd.fujixerox.HBPL"), - APPLICATION_VND_FUT_MISNET("application/vnd.fut-misnet"), - APPLICATION_VND_FUTOIN_CBOR("application/vnd.futoin+cbor"), - APPLICATION_VND_FUTOIN_JSON("application/vnd.futoin+json"), - APPLICATION_VND_FUZZYSHEET("application/vnd.fuzzysheet"), - APPLICATION_VND_G3PIX_G3FC("application/vnd.g3pix.g3fc"), - APPLICATION_VND_GA4GH_PASSPORT_JWT("application/vnd.ga4gh.passport+jwt"), - APPLICATION_VND_GENOMATIX_TUXEDO("application/vnd.genomatix.tuxedo"), - APPLICATION_VND_GENOZIP("application/vnd.genozip"), - APPLICATION_VND_GENTICS_GRD_JSON("application/vnd.gentics.grd+json"), - APPLICATION_VND_GENTOO_CATMETADATA_XML("application/vnd.gentoo.catmetadata+xml"), - APPLICATION_VND_GENTOO_EBUILD("application/vnd.gentoo.ebuild"), - APPLICATION_VND_GENTOO_ECLASS("application/vnd.gentoo.eclass"), - APPLICATION_VND_GENTOO_GPKG("application/vnd.gentoo.gpkg"), - APPLICATION_VND_GENTOO_MANIFEST("application/vnd.gentoo.manifest"), - APPLICATION_VND_GENTOO_XPAK("application/vnd.gentoo.xpak"), - APPLICATION_VND_GENTOO_PKGMETADATA_XML("application/vnd.gentoo.pkgmetadata+xml"), - APPLICATION_VND_GEO_JSON("application/vnd.geo+json"), - APPLICATION_VND_GEOCUBE_XML("application/vnd.geocube+xml"), - APPLICATION_VND_GEOGEBRA_FILE("application/vnd.geogebra.file"), - APPLICATION_VND_GEOGEBRA_PINBOARD("application/vnd.geogebra.pinboard"), - APPLICATION_VND_GEOGEBRA_SLIDES("application/vnd.geogebra.slides"), - APPLICATION_VND_GEOGEBRA_TOOL("application/vnd.geogebra.tool"), - APPLICATION_VND_GEOMETRY_EXPLORER("application/vnd.geometry-explorer"), - APPLICATION_VND_GEONEXT("application/vnd.geonext"), - APPLICATION_VND_GEOPLAN("application/vnd.geoplan"), - APPLICATION_VND_GEOSPACE("application/vnd.geospace"), - APPLICATION_VND_GERBER("application/vnd.gerber"), - APPLICATION_VND_GLOBALPLATFORM_CARD_CONTENT_MGT("application/vnd.globalplatform.card-content-mgt"), - APPLICATION_VND_GLOBALPLATFORM_CARD_CONTENT_MGT_RESPONSE("application/vnd.globalplatform.card-content-mgt-response"), - APPLICATION_VND_GMX("application/vnd.gmx"), - APPLICATION_VND_GNU_TALER_EXCHANGE_JSON("application/vnd.gnu.taler.exchange+json"), - APPLICATION_VND_GNU_TALER_MERCHANT_JSON("application/vnd.gnu.taler.merchant+json"), - APPLICATION_VND_GOOGLE_EARTH_KML_XML("application/vnd.google-earth.kml+xml"), - APPLICATION_VND_GOOGLE_EARTH_KMZ("application/vnd.google-earth.kmz"), - APPLICATION_VND_GOV_SK_E_FORM_XML("application/vnd.gov.sk.e-form+xml"), - APPLICATION_VND_GOV_SK_E_FORM_ZIP("application/vnd.gov.sk.e-form+zip"), - APPLICATION_VND_GOV_SK_XMLDATACONTAINER_XML("application/vnd.gov.sk.xmldatacontainer+xml"), - APPLICATION_VND_GPXSEE_MAP_XML("application/vnd.gpxsee.map+xml"), - APPLICATION_VND_GRAFEQ("application/vnd.grafeq"), - APPLICATION_VND_GRIDMP("application/vnd.gridmp"), - APPLICATION_VND_GROOVE_ACCOUNT("application/vnd.groove-account"), - APPLICATION_VND_GROOVE_HELP("application/vnd.groove-help"), - APPLICATION_VND_GROOVE_IDENTITY_MESSAGE("application/vnd.groove-identity-message"), - APPLICATION_VND_GROOVE_INJECTOR("application/vnd.groove-injector"), - APPLICATION_VND_GROOVE_TOOL_MESSAGE("application/vnd.groove-tool-message"), - APPLICATION_VND_GROOVE_TOOL_TEMPLATE("application/vnd.groove-tool-template"), - APPLICATION_VND_GROOVE_VCARD("application/vnd.groove-vcard"), - APPLICATION_VND_HAL_JSON("application/vnd.hal+json"), - APPLICATION_VND_HAL_XML("application/vnd.hal+xml"), - APPLICATION_VND_HANDHELD_ENTERTAINMENT_XML("application/vnd.HandHeld-Entertainment+xml"), - APPLICATION_VND_HBCI("application/vnd.hbci"), - APPLICATION_VND_HC_JSON("application/vnd.hc+json"), - APPLICATION_VND_HCL_BIREPORTS("application/vnd.hcl-bireports"), - APPLICATION_VND_HDT("application/vnd.hdt"), - APPLICATION_VND_HEROKU_JSON("application/vnd.heroku+json"), - APPLICATION_VND_HHE_LESSON_PLAYER("application/vnd.hhe.lesson-player"), - APPLICATION_VND_HP_HPGL("application/vnd.hp-HPGL"), - APPLICATION_VND_HP_HPID("application/vnd.hp-hpid"), - APPLICATION_VND_HP_HPS("application/vnd.hp-hps"), - APPLICATION_VND_HP_JLYT("application/vnd.hp-jlyt"), - APPLICATION_VND_HP_PCL("application/vnd.hp-PCL"), - APPLICATION_VND_HP_PCLXL("application/vnd.hp-PCLXL"), - APPLICATION_VND_HSL("application/vnd.hsl"), - APPLICATION_VND_HTTPHONE("application/vnd.httphone"), - APPLICATION_VND_HYDROSTATIX_SOF_DATA("application/vnd.hydrostatix.sof-data"), - APPLICATION_VND_HYPER_ITEM_JSON("application/vnd.hyper-item+json"), - APPLICATION_VND_HYPER_JSON("application/vnd.hyper+json"), - APPLICATION_VND_HYPERDRIVE_JSON("application/vnd.hyperdrive+json"), - APPLICATION_VND_HZN_3D_CROSSWORD("application/vnd.hzn-3d-crossword"), - APPLICATION_VND_IBM_AFPLINEDATA("application/vnd.ibm.afplinedata"), - APPLICATION_VND_IBM_ELECTRONIC_MEDIA("application/vnd.ibm.electronic-media"), - APPLICATION_VND_IBM_MINIPAY("application/vnd.ibm.MiniPay"), - APPLICATION_VND_IBM_MODCAP("application/vnd.ibm.modcap"), - APPLICATION_VND_IBM_RIGHTS_MANAGEMENT("application/vnd.ibm.rights-management"), - APPLICATION_VND_IBM_SECURE_CONTAINER("application/vnd.ibm.secure-container"), - APPLICATION_VND_ICCPROFILE("application/vnd.iccprofile"), - APPLICATION_VND_IEEE_1905("application/vnd.ieee.1905"), - APPLICATION_VND_IGLOADER("application/vnd.igloader"), - APPLICATION_VND_IMAGEMETER_FOLDER_ZIP("application/vnd.imagemeter.folder+zip"), - APPLICATION_VND_IMAGEMETER_IMAGE_ZIP("application/vnd.imagemeter.image+zip"), - APPLICATION_VND_IMMERVISION_IVP("application/vnd.immervision-ivp"), - APPLICATION_VND_IMMERVISION_IVU("application/vnd.immervision-ivu"), - APPLICATION_VND_IMS_IMSCCV1P1("application/vnd.ims.imsccv1p1"), - APPLICATION_VND_IMS_IMSCCV1P2("application/vnd.ims.imsccv1p2"), - APPLICATION_VND_IMS_IMSCCV1P3("application/vnd.ims.imsccv1p3"), - APPLICATION_VND_IMS_LIS_V2_RESULT_JSON("application/vnd.ims.lis.v2.result+json"), - APPLICATION_VND_IMS_LTI_V2_TOOLCONSUMERPROFILE_JSON("application/vnd.ims.lti.v2.toolconsumerprofile+json"), - APPLICATION_VND_IMS_LTI_V2_TOOLPROXY_ID_JSON("application/vnd.ims.lti.v2.toolproxy.id+json"), - APPLICATION_VND_IMS_LTI_V2_TOOLPROXY_JSON("application/vnd.ims.lti.v2.toolproxy+json"), - APPLICATION_VND_IMS_LTI_V2_TOOLSETTINGS_JSON("application/vnd.ims.lti.v2.toolsettings+json"), - APPLICATION_VND_IMS_LTI_V2_TOOLSETTINGS_SIMPLE_JSON("application/vnd.ims.lti.v2.toolsettings.simple+json"), - APPLICATION_VND_INFORMEDCONTROL_RMS_XML("application/vnd.informedcontrol.rms+xml"), - APPLICATION_VND_INFOTECH_PROJECT("application/vnd.infotech.project"), - APPLICATION_VND_INFOTECH_PROJECT_XML("application/vnd.infotech.project+xml"), - APPLICATION_VND_INFORMIX_VISIONARY("application/vnd.informix-visionary"), - APPLICATION_VND_INNOPATH_WAMP_NOTIFICATION("application/vnd.innopath.wamp.notification"), - APPLICATION_VND_INSORS_IGM("application/vnd.insors.igm"), - APPLICATION_VND_INTERCON_FORMNET("application/vnd.intercon.formnet"), - APPLICATION_VND_INTERGEO("application/vnd.intergeo"), - APPLICATION_VND_INTERTRUST_DIGIBOX("application/vnd.intertrust.digibox"), - APPLICATION_VND_INTERTRUST_NNCP("application/vnd.intertrust.nncp"), - APPLICATION_VND_INTU_QBO("application/vnd.intu.qbo"), - APPLICATION_VND_INTU_QFX("application/vnd.intu.qfx"), - APPLICATION_VND_IPFS_IPNS_RECORD("application/vnd.ipfs.ipns-record"), - APPLICATION_VND_IPLD_CAR("application/vnd.ipld.car"), - APPLICATION_VND_IPLD_DAG_CBOR("application/vnd.ipld.dag-cbor"), - APPLICATION_VND_IPLD_DAG_JSON("application/vnd.ipld.dag-json"), - APPLICATION_VND_IPLD_RAW("application/vnd.ipld.raw"), - APPLICATION_VND_IPTC_G2_CATALOGITEM_XML("application/vnd.iptc.g2.catalogitem+xml"), - APPLICATION_VND_IPTC_G2_CONCEPTITEM_XML("application/vnd.iptc.g2.conceptitem+xml"), - APPLICATION_VND_IPTC_G2_KNOWLEDGEITEM_XML("application/vnd.iptc.g2.knowledgeitem+xml"), - APPLICATION_VND_IPTC_G2_NEWSITEM_XML("application/vnd.iptc.g2.newsitem+xml"), - APPLICATION_VND_IPTC_G2_NEWSMESSAGE_XML("application/vnd.iptc.g2.newsmessage+xml"), - APPLICATION_VND_IPTC_G2_PACKAGEITEM_XML("application/vnd.iptc.g2.packageitem+xml"), - APPLICATION_VND_IPTC_G2_PLANNINGITEM_XML("application/vnd.iptc.g2.planningitem+xml"), - APPLICATION_VND_IPUNPLUGGED_RCPROFILE("application/vnd.ipunplugged.rcprofile"), - APPLICATION_VND_IREPOSITORY_PACKAGE_XML("application/vnd.irepository.package+xml"), - APPLICATION_VND_IS_XPR("application/vnd.is-xpr"), - APPLICATION_VND_ISAC_FCS("application/vnd.isac.fcs"), - APPLICATION_VND_JAM("application/vnd.jam"), - APPLICATION_VND_ISO11783_10_ZIP("application/vnd.iso11783-10+zip"), - APPLICATION_VND_JAPANNET_DIRECTORY_SERVICE("application/vnd.japannet-directory-service"), - APPLICATION_VND_JAPANNET_JPNSTORE_WAKEUP("application/vnd.japannet-jpnstore-wakeup"), - APPLICATION_VND_JAPANNET_PAYMENT_WAKEUP("application/vnd.japannet-payment-wakeup"), - APPLICATION_VND_JAPANNET_REGISTRATION("application/vnd.japannet-registration"), - APPLICATION_VND_JAPANNET_REGISTRATION_WAKEUP("application/vnd.japannet-registration-wakeup"), - APPLICATION_VND_JAPANNET_SETSTORE_WAKEUP("application/vnd.japannet-setstore-wakeup"), - APPLICATION_VND_JAPANNET_VERIFICATION("application/vnd.japannet-verification"), - APPLICATION_VND_JAPANNET_VERIFICATION_WAKEUP("application/vnd.japannet-verification-wakeup"), - APPLICATION_VND_JCP_JAVAME_MIDLET_RMS("application/vnd.jcp.javame.midlet-rms"), - APPLICATION_VND_JISP("application/vnd.jisp"), - APPLICATION_VND_JOOST_JODA_ARCHIVE("application/vnd.joost.joda-archive"), - APPLICATION_VND_JSK_ISDN_NGN("application/vnd.jsk.isdn-ngn"), - APPLICATION_VND_KAHOOTZ("application/vnd.kahootz"), - APPLICATION_VND_KDE_KARBON("application/vnd.kde.karbon"), - APPLICATION_VND_KDE_KCHART("application/vnd.kde.kchart"), - APPLICATION_VND_KDE_KFORMULA("application/vnd.kde.kformula"), - APPLICATION_VND_KDE_KIVIO("application/vnd.kde.kivio"), - APPLICATION_VND_KDE_KONTOUR("application/vnd.kde.kontour"), - APPLICATION_VND_KDE_KPRESENTER("application/vnd.kde.kpresenter"), - APPLICATION_VND_KDE_KSPREAD("application/vnd.kde.kspread"), - APPLICATION_VND_KDE_KWORD("application/vnd.kde.kword"), - APPLICATION_VND_KDL("application/vnd.kdl"), - APPLICATION_VND_KENAMEAAPP("application/vnd.kenameaapp"), - APPLICATION_VND_KEYMAN_KMP_ZIP("application/vnd.keyman.kmp+zip"), - APPLICATION_VND_KEYMAN_KMX("application/vnd.keyman.kmx"), - APPLICATION_VND_KIDSPIRATION("application/vnd.kidspiration"), - APPLICATION_VND_KINAR("application/vnd.Kinar"), - APPLICATION_VND_KOAN("application/vnd.koan"), - APPLICATION_VND_KODAK_DESCRIPTOR("application/vnd.kodak-descriptor"), - APPLICATION_VND_LAS("application/vnd.las"), - APPLICATION_VND_LAS_LAS_JSON("application/vnd.las.las+json"), - APPLICATION_VND_LAS_LAS_XML("application/vnd.las.las+xml"), - APPLICATION_VND_LASZIP("application/vnd.laszip"), - APPLICATION_VND_LDEV_PRODUCTLICENSING("application/vnd.ldev.productlicensing"), - APPLICATION_VND_LEAP_JSON("application/vnd.leap+json"), - APPLICATION_VND_LIBERTY_REQUEST_XML("application/vnd.liberty-request+xml"), - APPLICATION_VND_LLAMAGRAPHICS_LIFE_BALANCE_DESKTOP("application/vnd.llamagraphics.life-balance.desktop"), - APPLICATION_VND_LLAMAGRAPHICS_LIFE_BALANCE_EXCHANGE_XML("application/vnd.llamagraphics.life-balance.exchange+xml"), - APPLICATION_VND_LOGIPIPE_CIRCUIT_ZIP("application/vnd.logipipe.circuit+zip"), - APPLICATION_VND_LOOM("application/vnd.loom"), - APPLICATION_VND_LOTUS_1_2_3("application/vnd.lotus-1-2-3"), - APPLICATION_VND_LOTUS_APPROACH("application/vnd.lotus-approach"), - APPLICATION_VND_LOTUS_FREELANCE("application/vnd.lotus-freelance"), - APPLICATION_VND_LOTUS_NOTES("application/vnd.lotus-notes"), - APPLICATION_VND_LOTUS_ORGANIZER("application/vnd.lotus-organizer"), - APPLICATION_VND_LOTUS_SCREENCAM("application/vnd.lotus-screencam"), - APPLICATION_VND_LOTUS_WORDPRO("application/vnd.lotus-wordpro"), - APPLICATION_VND_MACPORTS_PORTPKG("application/vnd.macports.portpkg"), - APPLICATION_VND_MAML("application/vnd.maml"), - APPLICATION_VND_MAPBOX_VECTOR_TILE("application/vnd.mapbox-vector-tile"), - APPLICATION_VND_MARLIN_DRM_ACTIONTOKEN_XML("application/vnd.marlin.drm.actiontoken+xml"), - APPLICATION_VND_MARLIN_DRM_CONFTOKEN_XML("application/vnd.marlin.drm.conftoken+xml"), - APPLICATION_VND_MARLIN_DRM_LICENSE_XML("application/vnd.marlin.drm.license+xml"), - APPLICATION_VND_MARLIN_DRM_MDCF("application/vnd.marlin.drm.mdcf"), - APPLICATION_VND_MASON_JSON("application/vnd.mason+json"), - APPLICATION_VND_MAXAR_ARCHIVE_3TZ_ZIP("application/vnd.maxar.archive.3tz+zip"), - APPLICATION_VND_MAXMIND_MAXMIND_DB("application/vnd.maxmind.maxmind-db"), - APPLICATION_VND_MCD("application/vnd.mcd"), - APPLICATION_VND_MDL("application/vnd.mdl"), - APPLICATION_VND_MDL_MBSDF("application/vnd.mdl-mbsdf"), - APPLICATION_VND_MEDCALCDATA("application/vnd.medcalcdata"), - APPLICATION_VND_MEDIASTATION_CDKEY("application/vnd.mediastation.cdkey"), - APPLICATION_VND_MEDICALHOLODECK_RECORDXR("application/vnd.medicalholodeck.recordxr"), - APPLICATION_VND_MERIDIAN_SLINGSHOT("application/vnd.meridian-slingshot"), - APPLICATION_VND_MERMAID("application/vnd.mermaid"), - APPLICATION_VND_MFER("application/vnd.MFER"), - APPLICATION_VND_MFMP("application/vnd.mfmp"), - APPLICATION_VND_MICRO_JSON("application/vnd.micro+json"), - APPLICATION_VND_MICROGRAFX_FLO("application/vnd.micrografx.flo"), - APPLICATION_VND_MICROGRAFX_IGX("application/vnd.micrografx.igx"), - APPLICATION_VND_MICROSOFT_PORTABLE_EXECUTABLE("application/vnd.microsoft.portable-executable"), - APPLICATION_VND_MICROSOFT_WINDOWS_THUMBNAIL_CACHE("application/vnd.microsoft.windows.thumbnail-cache"), - APPLICATION_VND_MIELE_JSON("application/vnd.miele+json"), - APPLICATION_VND_MIF("application/vnd.mif"), - APPLICATION_VND_MINISOFT_HP3000_SAVE("application/vnd.minisoft-hp3000-save"), - APPLICATION_VND_MITSUBISHI_MISTY_GUARD_TRUSTWEB("application/vnd.mitsubishi.misty-guard.trustweb"), - APPLICATION_VND_MOBIUS_DAF("application/vnd.Mobius.DAF"), - APPLICATION_VND_MOBIUS_DIS("application/vnd.Mobius.DIS"), - APPLICATION_VND_MOBIUS_MBK("application/vnd.Mobius.MBK"), - APPLICATION_VND_MOBIUS_MQY("application/vnd.Mobius.MQY"), - APPLICATION_VND_MOBIUS_MSL("application/vnd.Mobius.MSL"), - APPLICATION_VND_MOBIUS_PLC("application/vnd.Mobius.PLC"), - APPLICATION_VND_MOBIUS_TXF("application/vnd.Mobius.TXF"), - APPLICATION_VND_MODL("application/vnd.modl"), - APPLICATION_VND_MOPHUN_APPLICATION("application/vnd.mophun.application"), - APPLICATION_VND_MOPHUN_CERTIFICATE("application/vnd.mophun.certificate"), - APPLICATION_VND_MOTOROLA_FLEXSUITE("application/vnd.motorola.flexsuite"), - APPLICATION_VND_MOTOROLA_FLEXSUITE_ADSI("application/vnd.motorola.flexsuite.adsi"), - APPLICATION_VND_MOTOROLA_FLEXSUITE_FIS("application/vnd.motorola.flexsuite.fis"), - APPLICATION_VND_MOTOROLA_FLEXSUITE_GOTAP("application/vnd.motorola.flexsuite.gotap"), - APPLICATION_VND_MOTOROLA_FLEXSUITE_KMR("application/vnd.motorola.flexsuite.kmr"), - APPLICATION_VND_MOTOROLA_FLEXSUITE_TTC("application/vnd.motorola.flexsuite.ttc"), - APPLICATION_VND_MOTOROLA_FLEXSUITE_WEM("application/vnd.motorola.flexsuite.wem"), - APPLICATION_VND_MOTOROLA_IPRM("application/vnd.motorola.iprm"), - APPLICATION_VND_MOZILLA_XUL_XML("application/vnd.mozilla.xul+xml"), - APPLICATION_VND_MS_ARTGALRY("application/vnd.ms-artgalry"), - APPLICATION_VND_MS_ASF("application/vnd.ms-asf"), - APPLICATION_VND_MS_CAB_COMPRESSED("application/vnd.ms-cab-compressed"), - APPLICATION_VND_MS_3MFDOCUMENT("application/vnd.ms-3mfdocument"), - APPLICATION_VND_MS_EXCEL("application/vnd.ms-excel"), - APPLICATION_VND_MS_EXCEL_ADDIN_MACROENABLED_12("application/vnd.ms-excel.addin.macroEnabled.12"), - APPLICATION_VND_MS_EXCEL_SHEET_BINARY_MACROENABLED_12("application/vnd.ms-excel.sheet.binary.macroEnabled.12"), - APPLICATION_VND_MS_EXCEL_SHEET_MACROENABLED_12("application/vnd.ms-excel.sheet.macroEnabled.12"), - APPLICATION_VND_MS_EXCEL_TEMPLATE_MACROENABLED_12("application/vnd.ms-excel.template.macroEnabled.12"), - APPLICATION_VND_MS_FONTOBJECT("application/vnd.ms-fontobject"), - APPLICATION_VND_MS_HTMLHELP("application/vnd.ms-htmlhelp"), - APPLICATION_VND_MS_IMS("application/vnd.ms-ims"), - APPLICATION_VND_MS_LRM("application/vnd.ms-lrm"), - APPLICATION_VND_MS_OFFICE_ACTIVEX_XML("application/vnd.ms-office.activeX+xml"), - APPLICATION_VND_MS_OFFICETHEME("application/vnd.ms-officetheme"), - APPLICATION_VND_MS_PLAYREADY_INITIATOR_XML("application/vnd.ms-playready.initiator+xml"), - APPLICATION_VND_MS_POWERPOINT("application/vnd.ms-powerpoint"), - APPLICATION_VND_MS_POWERPOINT_ADDIN_MACROENABLED_12("application/vnd.ms-powerpoint.addin.macroEnabled.12"), - APPLICATION_VND_MS_POWERPOINT_PRESENTATION_MACROENABLED_12("application/vnd.ms-powerpoint.presentation.macroEnabled.12"), - APPLICATION_VND_MS_POWERPOINT_SLIDE_MACROENABLED_12("application/vnd.ms-powerpoint.slide.macroEnabled.12"), - APPLICATION_VND_MS_POWERPOINT_SLIDESHOW_MACROENABLED_12("application/vnd.ms-powerpoint.slideshow.macroEnabled.12"), - APPLICATION_VND_MS_POWERPOINT_TEMPLATE_MACROENABLED_12("application/vnd.ms-powerpoint.template.macroEnabled.12"), - APPLICATION_VND_MS_PRINTDEVICECAPABILITIES_XML("application/vnd.ms-PrintDeviceCapabilities+xml"), - APPLICATION_VND_MS_PRINTSCHEMATICKET_XML("application/vnd.ms-PrintSchemaTicket+xml"), - APPLICATION_VND_MS_PROJECT("application/vnd.ms-project"), - APPLICATION_VND_MS_TNEF("application/vnd.ms-tnef"), - APPLICATION_VND_MS_WINDOWS_DEVICEPAIRING("application/vnd.ms-windows.devicepairing"), - APPLICATION_VND_MS_WINDOWS_NWPRINTING_OOB("application/vnd.ms-windows.nwprinting.oob"), - APPLICATION_VND_MS_WINDOWS_PRINTERPAIRING("application/vnd.ms-windows.printerpairing"), - APPLICATION_VND_MS_WINDOWS_WSD_OOB("application/vnd.ms-windows.wsd.oob"), - APPLICATION_VND_MS_WMDRM_LIC_CHLG_REQ("application/vnd.ms-wmdrm.lic-chlg-req"), - APPLICATION_VND_MS_WMDRM_LIC_RESP("application/vnd.ms-wmdrm.lic-resp"), - APPLICATION_VND_MS_WMDRM_METER_CHLG_REQ("application/vnd.ms-wmdrm.meter-chlg-req"), - APPLICATION_VND_MS_WMDRM_METER_RESP("application/vnd.ms-wmdrm.meter-resp"), - APPLICATION_VND_MS_WORD_DOCUMENT_MACROENABLED_12("application/vnd.ms-word.document.macroEnabled.12"), - APPLICATION_VND_MS_WORD_TEMPLATE_MACROENABLED_12("application/vnd.ms-word.template.macroEnabled.12"), - APPLICATION_VND_MS_WORKS("application/vnd.ms-works"), - APPLICATION_VND_MS_WPL("application/vnd.ms-wpl"), - APPLICATION_VND_MS_XPSDOCUMENT("application/vnd.ms-xpsdocument"), - APPLICATION_VND_MSA_DISK_IMAGE("application/vnd.msa-disk-image"), - APPLICATION_VND_MSEQ("application/vnd.mseq"), - APPLICATION_VND_MSGPACK("application/vnd.msgpack"), - APPLICATION_VND_MSIGN("application/vnd.msign"), - APPLICATION_VND_MULTIAD_CREATOR("application/vnd.multiad.creator"), - APPLICATION_VND_MULTIAD_CREATOR_CIF("application/vnd.multiad.creator.cif"), - APPLICATION_VND_MUSICIAN("application/vnd.musician"), - APPLICATION_VND_MUSIC_NIFF("application/vnd.music-niff"), - APPLICATION_VND_MUVEE_STYLE("application/vnd.muvee.style"), - APPLICATION_VND_MYNFC("application/vnd.mynfc"), - APPLICATION_VND_NACAMAR_YBRID_JSON("application/vnd.nacamar.ybrid+json"), - APPLICATION_VND_NATO_BINDINGDATAOBJECT_CBOR("application/vnd.nato.bindingdataobject+cbor"), - APPLICATION_VND_NATO_BINDINGDATAOBJECT_JSON("application/vnd.nato.bindingdataobject+json"), - APPLICATION_VND_NATO_BINDINGDATAOBJECT_XML("application/vnd.nato.bindingdataobject+xml"), - APPLICATION_VND_NATO_OPENXMLFORMATS_PACKAGE_IEPD_ZIP("application/vnd.nato.openxmlformats-package.iepd+zip"), - APPLICATION_VND_NCD_CONTROL("application/vnd.ncd.control"), - APPLICATION_VND_NCD_REFERENCE("application/vnd.ncd.reference"), - APPLICATION_VND_NEARST_INV_JSON("application/vnd.nearst.inv+json"), - APPLICATION_VND_NEBUMIND_LINE("application/vnd.nebumind.line"), - APPLICATION_VND_NERVANA("application/vnd.nervana"), - APPLICATION_VND_NETFPX("application/vnd.netfpx"), - APPLICATION_VND_NEUROLANGUAGE_NLU("application/vnd.neurolanguage.nlu"), - APPLICATION_VND_NIMN("application/vnd.nimn"), - APPLICATION_VND_NINTENDO_SNES_ROM("application/vnd.nintendo.snes.rom"), - APPLICATION_VND_NINTENDO_NITRO_ROM("application/vnd.nintendo.nitro.rom"), - APPLICATION_VND_NITF("application/vnd.nitf"), - APPLICATION_VND_NOBLENET_DIRECTORY("application/vnd.noblenet-directory"), - APPLICATION_VND_NOBLENET_SEALER("application/vnd.noblenet-sealer"), - APPLICATION_VND_NOBLENET_WEB("application/vnd.noblenet-web"), - APPLICATION_VND_NOKIA_CATALOGS("application/vnd.nokia.catalogs"), - APPLICATION_VND_NOKIA_CONML_WBXML("application/vnd.nokia.conml+wbxml"), - APPLICATION_VND_NOKIA_CONML_XML("application/vnd.nokia.conml+xml"), - APPLICATION_VND_NOKIA_IPTV_CONFIG_XML("application/vnd.nokia.iptv.config+xml"), - APPLICATION_VND_NOKIA_ISDS_RADIO_PRESETS("application/vnd.nokia.iSDS-radio-presets"), - APPLICATION_VND_NOKIA_LANDMARK_WBXML("application/vnd.nokia.landmark+wbxml"), - APPLICATION_VND_NOKIA_LANDMARK_XML("application/vnd.nokia.landmark+xml"), - APPLICATION_VND_NOKIA_LANDMARKCOLLECTION_XML("application/vnd.nokia.landmarkcollection+xml"), - APPLICATION_VND_NOKIA_NCD("application/vnd.nokia.ncd"), - APPLICATION_VND_NOKIA_N_GAGE_AC_XML("application/vnd.nokia.n-gage.ac+xml"), - APPLICATION_VND_NOKIA_N_GAGE_DATA("application/vnd.nokia.n-gage.data"), - APPLICATION_VND_NOKIA_N_GAGE_SYMBIAN_INSTALL("application/vnd.nokia.n-gage.symbian.install"), - APPLICATION_VND_NOKIA_PCD_WBXML("application/vnd.nokia.pcd+wbxml"), - APPLICATION_VND_NOKIA_PCD_XML("application/vnd.nokia.pcd+xml"), - APPLICATION_VND_NOKIA_RADIO_PRESET("application/vnd.nokia.radio-preset"), - APPLICATION_VND_NOKIA_RADIO_PRESETS("application/vnd.nokia.radio-presets"), - APPLICATION_VND_NOVADIGM_EDM("application/vnd.novadigm.EDM"), - APPLICATION_VND_NOVADIGM_EDX("application/vnd.novadigm.EDX"), - APPLICATION_VND_NOVADIGM_EXT("application/vnd.novadigm.EXT"), - APPLICATION_VND_NTT_LOCAL_CONTENT_SHARE("application/vnd.ntt-local.content-share"), - APPLICATION_VND_NTT_LOCAL_FILE_TRANSFER("application/vnd.ntt-local.file-transfer"), - APPLICATION_VND_NTT_LOCAL_OGW_REMOTE_ACCESS("application/vnd.ntt-local.ogw_remote-access"), - APPLICATION_VND_NTT_LOCAL_SIP_TA_REMOTE("application/vnd.ntt-local.sip-ta_remote"), - APPLICATION_VND_NTT_LOCAL_SIP_TA_TCP_STREAM("application/vnd.ntt-local.sip-ta_tcp_stream"), - APPLICATION_VND_NUBALTEC_NUDOKU_GAME("application/vnd.nubaltec.nudoku-game"), - APPLICATION_VND_OAI_WORKFLOWS("application/vnd.oai.workflows"), - APPLICATION_VND_OAI_WORKFLOWS_JSON("application/vnd.oai.workflows+json"), - APPLICATION_VND_OAI_WORKFLOWS_YAML("application/vnd.oai.workflows+yaml"), - APPLICATION_VND_OASIS_OPENDOCUMENT_BASE("application/vnd.oasis.opendocument.base"), - APPLICATION_VND_OASIS_OPENDOCUMENT_CHART("application/vnd.oasis.opendocument.chart"), - APPLICATION_VND_OASIS_OPENDOCUMENT_CHART_TEMPLATE("application/vnd.oasis.opendocument.chart-template"), - APPLICATION_VND_OASIS_OPENDOCUMENT_DATABASE("application/vnd.oasis.opendocument.database"), - APPLICATION_VND_OASIS_OPENDOCUMENT_FORMULA("application/vnd.oasis.opendocument.formula"), - APPLICATION_VND_OASIS_OPENDOCUMENT_FORMULA_TEMPLATE("application/vnd.oasis.opendocument.formula-template"), - APPLICATION_VND_OASIS_OPENDOCUMENT_GRAPHICS("application/vnd.oasis.opendocument.graphics"), - APPLICATION_VND_OASIS_OPENDOCUMENT_GRAPHICS_TEMPLATE("application/vnd.oasis.opendocument.graphics-template"), - APPLICATION_VND_OASIS_OPENDOCUMENT_IMAGE("application/vnd.oasis.opendocument.image"), - APPLICATION_VND_OASIS_OPENDOCUMENT_IMAGE_TEMPLATE("application/vnd.oasis.opendocument.image-template"), - APPLICATION_VND_OASIS_OPENDOCUMENT_PRESENTATION("application/vnd.oasis.opendocument.presentation"), - APPLICATION_VND_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE("application/vnd.oasis.opendocument.presentation-template"), - APPLICATION_VND_OASIS_OPENDOCUMENT_SPREADSHEET("application/vnd.oasis.opendocument.spreadsheet"), - APPLICATION_VND_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE("application/vnd.oasis.opendocument.spreadsheet-template"), - APPLICATION_VND_OASIS_OPENDOCUMENT_TEXT("application/vnd.oasis.opendocument.text"), - APPLICATION_VND_OASIS_OPENDOCUMENT_TEXT_MASTER("application/vnd.oasis.opendocument.text-master"), - APPLICATION_VND_OASIS_OPENDOCUMENT_TEXT_MASTER_TEMPLATE("application/vnd.oasis.opendocument.text-master-template"), - APPLICATION_VND_OASIS_OPENDOCUMENT_TEXT_TEMPLATE("application/vnd.oasis.opendocument.text-template"), - APPLICATION_VND_OASIS_OPENDOCUMENT_TEXT_WEB("application/vnd.oasis.opendocument.text-web"), - APPLICATION_VND_OBN("application/vnd.obn"), - APPLICATION_VND_OCF_CBOR("application/vnd.ocf+cbor"), - APPLICATION_VND_OCI_IMAGE_MANIFEST_V1_JSON("application/vnd.oci.image.manifest.v1+json"), - APPLICATION_VND_OFTN_L10N_JSON("application/vnd.oftn.l10n+json"), - APPLICATION_VND_OIPF_CONTENTACCESSDOWNLOAD_XML("application/vnd.oipf.contentaccessdownload+xml"), - APPLICATION_VND_OIPF_CONTENTACCESSSTREAMING_XML("application/vnd.oipf.contentaccessstreaming+xml"), - APPLICATION_VND_OIPF_CSPG_HEXBINARY("application/vnd.oipf.cspg-hexbinary"), - APPLICATION_VND_OIPF_DAE_SVG_XML("application/vnd.oipf.dae.svg+xml"), - APPLICATION_VND_OIPF_DAE_XHTML_XML("application/vnd.oipf.dae.xhtml+xml"), - APPLICATION_VND_OIPF_MIPPVCONTROLMESSAGE_XML("application/vnd.oipf.mippvcontrolmessage+xml"), - APPLICATION_VND_OIPF_PAE_GEM("application/vnd.oipf.pae.gem"), - APPLICATION_VND_OIPF_SPDISCOVERY_XML("application/vnd.oipf.spdiscovery+xml"), - APPLICATION_VND_OIPF_SPDLIST_XML("application/vnd.oipf.spdlist+xml"), - APPLICATION_VND_OIPF_UEPROFILE_XML("application/vnd.oipf.ueprofile+xml"), - APPLICATION_VND_OIPF_USERPROFILE_XML("application/vnd.oipf.userprofile+xml"), - APPLICATION_VND_OLPC_SUGAR("application/vnd.olpc-sugar"), - APPLICATION_VND_OMA_BCAST_ASSOCIATED_PROCEDURE_PARAMETER_XML("application/vnd.oma.bcast.associated-procedure-parameter+xml"), - APPLICATION_VND_OMA_BCAST_DRM_TRIGGER_XML("application/vnd.oma.bcast.drm-trigger+xml"), - APPLICATION_VND_OMA_BCAST_IMD_XML("application/vnd.oma.bcast.imd+xml"), - APPLICATION_VND_OMA_BCAST_LTKM("application/vnd.oma.bcast.ltkm"), - APPLICATION_VND_OMA_BCAST_NOTIFICATION_XML("application/vnd.oma.bcast.notification+xml"), - APPLICATION_VND_OMA_BCAST_PROVISIONINGTRIGGER("application/vnd.oma.bcast.provisioningtrigger"), - APPLICATION_VND_OMA_BCAST_SGBOOT("application/vnd.oma.bcast.sgboot"), - APPLICATION_VND_OMA_BCAST_SGDD_XML("application/vnd.oma.bcast.sgdd+xml"), - APPLICATION_VND_OMA_BCAST_SGDU("application/vnd.oma.bcast.sgdu"), - APPLICATION_VND_OMA_BCAST_SIMPLE_SYMBOL_CONTAINER("application/vnd.oma.bcast.simple-symbol-container"), - APPLICATION_VND_OMA_BCAST_SMARTCARD_TRIGGER_XML("application/vnd.oma.bcast.smartcard-trigger+xml"), - APPLICATION_VND_OMA_BCAST_SPROV_XML("application/vnd.oma.bcast.sprov+xml"), - APPLICATION_VND_OMA_BCAST_STKM("application/vnd.oma.bcast.stkm"), - APPLICATION_VND_OMA_CAB_ADDRESS_BOOK_XML("application/vnd.oma.cab-address-book+xml"), - APPLICATION_VND_OMA_CAB_FEATURE_HANDLER_XML("application/vnd.oma.cab-feature-handler+xml"), - APPLICATION_VND_OMA_CAB_PCC_XML("application/vnd.oma.cab-pcc+xml"), - APPLICATION_VND_OMA_CAB_SUBS_INVITE_XML("application/vnd.oma.cab-subs-invite+xml"), - APPLICATION_VND_OMA_CAB_USER_PREFS_XML("application/vnd.oma.cab-user-prefs+xml"), - APPLICATION_VND_OMA_DCD("application/vnd.oma.dcd"), - APPLICATION_VND_OMA_DCDC("application/vnd.oma.dcdc"), - APPLICATION_VND_OMA_DD2_XML("application/vnd.oma.dd2+xml"), - APPLICATION_VND_OMA_DRM_RISD_XML("application/vnd.oma.drm.risd+xml"), - APPLICATION_VND_OMA_GROUP_USAGE_LIST_XML("application/vnd.oma.group-usage-list+xml"), - APPLICATION_VND_OMA_LWM2M_CBOR("application/vnd.oma.lwm2m+cbor"), - APPLICATION_VND_OMA_LWM2M_JSON("application/vnd.oma.lwm2m+json"), - APPLICATION_VND_OMA_LWM2M_TLV("application/vnd.oma.lwm2m+tlv"), - APPLICATION_VND_OMA_PAL_XML("application/vnd.oma.pal+xml"), - APPLICATION_VND_OMA_POC_DETAILED_PROGRESS_REPORT_XML("application/vnd.oma.poc.detailed-progress-report+xml"), - APPLICATION_VND_OMA_POC_FINAL_REPORT_XML("application/vnd.oma.poc.final-report+xml"), - APPLICATION_VND_OMA_POC_GROUPS_XML("application/vnd.oma.poc.groups+xml"), - APPLICATION_VND_OMA_POC_INVOCATION_DESCRIPTOR_XML("application/vnd.oma.poc.invocation-descriptor+xml"), - APPLICATION_VND_OMA_POC_OPTIMIZED_PROGRESS_REPORT_XML("application/vnd.oma.poc.optimized-progress-report+xml"), - APPLICATION_VND_OMA_PUSH("application/vnd.oma.push"), - APPLICATION_VND_OMA_SCIDM_MESSAGES_XML("application/vnd.oma.scidm.messages+xml"), - APPLICATION_VND_OMA_XCAP_DIRECTORY_XML("application/vnd.oma.xcap-directory+xml"), - APPLICATION_VND_OMADS_EMAIL_XML("application/vnd.omads-email+xml"), - APPLICATION_VND_OMADS_FILE_XML("application/vnd.omads-file+xml"), - APPLICATION_VND_OMADS_FOLDER_XML("application/vnd.omads-folder+xml"), - APPLICATION_VND_OMALOC_SUPL_INIT("application/vnd.omaloc-supl-init"), - APPLICATION_VND_OMA_SCWS_CONFIG("application/vnd.oma-scws-config"), - APPLICATION_VND_OMA_SCWS_HTTP_REQUEST("application/vnd.oma-scws-http-request"), - APPLICATION_VND_OMA_SCWS_HTTP_RESPONSE("application/vnd.oma-scws-http-response"), - APPLICATION_VND_OMS_CELLULAR_COSE_CONTENT_CBOR("application/vnd.oms.cellular-cose-content+cbor"), - APPLICATION_VND_ONEPAGER("application/vnd.onepager"), - APPLICATION_VND_ONEPAGERTAMP("application/vnd.onepagertamp"), - APPLICATION_VND_ONEPAGERTAMX("application/vnd.onepagertamx"), - APPLICATION_VND_ONEPAGERTAT("application/vnd.onepagertat"), - APPLICATION_VND_ONEPAGERTATP("application/vnd.onepagertatp"), - APPLICATION_VND_ONEPAGERTATX("application/vnd.onepagertatx"), - APPLICATION_VND_ONVIF_METADATA("application/vnd.onvif.metadata"), - APPLICATION_VND_OPENBLOX_GAME_BINARY("application/vnd.openblox.game-binary"), - APPLICATION_VND_OPENBLOX_GAME_XML("application/vnd.openblox.game+xml"), - APPLICATION_VND_OPENEYE_OEB("application/vnd.openeye.oeb"), - APPLICATION_VND_OPENPRINTTAG("application/vnd.openprinttag"), - APPLICATION_VND_OPENSTREETMAP_DATA_XML("application/vnd.openstreetmap.data+xml"), - APPLICATION_VND_OPENTIMESTAMPS_OTS("application/vnd.opentimestamps.ots"), - APPLICATION_VND_OPENVPI_DSPX_JSON("application/vnd.openvpi.dspx+json"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_CUSTOM_PROPERTIES_XML("application/vnd.openxmlformats-officedocument.custom-properties+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_CUSTOMXMLPROPERTIES_XML("application/vnd.openxmlformats-officedocument.customXmlProperties+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_DRAWING_XML("application/vnd.openxmlformats-officedocument.drawing+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_DRAWINGML_CHART_XML("application/vnd.openxmlformats-officedocument.drawingml.chart+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_DRAWINGML_CHARTSHAPES_XML("application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_DRAWINGML_DIAGRAMCOLORS_XML("application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_DRAWINGML_DIAGRAMDATA_XML("application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_DRAWINGML_DIAGRAMLAYOUT_XML("application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_DRAWINGML_DIAGRAMSTYLE_XML("application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_EXTENDED_PROPERTIES_XML("application/vnd.openxmlformats-officedocument.extended-properties+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_COMMENTAUTHORS_XML("application/vnd.openxmlformats-officedocument.presentationml.commentAuthors+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_COMMENTS_XML("application/vnd.openxmlformats-officedocument.presentationml.comments+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_HANDOUTMASTER_XML("application/vnd.openxmlformats-officedocument.presentationml.handoutMaster+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_NOTESMASTER_XML("application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_NOTESSLIDE_XML("application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_PRESENTATION("application/vnd.openxmlformats-officedocument.presentationml.presentation"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_PRESENTATION_MAIN_XML("application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_PRESPROPS_XML("application/vnd.openxmlformats-officedocument.presentationml.presProps+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_SLIDE("application/vnd.openxmlformats-officedocument.presentationml.slide"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_SLIDE_XML("application/vnd.openxmlformats-officedocument.presentationml.slide+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_SLIDELAYOUT_XML("application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_SLIDEMASTER_XML("application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_SLIDESHOW("application/vnd.openxmlformats-officedocument.presentationml.slideshow"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_SLIDESHOW_MAIN_XML("application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_SLIDEUPDATEINFO_XML("application/vnd.openxmlformats-officedocument.presentationml.slideUpdateInfo+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_TABLESTYLES_XML("application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_TAGS_XML("application/vnd.openxmlformats-officedocument.presentationml.tags+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_TEMPLATE("application/vnd.openxmlformats-officedocument.presentationml.template"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_TEMPLATE_MAIN_XML("application/vnd.openxmlformats-officedocument.presentationml.template.main+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_VIEWPROPS_XML("application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_CALCCHAIN_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_CHARTSHEET_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_COMMENTS_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_CONNECTIONS_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_DIALOGSHEET_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_EXTERNALLINK_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_PIVOTCACHEDEFINITION_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_PIVOTCACHERECORDS_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_PIVOTTABLE_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_QUERYTABLE_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_REVISIONHEADERS_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_REVISIONLOG_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHAREDSTRINGS_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEET("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEET_MAIN_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEETMETADATA_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_STYLES_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_TABLE_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_TABLESINGLECELLS_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_TEMPLATE("application/vnd.openxmlformats-officedocument.spreadsheetml.template"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_TEMPLATE_MAIN_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_USERNAMES_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_VOLATILEDEPENDENCIES_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_WORKSHEET_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_THEME_XML("application/vnd.openxmlformats-officedocument.theme+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_THEMEOVERRIDE_XML("application/vnd.openxmlformats-officedocument.themeOverride+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_VMLDRAWING("application/vnd.openxmlformats-officedocument.vmlDrawing"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_COMMENTS_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT("application/vnd.openxmlformats-officedocument.wordprocessingml.document"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT_GLOSSARY_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT_MAIN_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_ENDNOTES_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_FONTTABLE_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_FOOTER_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_FOOTNOTES_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_NUMBERING_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_SETTINGS_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_STYLES_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_TEMPLATE("application/vnd.openxmlformats-officedocument.wordprocessingml.template"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_TEMPLATE_MAIN_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml"), - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_WEBSETTINGS_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml"), - APPLICATION_VND_OPENXMLFORMATS_PACKAGE_CORE_PROPERTIES_XML("application/vnd.openxmlformats-package.core-properties+xml"), - APPLICATION_VND_OPENXMLFORMATS_PACKAGE_DIGITAL_SIGNATURE_XMLSIGNATURE_XML("application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml"), - APPLICATION_VND_OPENXMLFORMATS_PACKAGE_RELATIONSHIPS_XML("application/vnd.openxmlformats-package.relationships+xml"), - APPLICATION_VND_ORACLE_RESOURCE_JSON("application/vnd.oracle.resource+json"), - APPLICATION_VND_ORANGE_INDATA("application/vnd.orange.indata"), - APPLICATION_VND_OSA_NETDEPLOY("application/vnd.osa.netdeploy"), - APPLICATION_VND_OSGEO_MAPGUIDE_PACKAGE("application/vnd.osgeo.mapguide.package"), - APPLICATION_VND_OSGI_BUNDLE("application/vnd.osgi.bundle"), - APPLICATION_VND_OSGI_DP("application/vnd.osgi.dp"), - APPLICATION_VND_OSGI_SUBSYSTEM("application/vnd.osgi.subsystem"), - APPLICATION_VND_OTPS_CT_KIP_XML("application/vnd.otps.ct-kip+xml"), - APPLICATION_VND_OXLI_COUNTGRAPH("application/vnd.oxli.countgraph"), - APPLICATION_VND_PAGERDUTY_JSON("application/vnd.pagerduty+json"), - APPLICATION_VND_PALM("application/vnd.palm"), - APPLICATION_VND_PANOPLY("application/vnd.panoply"), - APPLICATION_VND_PAOS_XML("application/vnd.paos.xml"), - APPLICATION_VND_PATENTDIVE("application/vnd.patentdive"), - APPLICATION_VND_PATIENTECOMMSDOC("application/vnd.patientecommsdoc"), - APPLICATION_VND_PAWAAFILE("application/vnd.pawaafile"), - APPLICATION_VND_PCOS("application/vnd.pcos"), - APPLICATION_VND_PG_FORMAT("application/vnd.pg.format"), - APPLICATION_VND_PG_OSASLI("application/vnd.pg.osasli"), - APPLICATION_VND_PIACCESS_APPLICATION_LICENCE("application/vnd.piaccess.application-licence"), - APPLICATION_VND_PICSEL("application/vnd.picsel"), - APPLICATION_VND_PMI_WIDGET("application/vnd.pmi.widget"), - APPLICATION_VND_PMTILES("application/vnd.pmtiles"), - APPLICATION_VND_POC_GROUP_ADVERTISEMENT_XML("application/vnd.poc.group-advertisement+xml"), - APPLICATION_VND_POCKETLEARN("application/vnd.pocketlearn"), - APPLICATION_VND_POWERBUILDER6("application/vnd.powerbuilder6"), - APPLICATION_VND_POWERBUILDER6_S("application/vnd.powerbuilder6-s"), - APPLICATION_VND_POWERBUILDER7("application/vnd.powerbuilder7"), - APPLICATION_VND_POWERBUILDER75("application/vnd.powerbuilder75"), - APPLICATION_VND_POWERBUILDER75_S("application/vnd.powerbuilder75-s"), - APPLICATION_VND_POWERBUILDER7_S("application/vnd.powerbuilder7-s"), - APPLICATION_VND_PP_SYSTEMVERIFY_XML("application/vnd.pp.systemverify+xml"), - APPLICATION_VND_PREMINET("application/vnd.preminet"), - APPLICATION_VND_PREVIEWSYSTEMS_BOX("application/vnd.previewsystems.box"), - APPLICATION_VND_PROJECT_GRAPH("application/vnd.project-graph"), - APPLICATION_VND_PROTEUS_MAGAZINE("application/vnd.proteus.magazine"), - APPLICATION_VND_PSFS("application/vnd.psfs"), - APPLICATION_VND_PT_MUNDUSMUNDI("application/vnd.pt.mundusmundi"), - APPLICATION_VND_PUBLISHARE_DELTA_TREE("application/vnd.publishare-delta-tree"), - APPLICATION_VND_PVI_PTID1("application/vnd.pvi.ptid1"), - APPLICATION_VND_PWG_MULTIPLEXED("application/vnd.pwg-multiplexed"), - APPLICATION_VND_PWG_XHTML_PRINT_XML("application/vnd.pwg-xhtml-print+xml"), - APPLICATION_VND_PYON_JSON("application/vnd.pyon+json"), - APPLICATION_VND_QUALCOMM_BREW_APP_RES("application/vnd.qualcomm.brew-app-res"), - APPLICATION_VND_QUARANTAINENET("application/vnd.quarantainenet"), - APPLICATION_VND_QUARK_QUARKXPRESS("application/vnd.Quark.QuarkXPress"), - APPLICATION_VND_QUOBJECT_QUOXDOCUMENT("application/vnd.quobject-quoxdocument"), - APPLICATION_VND_R74N_SANDBOXELS_JSON("application/vnd.R74n.sandboxels+json"), - APPLICATION_VND_RADISYS_MOML_XML("application/vnd.radisys.moml+xml"), - APPLICATION_VND_RADISYS_MSML_AUDIT_CONF_XML("application/vnd.radisys.msml-audit-conf+xml"), - APPLICATION_VND_RADISYS_MSML_AUDIT_CONN_XML("application/vnd.radisys.msml-audit-conn+xml"), - APPLICATION_VND_RADISYS_MSML_AUDIT_DIALOG_XML("application/vnd.radisys.msml-audit-dialog+xml"), - APPLICATION_VND_RADISYS_MSML_AUDIT_STREAM_XML("application/vnd.radisys.msml-audit-stream+xml"), - APPLICATION_VND_RADISYS_MSML_AUDIT_XML("application/vnd.radisys.msml-audit+xml"), - APPLICATION_VND_RADISYS_MSML_CONF_XML("application/vnd.radisys.msml-conf+xml"), - APPLICATION_VND_RADISYS_MSML_DIALOG_BASE_XML("application/vnd.radisys.msml-dialog-base+xml"), - APPLICATION_VND_RADISYS_MSML_DIALOG_FAX_DETECT_XML("application/vnd.radisys.msml-dialog-fax-detect+xml"), - APPLICATION_VND_RADISYS_MSML_DIALOG_FAX_SENDRECV_XML("application/vnd.radisys.msml-dialog-fax-sendrecv+xml"), - APPLICATION_VND_RADISYS_MSML_DIALOG_GROUP_XML("application/vnd.radisys.msml-dialog-group+xml"), - APPLICATION_VND_RADISYS_MSML_DIALOG_SPEECH_XML("application/vnd.radisys.msml-dialog-speech+xml"), - APPLICATION_VND_RADISYS_MSML_DIALOG_TRANSFORM_XML("application/vnd.radisys.msml-dialog-transform+xml"), - APPLICATION_VND_RADISYS_MSML_DIALOG_XML("application/vnd.radisys.msml-dialog+xml"), - APPLICATION_VND_RADISYS_MSML_XML("application/vnd.radisys.msml+xml"), - APPLICATION_VND_RAINSTOR_DATA("application/vnd.rainstor.data"), - APPLICATION_VND_RAPID("application/vnd.rapid"), - APPLICATION_VND_RAR("application/vnd.rar"), - APPLICATION_VND_REALVNC_BED("application/vnd.realvnc.bed"), - APPLICATION_VND_RECORDARE_MUSICXML("application/vnd.recordare.musicxml"), - APPLICATION_VND_RECORDARE_MUSICXML_XML("application/vnd.recordare.musicxml+xml"), - APPLICATION_VND_RELPIPE("application/vnd.relpipe"), - APPLICATION_VND_RENLEARN_RLPRINT("application/vnd.RenLearn.rlprint"), - APPLICATION_VND_RESILIENT_LOGIC("application/vnd.resilient.logic"), - APPLICATION_VND_RESTFUL_JSON("application/vnd.restful+json"), - APPLICATION_VND_RIG_CRYPTONOTE("application/vnd.rig.cryptonote"), - APPLICATION_VND_ROUTE66_LINK66_XML("application/vnd.route66.link66+xml"), - APPLICATION_VND_RS_274X("application/vnd.rs-274x"), - APPLICATION_VND_RUCKUS_DOWNLOAD("application/vnd.ruckus.download"), - APPLICATION_VND_S3SMS("application/vnd.s3sms"), - APPLICATION_VND_SAILINGTRACKER_TRACK("application/vnd.sailingtracker.track"), - APPLICATION_VND_SAR("application/vnd.sar"), - APPLICATION_VND_SBM_CID("application/vnd.sbm.cid"), - APPLICATION_VND_SBM_MID2("application/vnd.sbm.mid2"), - APPLICATION_VND_SCRIBUS("application/vnd.scribus"), - APPLICATION_VND_SEALED_3DF("application/vnd.sealed.3df"), - APPLICATION_VND_SEALED_CSF("application/vnd.sealed.csf"), - APPLICATION_VND_SEALED_DOC("application/vnd.sealed.doc"), - APPLICATION_VND_SEALED_EML("application/vnd.sealed.eml"), - APPLICATION_VND_SEALED_MHT("application/vnd.sealed.mht"), - APPLICATION_VND_SEALED_NET("application/vnd.sealed.net"), - APPLICATION_VND_SEALED_PPT("application/vnd.sealed.ppt"), - APPLICATION_VND_SEALED_TIFF("application/vnd.sealed.tiff"), - APPLICATION_VND_SEALED_XLS("application/vnd.sealed.xls"), - APPLICATION_VND_SEALEDMEDIA_SOFTSEAL_HTML("application/vnd.sealedmedia.softseal.html"), - APPLICATION_VND_SEALEDMEDIA_SOFTSEAL_PDF("application/vnd.sealedmedia.softseal.pdf"), - APPLICATION_VND_SEEMAIL("application/vnd.seemail"), - APPLICATION_VND_SEIS_JSON("application/vnd.seis+json"), - APPLICATION_VND_SEMA("application/vnd.sema"), - APPLICATION_VND_SEMD("application/vnd.semd"), - APPLICATION_VND_SEMF("application/vnd.semf"), - APPLICATION_VND_SHADE_SAVE_FILE("application/vnd.shade-save-file"), - APPLICATION_VND_SHANA_INFORMED_FORMDATA("application/vnd.shana.informed.formdata"), - APPLICATION_VND_SHANA_INFORMED_FORMTEMPLATE("application/vnd.shana.informed.formtemplate"), - APPLICATION_VND_SHANA_INFORMED_INTERCHANGE("application/vnd.shana.informed.interchange"), - APPLICATION_VND_SHANA_INFORMED_PACKAGE("application/vnd.shana.informed.package"), - APPLICATION_VND_SHOOTPROOF_JSON("application/vnd.shootproof+json"), - APPLICATION_VND_SHOPKICK_JSON("application/vnd.shopkick+json"), - APPLICATION_VND_SHP("application/vnd.shp"), - APPLICATION_VND_SHX("application/vnd.shx"), - APPLICATION_VND_SIGROK_SESSION("application/vnd.sigrok.session"), - APPLICATION_VND_SIMTECH_MINDMAPPER("application/vnd.SimTech-MindMapper"), - APPLICATION_VND_SIREN_JSON("application/vnd.siren+json"), - APPLICATION_VND_SIRTX_VMV0("application/vnd.sirtx.vmv0"), - APPLICATION_VND_SKETCHOMETRY("application/vnd.sketchometry"), - APPLICATION_VND_SMAF("application/vnd.smaf"), - APPLICATION_VND_SMART_NOTEBOOK("application/vnd.smart.notebook"), - APPLICATION_VND_SMART_TEACHER("application/vnd.smart.teacher"), - APPLICATION_VND_SMINTIO_PORTALS_ARCHIVE("application/vnd.smintio.portals.archive"), - APPLICATION_VND_SNESDEV_PAGE_TABLE("application/vnd.snesdev-page-table"), - APPLICATION_VND_SOFTWARE602_FILLER_FORM_XML("application/vnd.software602.filler.form+xml"), - APPLICATION_VND_SOFTWARE602_FILLER_FORM_XML_ZIP("application/vnd.software602.filler.form-xml-zip"), - APPLICATION_VND_SOLENT_SDKM_XML("application/vnd.solent.sdkm+xml"), - APPLICATION_VND_SPOTFIRE_DXP("application/vnd.spotfire.dxp"), - APPLICATION_VND_SPOTFIRE_SFS("application/vnd.spotfire.sfs"), - APPLICATION_VND_SQLITE3("application/vnd.sqlite3"), - APPLICATION_VND_SSS_COD("application/vnd.sss-cod"), - APPLICATION_VND_SSS_DTF("application/vnd.sss-dtf"), - APPLICATION_VND_SSS_NTF("application/vnd.sss-ntf"), - APPLICATION_VND_STEPMANIA_PACKAGE("application/vnd.stepmania.package"), - APPLICATION_VND_STEPMANIA_STEPCHART("application/vnd.stepmania.stepchart"), - APPLICATION_VND_STREET_STREAM("application/vnd.street-stream"), - APPLICATION_VND_SUN_WADL_XML("application/vnd.sun.wadl+xml"), - APPLICATION_VND_SUPERFILE_SUPER("application/vnd.superfile.super"), - APPLICATION_VND_SUS_CALENDAR("application/vnd.sus-calendar"), - APPLICATION_VND_SVD("application/vnd.svd"), - APPLICATION_VND_SWIFTVIEW_ICS("application/vnd.swiftview-ics"), - APPLICATION_VND_SYBYL_MOL2("application/vnd.sybyl.mol2"), - APPLICATION_VND_SYCLE_XML("application/vnd.sycle+xml"), - APPLICATION_VND_SYFT_JSON("application/vnd.syft+json"), - APPLICATION_VND_SYNCML_DM_NOTIFICATION("application/vnd.syncml.dm.notification"), - APPLICATION_VND_SYNCML_DMDDF_XML("application/vnd.syncml.dmddf+xml"), - APPLICATION_VND_SYNCML_DMTNDS_WBXML("application/vnd.syncml.dmtnds+wbxml"), - APPLICATION_VND_SYNCML_DMTNDS_XML("application/vnd.syncml.dmtnds+xml"), - APPLICATION_VND_SYNCML_DMDDF_WBXML("application/vnd.syncml.dmddf+wbxml"), - APPLICATION_VND_SYNCML_DM_WBXML("application/vnd.syncml.dm+wbxml"), - APPLICATION_VND_SYNCML_DM_XML("application/vnd.syncml.dm+xml"), - APPLICATION_VND_SYNCML_DS_NOTIFICATION("application/vnd.syncml.ds.notification"), - APPLICATION_VND_SYNCML_XML("application/vnd.syncml+xml"), - APPLICATION_VND_TABLESCHEMA_JSON("application/vnd.tableschema+json"), - APPLICATION_VND_TAO_INTENT_MODULE_ARCHIVE("application/vnd.tao.intent-module-archive"), - APPLICATION_VND_TCPDUMP_PCAP("application/vnd.tcpdump.pcap"), - APPLICATION_VND_THINK_CELL_PPTTC_JSON("application/vnd.think-cell.ppttc+json"), - APPLICATION_VND_TML("application/vnd.tml"), - APPLICATION_VND_TMD_MEDIAFLEX_API_XML("application/vnd.tmd.mediaflex.api+xml"), - APPLICATION_VND_TMOBILE_LIVETV("application/vnd.tmobile-livetv"), - APPLICATION_VND_TRI_ONESOURCE("application/vnd.tri.onesource"), - APPLICATION_VND_TRID_TPT("application/vnd.trid.tpt"), - APPLICATION_VND_TRISCAPE_MXS("application/vnd.triscape.mxs"), - APPLICATION_VND_TRUEAPP("application/vnd.trueapp"), - APPLICATION_VND_TRUEDOC("application/vnd.truedoc"), - APPLICATION_VND_UBISOFT_WEBPLAYER("application/vnd.ubisoft.webplayer"), - APPLICATION_VND_UFDL("application/vnd.ufdl"), - APPLICATION_VND_UIC_DOSIPAS_V1("application/vnd.uic.dosipas.v1"), - APPLICATION_VND_UIC_DOSIPAS_V2("application/vnd.uic.dosipas.v2"), - APPLICATION_VND_UIC_OSDM_JSON("application/vnd.uic.osdm+json"), - APPLICATION_VND_UIC_TLB_FCB("application/vnd.uic.tlb-fcb"), - APPLICATION_VND_UIQ_THEME("application/vnd.uiq.theme"), - APPLICATION_VND_UMAJIN("application/vnd.umajin"), - APPLICATION_VND_UNITY("application/vnd.unity"), - APPLICATION_VND_UOML_XML("application/vnd.uoml+xml"), - APPLICATION_VND_UPLANET_ALERT("application/vnd.uplanet.alert"), - APPLICATION_VND_UPLANET_ALERT_WBXML("application/vnd.uplanet.alert-wbxml"), - APPLICATION_VND_UPLANET_BEARER_CHOICE("application/vnd.uplanet.bearer-choice"), - APPLICATION_VND_UPLANET_BEARER_CHOICE_WBXML("application/vnd.uplanet.bearer-choice-wbxml"), - APPLICATION_VND_UPLANET_CACHEOP("application/vnd.uplanet.cacheop"), - APPLICATION_VND_UPLANET_CACHEOP_WBXML("application/vnd.uplanet.cacheop-wbxml"), - APPLICATION_VND_UPLANET_CHANNEL("application/vnd.uplanet.channel"), - APPLICATION_VND_UPLANET_CHANNEL_WBXML("application/vnd.uplanet.channel-wbxml"), - APPLICATION_VND_UPLANET_LIST("application/vnd.uplanet.list"), - APPLICATION_VND_UPLANET_LISTCMD("application/vnd.uplanet.listcmd"), - APPLICATION_VND_UPLANET_LISTCMD_WBXML("application/vnd.uplanet.listcmd-wbxml"), - APPLICATION_VND_UPLANET_LIST_WBXML("application/vnd.uplanet.list-wbxml"), - APPLICATION_VND_URI_MAP("application/vnd.uri-map"), - APPLICATION_VND_UPLANET_SIGNAL("application/vnd.uplanet.signal"), - APPLICATION_VND_VALVE_SOURCE_MATERIAL("application/vnd.valve.source.material"), - APPLICATION_VND_VCX("application/vnd.vcx"), - APPLICATION_VND_VD_STUDY("application/vnd.vd-study"), - APPLICATION_VND_VECTORWORKS("application/vnd.vectorworks"), - APPLICATION_VND_VEL_JSON("application/vnd.vel+json"), - APPLICATION_VND_VERAISON_TSM_REPORT_CBOR("application/vnd.veraison.tsm-report+cbor"), - APPLICATION_VND_VERAISON_TSM_REPORT_JSON("application/vnd.veraison.tsm-report+json"), - APPLICATION_VND_VERIFIER_ATTESTATION_JWT("application/vnd.verifier-attestation+jwt"), - APPLICATION_VND_VERIMATRIX_VCAS("application/vnd.verimatrix.vcas"), - APPLICATION_VND_VERITONE_AION_JSON("application/vnd.veritone.aion+json"), - APPLICATION_VND_VERYANT_THIN("application/vnd.veryant.thin"), - APPLICATION_VND_VES_ENCRYPTED("application/vnd.ves.encrypted"), - APPLICATION_VND_VIDSOFT_VIDCONFERENCE("application/vnd.vidsoft.vidconference"), - APPLICATION_VND_VISIO("application/vnd.visio"), - APPLICATION_VND_VISIONARY("application/vnd.visionary"), - APPLICATION_VND_VIVIDENCE_SCRIPTFILE("application/vnd.vividence.scriptfile"), - APPLICATION_VND_VOCALSHAPER_VSP4("application/vnd.vocalshaper.vsp4"), - APPLICATION_VND_VSF("application/vnd.vsf"), - APPLICATION_VND_VUQ("application/vnd.vuq"), - APPLICATION_VND_WANTVERSE("application/vnd.wantverse"), - APPLICATION_VND_WAP_SIC("application/vnd.wap.sic"), - APPLICATION_VND_WAP_SLC("application/vnd.wap.slc"), - APPLICATION_VND_WAP_WBXML("application/vnd.wap.wbxml"), - APPLICATION_VND_WAP_WMLC("application/vnd.wap.wmlc"), - APPLICATION_VND_WAP_WMLSCRIPTC("application/vnd.wap.wmlscriptc"), - APPLICATION_VND_WASMFLOW_WAFL("application/vnd.wasmflow.wafl"), - APPLICATION_VND_WEBTURBO("application/vnd.webturbo"), - APPLICATION_VND_WFA_DPP("application/vnd.wfa.dpp"), - APPLICATION_VND_WFA_P2P("application/vnd.wfa.p2p"), - APPLICATION_VND_WFA_WSC("application/vnd.wfa.wsc"), - APPLICATION_VND_WINDOWS_DEVICEPAIRING("application/vnd.windows.devicepairing"), - APPLICATION_VND_WMAP("application/vnd.wmap"), - APPLICATION_VND_WMC("application/vnd.wmc"), - APPLICATION_VND_WMF_BOOTSTRAP("application/vnd.wmf.bootstrap"), - APPLICATION_VND_WOLFRAM_MATHEMATICA("application/vnd.wolfram.mathematica"), - APPLICATION_VND_WOLFRAM_MATHEMATICA_PACKAGE("application/vnd.wolfram.mathematica.package"), - APPLICATION_VND_WOLFRAM_PLAYER("application/vnd.wolfram.player"), - APPLICATION_VND_WORDLIFT("application/vnd.wordlift"), - APPLICATION_VND_WORDPERFECT("application/vnd.wordperfect"), - APPLICATION_VND_WQD("application/vnd.wqd"), - APPLICATION_VND_WRQ_HP3000_LABELLED("application/vnd.wrq-hp3000-labelled"), - APPLICATION_VND_WT_STF("application/vnd.wt.stf"), - APPLICATION_VND_WV_CSP_XML("application/vnd.wv.csp+xml"), - APPLICATION_VND_WV_CSP_WBXML("application/vnd.wv.csp+wbxml"), - APPLICATION_VND_WV_SSP_XML("application/vnd.wv.ssp+xml"), - APPLICATION_VND_XACML_JSON("application/vnd.xacml+json"), - APPLICATION_VND_XARA("application/vnd.xara"), - APPLICATION_VND_XARIN_CPJ("application/vnd.xarin.cpj"), - APPLICATION_VND_XCDN("application/vnd.xcdn"), - APPLICATION_VND_XECRETS_ENCRYPTED("application/vnd.xecrets-encrypted"), - APPLICATION_VND_XFDL("application/vnd.xfdl"), - APPLICATION_VND_XFDL_WEBFORM("application/vnd.xfdl.webform"), - APPLICATION_VND_XMI_XML("application/vnd.xmi+xml"), - APPLICATION_VND_XMPIE_CPKG("application/vnd.xmpie.cpkg"), - APPLICATION_VND_XMPIE_DPKG("application/vnd.xmpie.dpkg"), - APPLICATION_VND_XMPIE_PLAN("application/vnd.xmpie.plan"), - APPLICATION_VND_XMPIE_PPKG("application/vnd.xmpie.ppkg"), - APPLICATION_VND_XMPIE_XLIM("application/vnd.xmpie.xlim"), - APPLICATION_VND_YAMAHA_HV_DIC("application/vnd.yamaha.hv-dic"), - APPLICATION_VND_YAMAHA_HV_SCRIPT("application/vnd.yamaha.hv-script"), - APPLICATION_VND_YAMAHA_HV_VOICE("application/vnd.yamaha.hv-voice"), - APPLICATION_VND_YAMAHA_OPENSCOREFORMAT_OSFPVG_XML("application/vnd.yamaha.openscoreformat.osfpvg+xml"), - APPLICATION_VND_YAMAHA_OPENSCOREFORMAT("application/vnd.yamaha.openscoreformat"), - APPLICATION_VND_YAMAHA_REMOTE_SETUP("application/vnd.yamaha.remote-setup"), - APPLICATION_VND_YAMAHA_SMAF_AUDIO("application/vnd.yamaha.smaf-audio"), - APPLICATION_VND_YAMAHA_SMAF_PHRASE("application/vnd.yamaha.smaf-phrase"), - APPLICATION_VND_YAMAHA_THROUGH_NGN("application/vnd.yamaha.through-ngn"), - APPLICATION_VND_YAMAHA_TUNNEL_UDPENCAP("application/vnd.yamaha.tunnel-udpencap"), - APPLICATION_VND_YAOWEME("application/vnd.yaoweme"), - APPLICATION_VND_YELLOWRIVER_CUSTOM_MENU("application/vnd.yellowriver-custom-menu"), - APPLICATION_VND_YOUTUBE_YT("application/vnd.youtube.yt"), - APPLICATION_VND_ZOHO_PRESENTATION_SHOW("application/vnd.zoho-presentation.show"), - APPLICATION_VND_ZUL("application/vnd.zul"), - APPLICATION_VND_ZZAZZ_DECK_XML("application/vnd.zzazz.deck+xml"), - APPLICATION_VOICEXML_XML("application/voicexml+xml"), - APPLICATION_VOUCHER_CMS_JSON("application/voucher-cms+json"), - APPLICATION_VOUCHER_JWS_JSON("application/voucher-jws+json"), - APPLICATION_VP("application/vp"), - APPLICATION_VP_COSE("application/vp+cose"), - APPLICATION_VP_JWT("application/vp+jwt"), - APPLICATION_VP_SD_JWT("application/vp+sd-jwt"), - APPLICATION_VQ_RTCPXR("application/vq-rtcpxr"), - APPLICATION_WASM("application/wasm"), - APPLICATION_WATCHERINFO_XML("application/watcherinfo+xml"), - APPLICATION_WEBPUSH_OPTIONS_JSON("application/webpush-options+json"), - APPLICATION_WHOISPP_QUERY("application/whoispp-query"), - APPLICATION_WHOISPP_RESPONSE("application/whoispp-response"), - APPLICATION_WIDGET("application/widget"), - APPLICATION_WITA("application/wita"), - APPLICATION_WORDPERFECT5_1("application/wordperfect5.1"), - APPLICATION_WSDL_XML("application/wsdl+xml"), - APPLICATION_WSPOLICY_XML("application/wspolicy+xml"), - APPLICATION_X_PKI_MESSAGE("application/x-pki-message"), - APPLICATION_X_WWW_FORM_URLENCODED("application/x-www-form-urlencoded"), - APPLICATION_X_X509_CA_CERT("application/x-x509-ca-cert"), - APPLICATION_X_X509_CA_RA_CERT("application/x-x509-ca-ra-cert"), - APPLICATION_X_X509_NEXT_CA_CERT("application/x-x509-next-ca-cert"), - APPLICATION_X400_BP("application/x400-bp"), - APPLICATION_XACML_XML("application/xacml+xml"), - APPLICATION_XCAP_ATT_XML("application/xcap-att+xml"), - APPLICATION_XCAP_CAPS_XML("application/xcap-caps+xml"), - APPLICATION_XCAP_DIFF_XML("application/xcap-diff+xml"), - APPLICATION_XCAP_EL_XML("application/xcap-el+xml"), - APPLICATION_XCAP_ERROR_XML("application/xcap-error+xml"), - APPLICATION_XCAP_NS_XML("application/xcap-ns+xml"), - APPLICATION_XCON_CONFERENCE_INFO_DIFF_XML("application/xcon-conference-info-diff+xml"), - APPLICATION_XCON_CONFERENCE_INFO_XML("application/xcon-conference-info+xml"), - APPLICATION_XENC_XML("application/xenc+xml"), - APPLICATION_XFDF("application/xfdf"), - APPLICATION_XHTML_XML("application/xhtml+xml"), - APPLICATION_XLIFF_XML("application/xliff+xml"), - APPLICATION_XML("application/xml"), - APPLICATION_XML_DTD("application/xml-dtd"), - APPLICATION_XML_EXTERNAL_PARSED_ENTITY("application/xml-external-parsed-entity"), - APPLICATION_XML_PATCH_XML("application/xml-patch+xml"), - APPLICATION_XMPP_XML("application/xmpp+xml"), - APPLICATION_XOP_XML("application/xop+xml"), - APPLICATION_XSLT_XML("application/xslt+xml"), - APPLICATION_XV_XML("application/xv+xml"), - APPLICATION_YAML("application/yaml"), - APPLICATION_YANG("application/yang"), - APPLICATION_YANG_DATA_CBOR("application/yang-data+cbor"), - APPLICATION_YANG_DATA_JSON("application/yang-data+json"), - APPLICATION_YANG_DATA_XML("application/yang-data+xml"), - APPLICATION_YANG_PATCH_JSON("application/yang-patch+json"), - APPLICATION_YANG_PATCH_XML("application/yang-patch+xml"), - APPLICATION_YANG_SID_JSON("application/yang-sid+json"), - APPLICATION_YIN_XML("application/yin+xml"), - APPLICATION_ZIP("application/zip"), - APPLICATION_ZLIB("application/zlib"), - APPLICATION_ZSTD("application/zstd"), - AUDIO_1D_INTERLEAVED_PARITYFEC("audio/1d-interleaved-parityfec"), - AUDIO_32KADPCM("audio/32kadpcm"), - AUDIO_3GPP("audio/3gpp"), - AUDIO_3GPP2("audio/3gpp2"), - AUDIO_AAC("audio/aac"), - AUDIO_AC3("audio/ac3"), - AUDIO_AMR("audio/AMR"), - AUDIO_AMR_WB("audio/AMR-WB"), - AUDIO_AMR_WB_("audio/amr-wb+"), - AUDIO_APTX("audio/aptx"), - AUDIO_ASC("audio/asc"), - AUDIO_ATRAC_ADVANCED_LOSSLESS("audio/ATRAC-ADVANCED-LOSSLESS"), - AUDIO_ATRAC_X("audio/ATRAC-X"), - AUDIO_ATRAC3("audio/ATRAC3"), - AUDIO_BASIC("audio/basic"), - AUDIO_BV16("audio/BV16"), - AUDIO_BV32("audio/BV32"), - AUDIO_CLEARMODE("audio/clearmode"), - AUDIO_CN("audio/CN"), - AUDIO_DAT12("audio/DAT12"), - AUDIO_DLS("audio/dls"), - AUDIO_DSR_ES201108("audio/dsr-es201108"), - AUDIO_DSR_ES202050("audio/dsr-es202050"), - AUDIO_DSR_ES202211("audio/dsr-es202211"), - AUDIO_DSR_ES202212("audio/dsr-es202212"), - AUDIO_DV("audio/DV"), - AUDIO_DVI4("audio/DVI4"), - AUDIO_EAC3("audio/eac3"), - AUDIO_ENCAPRTP("audio/encaprtp"), - AUDIO_EVRC("audio/EVRC"), - AUDIO_EVRC_QCP("audio/EVRC-QCP"), - AUDIO_EVRC0("audio/EVRC0"), - AUDIO_EVRC1("audio/EVRC1"), - AUDIO_EVRCB("audio/EVRCB"), - AUDIO_EVRCB0("audio/EVRCB0"), - AUDIO_EVRCB1("audio/EVRCB1"), - AUDIO_EVRCNW("audio/EVRCNW"), - AUDIO_EVRCNW0("audio/EVRCNW0"), - AUDIO_EVRCNW1("audio/EVRCNW1"), - AUDIO_EVRCWB("audio/EVRCWB"), - AUDIO_EVRCWB0("audio/EVRCWB0"), - AUDIO_EVRCWB1("audio/EVRCWB1"), - AUDIO_EVS("audio/EVS"), - AUDIO_EXAMPLE("audio/example"), - AUDIO_FLAC("audio/flac"), - AUDIO_FLEXFEC("audio/flexfec"), - AUDIO_FWDRED("audio/fwdred"), - AUDIO_G711_0("audio/G711-0"), - AUDIO_G719("audio/G719"), - AUDIO_G7221("audio/G7221"), - AUDIO_G722("audio/G722"), - AUDIO_G723("audio/G723"), - AUDIO_G726_16("audio/G726-16"), - AUDIO_G726_24("audio/G726-24"), - AUDIO_G726_32("audio/G726-32"), - AUDIO_G726_40("audio/G726-40"), - AUDIO_G728("audio/G728"), - AUDIO_G729("audio/G729"), - AUDIO_G7291("audio/G7291"), - AUDIO_G729D("audio/G729D"), - AUDIO_G729E("audio/G729E"), - AUDIO_GSM("audio/GSM"), - AUDIO_GSM_EFR("audio/GSM-EFR"), - AUDIO_GSM_HR_08("audio/GSM-HR-08"), - AUDIO_ILBC("audio/iLBC"), - AUDIO_IP_MR_V2_5("audio/ip-mr_v2.5"), - AUDIO_L8("audio/L8"), - AUDIO_L16("audio/L16"), - AUDIO_L20("audio/L20"), - AUDIO_L24("audio/L24"), - AUDIO_LPC("audio/LPC"), - AUDIO_MATROSKA("audio/matroska"), - AUDIO_MELP("audio/MELP"), - AUDIO_MELP600("audio/MELP600"), - AUDIO_MELP1200("audio/MELP1200"), - AUDIO_MELP2400("audio/MELP2400"), - AUDIO_MHAS("audio/mhas"), - AUDIO_MIDI_CLIP("audio/midi-clip"), - AUDIO_MOBILE_XMF("audio/mobile-xmf"), - AUDIO_MPA("audio/MPA"), - AUDIO_MP4("audio/mp4"), - AUDIO_MP4A_LATM("audio/MP4A-LATM"), - AUDIO_MPA_ROBUST("audio/mpa-robust"), - AUDIO_MPEG("audio/mpeg"), - AUDIO_MPEG4_GENERIC("audio/mpeg4-generic"), - AUDIO_OGG("audio/ogg"), - AUDIO_OPUS("audio/opus"), - AUDIO_PARITYFEC("audio/parityfec"), - AUDIO_PCMA("audio/PCMA"), - AUDIO_PCMA_WB("audio/PCMA-WB"), - AUDIO_PCMU("audio/PCMU"), - AUDIO_PCMU_WB("audio/PCMU-WB"), - AUDIO_PRS_SID("audio/prs.sid"), - AUDIO_QCELP("audio/QCELP"), - AUDIO_RAPTORFEC("audio/raptorfec"), - AUDIO_RED("audio/RED"), - AUDIO_RTP_ENC_AESCM128("audio/rtp-enc-aescm128"), - AUDIO_RTPLOOPBACK("audio/rtploopback"), - AUDIO_RTP_MIDI("audio/rtp-midi"), - AUDIO_RTX("audio/rtx"), - AUDIO_SCIP("audio/scip"), - AUDIO_SMV("audio/SMV"), - AUDIO_SMV0("audio/SMV0"), - AUDIO_SMV_QCP("audio/SMV-QCP"), - AUDIO_SOFA("audio/sofa"), - AUDIO_SOUNDFONT("audio/soundfont"), - AUDIO_SP_MIDI("audio/sp-midi"), - AUDIO_SPEEX("audio/speex"), - AUDIO_T140C("audio/t140c"), - AUDIO_T38("audio/t38"), - AUDIO_TELEPHONE_EVENT("audio/telephone-event"), - AUDIO_TETRA_ACELP("audio/TETRA_ACELP"), - AUDIO_TETRA_ACELP_BB("audio/TETRA_ACELP_BB"), - AUDIO_TONE("audio/tone"), - AUDIO_TSVCIS("audio/TSVCIS"), - AUDIO_UEMCLIP("audio/UEMCLIP"), - AUDIO_ULPFEC("audio/ulpfec"), - AUDIO_USAC("audio/usac"), - AUDIO_VDVI("audio/VDVI"), - AUDIO_VMR_WB("audio/VMR-WB"), - AUDIO_VND_3GPP_IUFP("audio/vnd.3gpp.iufp"), - AUDIO_VND_4SB("audio/vnd.4SB"), - AUDIO_VND_AUDIOKOZ("audio/vnd.audiokoz"), - AUDIO_VND_BLOCKFACT_FACTA("audio/vnd.blockfact.facta"), - AUDIO_VND_CELP("audio/vnd.CELP"), - AUDIO_VND_CISCO_NSE("audio/vnd.cisco.nse"), - AUDIO_VND_CMLES_RADIO_EVENTS("audio/vnd.cmles.radio-events"), - AUDIO_VND_CNS_ANP1("audio/vnd.cns.anp1"), - AUDIO_VND_CNS_INF1("audio/vnd.cns.inf1"), - AUDIO_VND_DECE_AUDIO("audio/vnd.dece.audio"), - AUDIO_VND_DIGITAL_WINDS("audio/vnd.digital-winds"), - AUDIO_VND_DLNA_ADTS("audio/vnd.dlna.adts"), - AUDIO_VND_DOLBY_HEAAC_1("audio/vnd.dolby.heaac.1"), - AUDIO_VND_DOLBY_HEAAC_2("audio/vnd.dolby.heaac.2"), - AUDIO_VND_DOLBY_MLP("audio/vnd.dolby.mlp"), - AUDIO_VND_DOLBY_MPS("audio/vnd.dolby.mps"), - AUDIO_VND_DOLBY_PL2("audio/vnd.dolby.pl2"), - AUDIO_VND_DOLBY_PL2X("audio/vnd.dolby.pl2x"), - AUDIO_VND_DOLBY_PL2Z("audio/vnd.dolby.pl2z"), - AUDIO_VND_DOLBY_PULSE_1("audio/vnd.dolby.pulse.1"), - AUDIO_VND_DRA("audio/vnd.dra"), - AUDIO_VND_DTS("audio/vnd.dts"), - AUDIO_VND_DTS_HD("audio/vnd.dts.hd"), - AUDIO_VND_DTS_UHD("audio/vnd.dts.uhd"), - AUDIO_VND_DVB_FILE("audio/vnd.dvb.file"), - AUDIO_VND_EVERAD_PLJ("audio/vnd.everad.plj"), - AUDIO_VND_HNS_AUDIO("audio/vnd.hns.audio"), - AUDIO_VND_LUCENT_VOICE("audio/vnd.lucent.voice"), - AUDIO_VND_MS_PLAYREADY_MEDIA_PYA("audio/vnd.ms-playready.media.pya"), - AUDIO_VND_NOKIA_MOBILE_XMF("audio/vnd.nokia.mobile-xmf"), - AUDIO_VND_NORTEL_VBK("audio/vnd.nortel.vbk"), - AUDIO_VND_NUERA_ECELP4800("audio/vnd.nuera.ecelp4800"), - AUDIO_VND_NUERA_ECELP7470("audio/vnd.nuera.ecelp7470"), - AUDIO_VND_NUERA_ECELP9600("audio/vnd.nuera.ecelp9600"), - AUDIO_VND_OCTEL_SBC("audio/vnd.octel.sbc"), - AUDIO_VND_PRESONUS_MULTITRACK("audio/vnd.presonus.multitrack"), - AUDIO_VND_QCELP("audio/vnd.qcelp"), - AUDIO_VND_RHETOREX_32KADPCM("audio/vnd.rhetorex.32kadpcm"), - AUDIO_VND_RIP("audio/vnd.rip"), - AUDIO_VND_SEALEDMEDIA_SOFTSEAL_MPEG("audio/vnd.sealedmedia.softseal.mpeg"), - AUDIO_VND_VMX_CVSD("audio/vnd.vmx.cvsd"), - AUDIO_VORBIS("audio/vorbis"), - AUDIO_VORBIS_CONFIG("audio/vorbis-config"), - FONT_COLLECTION("font/collection"), - FONT_OTF("font/otf"), - FONT_SFNT("font/sfnt"), - FONT_TTF("font/ttf"), - FONT_WOFF("font/woff"), - FONT_WOFF2("font/woff2"), - HAPTICS_IVS("haptics/ivs"), - HAPTICS_HJIF("haptics/hjif"), - HAPTICS_HMPG("haptics/hmpg"), - IMAGE_ACES("image/aces"), - IMAGE_APNG("image/apng"), - IMAGE_AVCI("image/avci"), - IMAGE_AVCS("image/avcs"), - IMAGE_AVIF("image/avif"), - IMAGE_BMP("image/bmp"), - IMAGE_CGM("image/cgm"), - IMAGE_DICOM_RLE("image/dicom-rle"), - IMAGE_DPX("image/dpx"), - IMAGE_EMF("image/emf"), - IMAGE_EXAMPLE("image/example"), - IMAGE_FITS("image/fits"), - IMAGE_G3FAX("image/g3fax"), - IMAGE_GIF("image/gif"), - IMAGE_HEIC("image/heic"), - IMAGE_HEIC_SEQUENCE("image/heic-sequence"), - IMAGE_HEIF("image/heif"), - IMAGE_HEIF_SEQUENCE("image/heif-sequence"), - IMAGE_HEJ2K("image/hej2k"), - IMAGE_HSJ2("image/hsj2"), - IMAGE_IEF("image/ief"), - IMAGE_J2C("image/j2c"), - IMAGE_JAII("image/jaii"), - IMAGE_JAIS("image/jais"), - IMAGE_JLS("image/jls"), - IMAGE_JP2("image/jp2"), - IMAGE_JPEG("image/jpeg"), - IMAGE_JPH("image/jph"), - IMAGE_JPHC("image/jphc"), - IMAGE_JPM("image/jpm"), - IMAGE_JPX("image/jpx"), - IMAGE_JXL("image/jxl"), - IMAGE_JXR("image/jxr"), - IMAGE_JXRA("image/jxrA"), - IMAGE_JXRS("image/jxrS"), - IMAGE_JXS("image/jxs"), - IMAGE_JXSC("image/jxsc"), - IMAGE_JXSI("image/jxsi"), - IMAGE_JXSS("image/jxss"), - IMAGE_KTX("image/ktx"), - IMAGE_KTX2("image/ktx2"), - IMAGE_NAPLPS("image/naplps"), - IMAGE_PNG("image/png"), - IMAGE_PRS_BTIF("image/prs.btif"), - IMAGE_PRS_PTI("image/prs.pti"), - IMAGE_PWG_RASTER("image/pwg-raster"), - IMAGE_SVG_XML("image/svg+xml"), - IMAGE_T38("image/t38"), - IMAGE_TIFF("image/tiff"), - IMAGE_TIFF_FX("image/tiff-fx"), - IMAGE_VND_ADOBE_PHOTOSHOP("image/vnd.adobe.photoshop"), - IMAGE_VND_AIRZIP_ACCELERATOR_AZV("image/vnd.airzip.accelerator.azv"), - IMAGE_VND_BLOCKFACT_FACTI("image/vnd.blockfact.facti"), - IMAGE_VND_CLIP("image/vnd.clip"), - IMAGE_VND_CNS_INF2("image/vnd.cns.inf2"), - IMAGE_VND_DECE_GRAPHIC("image/vnd.dece.graphic"), - IMAGE_VND_DJVU("image/vnd.djvu"), - IMAGE_VND_DWG("image/vnd.dwg"), - IMAGE_VND_DXF("image/vnd.dxf"), - IMAGE_VND_DVB_SUBTITLE("image/vnd.dvb.subtitle"), - IMAGE_VND_FASTBIDSHEET("image/vnd.fastbidsheet"), - IMAGE_VND_FPX("image/vnd.fpx"), - IMAGE_VND_FST("image/vnd.fst"), - IMAGE_VND_FUJIXEROX_EDMICS_MMR("image/vnd.fujixerox.edmics-mmr"), - IMAGE_VND_FUJIXEROX_EDMICS_RLC("image/vnd.fujixerox.edmics-rlc"), - IMAGE_VND_GLOBALGRAPHICS_PGB("image/vnd.globalgraphics.pgb"), - IMAGE_VND_MICROSOFT_ICON("image/vnd.microsoft.icon"), - IMAGE_VND_MIX("image/vnd.mix"), - IMAGE_VND_MS_MODI("image/vnd.ms-modi"), - IMAGE_VND_MOZILLA_APNG("image/vnd.mozilla.apng"), - IMAGE_VND_NET_FPX("image/vnd.net-fpx"), - IMAGE_VND_PCO_B16("image/vnd.pco.b16"), - IMAGE_VND_RADIANCE("image/vnd.radiance"), - IMAGE_VND_SEALED_PNG("image/vnd.sealed.png"), - IMAGE_VND_SEALEDMEDIA_SOFTSEAL_GIF("image/vnd.sealedmedia.softseal.gif"), - IMAGE_VND_SEALEDMEDIA_SOFTSEAL_JPG("image/vnd.sealedmedia.softseal.jpg"), - IMAGE_VND_SVF("image/vnd.svf"), - IMAGE_VND_TENCENT_TAP("image/vnd.tencent.tap"), - IMAGE_VND_VALVE_SOURCE_TEXTURE("image/vnd.valve.source.texture"), - IMAGE_VND_WAP_WBMP("image/vnd.wap.wbmp"), - IMAGE_VND_XIFF("image/vnd.xiff"), - IMAGE_VND_ZBRUSH_PCX("image/vnd.zbrush.pcx"), - IMAGE_WEBP("image/webp"), - IMAGE_WMF("image/wmf"), - IMAGE_X_EMF("image/x-emf"), - IMAGE_X_WMF("image/x-wmf"), - MESSAGE_BHTTP("message/bhttp"), - MESSAGE_CPIM("message/CPIM"), - MESSAGE_DELIVERY_STATUS("message/delivery-status"), - MESSAGE_DISPOSITION_NOTIFICATION("message/disposition-notification"), - MESSAGE_EXAMPLE("message/example"), - MESSAGE_EXTERNAL_BODY("message/external-body"), - MESSAGE_FEEDBACK_REPORT("message/feedback-report"), - MESSAGE_GLOBAL("message/global"), - MESSAGE_GLOBAL_DELIVERY_STATUS("message/global-delivery-status"), - MESSAGE_GLOBAL_DISPOSITION_NOTIFICATION("message/global-disposition-notification"), - MESSAGE_GLOBAL_HEADERS("message/global-headers"), - MESSAGE_HTTP("message/http"), - MESSAGE_IMDN_XML("message/imdn+xml"), - MESSAGE_MLS("message/mls"), - MESSAGE_NEWS("message/news"), - MESSAGE_OHTTP_REQ("message/ohttp-req"), - MESSAGE_OHTTP_RES("message/ohttp-res"), - MESSAGE_PARTIAL("message/partial"), - MESSAGE_RFC822("message/rfc822"), - MESSAGE_S_HTTP("message/s-http"), - MESSAGE_SIP("message/sip"), - MESSAGE_SIPFRAG("message/sipfrag"), - MESSAGE_TRACKING_STATUS("message/tracking-status"), - MESSAGE_VND_SI_SIMP("message/vnd.si.simp"), - MESSAGE_VND_WFA_WSC("message/vnd.wfa.wsc"), - MODEL_3MF("model/3mf"), - MODEL_E57("model/e57"), - MODEL_EXAMPLE("model/example"), - MODEL_GLTF_BINARY("model/gltf-binary"), - MODEL_GLTF_JSON("model/gltf+json"), - MODEL_JT("model/JT"), - MODEL_IGES("model/iges"), - MODEL_MESH("model/mesh"), - MODEL_MTL("model/mtl"), - MODEL_OBJ("model/obj"), - MODEL_PRC("model/prc"), - MODEL_STEP("model/step"), - MODEL_STEP_XML("model/step+xml"), - MODEL_STEP_ZIP("model/step+zip"), - MODEL_STEP_XML_ZIP("model/step-xml+zip"), - MODEL_STL("model/stl"), - MODEL_U3D("model/u3d"), - MODEL_VND_BARY("model/vnd.bary"), - MODEL_VND_CLD("model/vnd.cld"), - MODEL_VND_COLLADA_XML("model/vnd.collada+xml"), - MODEL_VND_DWF("model/vnd.dwf"), - MODEL_VND_FLATLAND_3DML("model/vnd.flatland.3dml"), - MODEL_VND_GDL("model/vnd.gdl"), - MODEL_VND_GS_GDL("model/vnd.gs-gdl"), - MODEL_VND_GTW("model/vnd.gtw"), - MODEL_VND_MOML_XML("model/vnd.moml+xml"), - MODEL_VND_MTS("model/vnd.mts"), - MODEL_VND_OPENGEX("model/vnd.opengex"), - MODEL_VND_PARASOLID_TRANSMIT_BINARY("model/vnd.parasolid.transmit.binary"), - MODEL_VND_PARASOLID_TRANSMIT_TEXT("model/vnd.parasolid.transmit.text"), - MODEL_VND_PYTHA_PYOX("model/vnd.pytha.pyox"), - MODEL_VND_ROSETTE_ANNOTATED_DATA_MODEL("model/vnd.rosette.annotated-data-model"), - MODEL_VND_SAP_VDS("model/vnd.sap.vds"), - MODEL_VND_USDA("model/vnd.usda"), - MODEL_VND_USDZ_ZIP("model/vnd.usdz+zip"), - MODEL_VND_VALVE_SOURCE_COMPILED_MAP("model/vnd.valve.source.compiled-map"), - MODEL_VND_VTU("model/vnd.vtu"), - MODEL_VRML("model/vrml"), - MODEL_X3D_VRML("model/x3d-vrml"), - MODEL_X3D_FASTINFOSET("model/x3d+fastinfoset"), - MODEL_X3D_XML("model/x3d+xml"), - MULTIPART_ALTERNATIVE("multipart/alternative"), - MULTIPART_APPLEDOUBLE("multipart/appledouble"), - MULTIPART_BYTERANGES("multipart/byteranges"), - MULTIPART_DIGEST("multipart/digest"), - MULTIPART_ENCRYPTED("multipart/encrypted"), - MULTIPART_EXAMPLE("multipart/example"), - MULTIPART_FORM_DATA("multipart/form-data"), - MULTIPART_HEADER_SET("multipart/header-set"), - MULTIPART_MIXED("multipart/mixed"), - MULTIPART_MULTILINGUAL("multipart/multilingual"), - MULTIPART_PARALLEL("multipart/parallel"), - MULTIPART_RELATED("multipart/related"), - MULTIPART_REPORT("multipart/report"), - MULTIPART_SIGNED("multipart/signed"), - MULTIPART_VND_BINT_MED_PLUS("multipart/vnd.bint.med-plus"), - MULTIPART_VOICE_MESSAGE("multipart/voice-message"), - MULTIPART_X_MIXED_REPLACE("multipart/x-mixed-replace"), - TEXT_1D_INTERLEAVED_PARITYFEC("text/1d-interleaved-parityfec"), - TEXT_CACHE_MANIFEST("text/cache-manifest"), - TEXT_CALENDAR("text/calendar"), - TEXT_CQL("text/cql"), - TEXT_CQL_EXPRESSION("text/cql-expression"), - TEXT_CQL_IDENTIFIER("text/cql-identifier"), - TEXT_CSS("text/css"), - TEXT_CSV("text/csv"), - TEXT_CSV_SCHEMA("text/csv-schema"), - TEXT_DIRECTORY("text/directory"), - TEXT_DNS("text/dns"), - TEXT_ECMASCRIPT("text/ecmascript"), - TEXT_ENCAPRTP("text/encaprtp"), - TEXT_ENRICHED("text/enriched"), - TEXT_EXAMPLE("text/example"), - TEXT_FHIRPATH("text/fhirpath"), - TEXT_FLEXFEC("text/flexfec"), - TEXT_FWDRED("text/fwdred"), - TEXT_GFF3("text/gff3"), - TEXT_GRAMMAR_REF_LIST("text/grammar-ref-list"), - TEXT_HL7V2("text/hl7v2"), - TEXT_HTML("text/html"), - TEXT_JAVASCRIPT("text/javascript"), - TEXT_JCR_CND("text/jcr-cnd"), - TEXT_MARKDOWN("text/markdown"), - TEXT_MIZAR("text/mizar"), - TEXT_N3("text/n3"), - TEXT_ORG("text/org"), - TEXT_PARAMETERS("text/parameters"), - TEXT_PARITYFEC("text/parityfec"), - TEXT_PLAIN("text/plain"), - TEXT_PROVENANCE_NOTATION("text/provenance-notation"), - TEXT_PRS_FALLENSTEIN_RST("text/prs.fallenstein.rst"), - TEXT_PRS_LINES_TAG("text/prs.lines.tag"), - TEXT_PRS_PROP_LOGIC("text/prs.prop.logic"), - TEXT_PRS_TEXI("text/prs.texi"), - TEXT_RAPTORFEC("text/raptorfec"), - TEXT_RED("text/RED"), - TEXT_RFC822_HEADERS("text/rfc822-headers"), - TEXT_RICHTEXT("text/richtext"), - TEXT_RTF("text/rtf"), - TEXT_RTP_ENC_AESCM128("text/rtp-enc-aescm128"), - TEXT_RTPLOOPBACK("text/rtploopback"), - TEXT_RTX("text/rtx"), - TEXT_SGML("text/SGML"), - TEXT_SHACLC("text/shaclc"), - TEXT_SHEX("text/shex"), - TEXT_SPDX("text/spdx"), - TEXT_STRINGS("text/strings"), - TEXT_T140("text/t140"), - TEXT_TAB_SEPARATED_VALUES("text/tab-separated-values"), - TEXT_TROFF("text/troff"), - TEXT_TURTLE("text/turtle"), - TEXT_ULPFEC("text/ulpfec"), - TEXT_URI_LIST("text/uri-list"), - TEXT_VCARD("text/vcard"), - TEXT_VND_A("text/vnd.a"), - TEXT_VND_ABC("text/vnd.abc"), - TEXT_VND_ASCII_ART("text/vnd.ascii-art"), - TEXT_VND_CURL("text/vnd.curl"), - TEXT_VND_DEBIAN_COPYRIGHT("text/vnd.debian.copyright"), - TEXT_VND_DMCLIENTSCRIPT("text/vnd.DMClientScript"), - TEXT_VND_DVB_SUBTITLE("text/vnd.dvb.subtitle"), - TEXT_VND_ESMERTEC_THEME_DESCRIPTOR("text/vnd.esmertec.theme-descriptor"), - TEXT_VND_EXCHANGEABLE("text/vnd.exchangeable"), - TEXT_VND_FAMILYSEARCH_GEDCOM("text/vnd.familysearch.gedcom"), - TEXT_VND_FICLAB_FLT("text/vnd.ficlab.flt"), - TEXT_VND_FLY("text/vnd.fly"), - TEXT_VND_FMI_FLEXSTOR("text/vnd.fmi.flexstor"), - TEXT_VND_GML("text/vnd.gml"), - TEXT_VND_GRAPHVIZ("text/vnd.graphviz"), - TEXT_VND_HANS("text/vnd.hans"), - TEXT_VND_HGL("text/vnd.hgl"), - TEXT_VND_IN3D_3DML("text/vnd.in3d.3dml"), - TEXT_VND_IN3D_SPOT("text/vnd.in3d.spot"), - TEXT_VND_IPTC_NEWSML("text/vnd.IPTC.NewsML"), - TEXT_VND_IPTC_NITF("text/vnd.IPTC.NITF"), - TEXT_VND_LATEX_Z("text/vnd.latex-z"), - TEXT_VND_MOTOROLA_REFLEX("text/vnd.motorola.reflex"), - TEXT_VND_MS_MEDIAPACKAGE("text/vnd.ms-mediapackage"), - TEXT_VND_NET2PHONE_COMMCENTER_COMMAND("text/vnd.net2phone.commcenter.command"), - TEXT_VND_RADISYS_MSML_BASIC_LAYOUT("text/vnd.radisys.msml-basic-layout"), - TEXT_VND_SENX_WARPSCRIPT("text/vnd.senx.warpscript"), - TEXT_VND_SI_URICATALOGUE("text/vnd.si.uricatalogue"), - TEXT_VND_SUN_J2ME_APP_DESCRIPTOR("text/vnd.sun.j2me.app-descriptor"), - TEXT_VND_SOSI("text/vnd.sosi"), - TEXT_VND_TYPST("text/vnd.typst"), - TEXT_VND_TROLLTECH_LINGUIST("text/vnd.trolltech.linguist"), - TEXT_VND_VCF("text/vnd.vcf"), - TEXT_VND_WAP_SI("text/vnd.wap.si"), - TEXT_VND_WAP_SL("text/vnd.wap.sl"), - TEXT_VND_WAP_WML("text/vnd.wap.wml"), - TEXT_VND_WAP_WMLSCRIPT("text/vnd.wap.wmlscript"), - TEXT_VND_ZOO_KCL("text/vnd.zoo.kcl"), - TEXT_VTT("text/vtt"), - TEXT_WGSL("text/wgsl"), - TEXT_XML("text/xml"), - TEXT_XML_EXTERNAL_PARSED_ENTITY("text/xml-external-parsed-entity"), - VIDEO_1D_INTERLEAVED_PARITYFEC("video/1d-interleaved-parityfec"), - VIDEO_3GPP("video/3gpp"), - VIDEO_3GPP2("video/3gpp2"), - VIDEO_3GPP_TT("video/3gpp-tt"), - VIDEO_AV1("video/AV1"), - VIDEO_BMPEG("video/BMPEG"), - VIDEO_BT656("video/BT656"), - VIDEO_CELB("video/CelB"), - VIDEO_DV("video/DV"), - VIDEO_ENCAPRTP("video/encaprtp"), - VIDEO_EVC("video/evc"), - VIDEO_EXAMPLE("video/example"), - VIDEO_FFV1("video/FFV1"), - VIDEO_FLEXFEC("video/flexfec"), - VIDEO_H261("video/H261"), - VIDEO_H263("video/H263"), - VIDEO_H263_1998("video/H263-1998"), - VIDEO_H263_2000("video/H263-2000"), - VIDEO_H264("video/H264"), - VIDEO_H264_RCDO("video/H264-RCDO"), - VIDEO_H264_SVC("video/H264-SVC"), - VIDEO_H265("video/H265"), - VIDEO_H266("video/H266"), - VIDEO_ISO_SEGMENT("video/iso.segment"), - VIDEO_JPEG("video/JPEG"), - VIDEO_JPEG2000("video/jpeg2000"), - VIDEO_JPEG2000_SCL("video/jpeg2000-scl"), - VIDEO_JXSV("video/jxsv"), - VIDEO_LOTTIE_JSON("video/lottie+json"), - VIDEO_MATROSKA("video/matroska"), - VIDEO_MATROSKA_3D("video/matroska-3d"), - VIDEO_MJ2("video/mj2"), - VIDEO_MP1S("video/MP1S"), - VIDEO_MP2P("video/MP2P"), - VIDEO_MP2T("video/MP2T"), - VIDEO_MP4("video/mp4"), - VIDEO_MP4V_ES("video/MP4V-ES"), - VIDEO_MPV("video/MPV"), - VIDEO_MPEG("video/mpeg"), - VIDEO_MPEG4_GENERIC("video/mpeg4-generic"), - VIDEO_NV("video/nv"), - VIDEO_OGG("video/ogg"), - VIDEO_PARITYFEC("video/parityfec"), - VIDEO_POINTER("video/pointer"), - VIDEO_QUICKTIME("video/quicktime"), - VIDEO_RAPTORFEC("video/raptorfec"), - VIDEO_RAW("video/raw"), - VIDEO_RTP_ENC_AESCM128("video/rtp-enc-aescm128"), - VIDEO_RTPLOOPBACK("video/rtploopback"), - VIDEO_RTX("video/rtx"), - VIDEO_SCIP("video/scip"), - VIDEO_SMPTE291("video/smpte291"), - VIDEO_SMPTE292M("video/SMPTE292M"), - VIDEO_ULPFEC("video/ulpfec"), - VIDEO_VC1("video/vc1"), - VIDEO_VC2("video/vc2"), - VIDEO_VND_BLOCKFACT_FACTV("video/vnd.blockfact.factv"), - VIDEO_VND_CCTV("video/vnd.CCTV"), - VIDEO_VND_DECE_HD("video/vnd.dece.hd"), - VIDEO_VND_DECE_MOBILE("video/vnd.dece.mobile"), - VIDEO_VND_DECE_MP4("video/vnd.dece.mp4"), - VIDEO_VND_DECE_PD("video/vnd.dece.pd"), - VIDEO_VND_DECE_SD("video/vnd.dece.sd"), - VIDEO_VND_DECE_VIDEO("video/vnd.dece.video"), - VIDEO_VND_DIRECTV_MPEG("video/vnd.directv.mpeg"), - VIDEO_VND_DIRECTV_MPEG_TTS("video/vnd.directv.mpeg-tts"), - VIDEO_VND_DLNA_MPEG_TTS("video/vnd.dlna.mpeg-tts"), - VIDEO_VND_DVB_FILE("video/vnd.dvb.file"), - VIDEO_VND_FVT("video/vnd.fvt"), - VIDEO_VND_HNS_VIDEO("video/vnd.hns.video"), - VIDEO_VND_IPTVFORUM_1DPARITYFEC_1010("video/vnd.iptvforum.1dparityfec-1010"), - VIDEO_VND_IPTVFORUM_1DPARITYFEC_2005("video/vnd.iptvforum.1dparityfec-2005"), - VIDEO_VND_IPTVFORUM_2DPARITYFEC_1010("video/vnd.iptvforum.2dparityfec-1010"), - VIDEO_VND_IPTVFORUM_2DPARITYFEC_2005("video/vnd.iptvforum.2dparityfec-2005"), - VIDEO_VND_IPTVFORUM_TTSAVC("video/vnd.iptvforum.ttsavc"), - VIDEO_VND_IPTVFORUM_TTSMPEG2("video/vnd.iptvforum.ttsmpeg2"), - VIDEO_VND_MOTOROLA_VIDEO("video/vnd.motorola.video"), - VIDEO_VND_MOTOROLA_VIDEOP("video/vnd.motorola.videop"), - VIDEO_VND_MPEGURL("video/vnd.mpegurl"), - VIDEO_VND_MS_PLAYREADY_MEDIA_PYV("video/vnd.ms-playready.media.pyv"), - VIDEO_VND_NOKIA_INTERLEAVED_MULTIMEDIA("video/vnd.nokia.interleaved-multimedia"), - VIDEO_VND_NOKIA_MP4VR("video/vnd.nokia.mp4vr"), - VIDEO_VND_NOKIA_VIDEOVOIP("video/vnd.nokia.videovoip"), - VIDEO_VND_OBJECTVIDEO("video/vnd.objectvideo"), - VIDEO_VND_PLANAR("video/vnd.planar"), - VIDEO_VND_RADGAMETTOOLS_BINK("video/vnd.radgamettools.bink"), - VIDEO_VND_RADGAMETTOOLS_SMACKER("video/vnd.radgamettools.smacker"), - VIDEO_VND_SEALED_MPEG1("video/vnd.sealed.mpeg1"), - VIDEO_VND_SEALED_MPEG4("video/vnd.sealed.mpeg4"), - VIDEO_VND_SEALED_SWF("video/vnd.sealed.swf"), - VIDEO_VND_SEALEDMEDIA_SOFTSEAL_MOV("video/vnd.sealedmedia.softseal.mov"), - VIDEO_VND_UVVU_MP4("video/vnd.uvvu.mp4"), - VIDEO_VND_YOUTUBE_YT("video/vnd.youtube.yt"), - VIDEO_VND_VIVO("video/vnd.vivo"), - VIDEO_VP8("video/VP8"), - VIDEO_VP9("video/VP9"); + APPLICATION_1D_INTERLEAVED_PARITYFEC("application/1d-interleaved-parityfec"), + APPLICATION_3GPDASH_QOE_REPORT_XML("application/3gpdash-qoe-report+xml"), + APPLICATION_3GPP_IMS_XML("application/3gpp-ims+xml"), + APPLICATION_3GPP_MBS_OBJECT_MANIFEST_JSON("application/3gpp-mbs-object-manifest+json"), + APPLICATION_3GPP_MBS_USER_SERVICE_DESCRIPTIONS_JSON("application/3gpp-mbs-user-service-descriptions+json"), + APPLICATION_3GPP_MEDIA_DELIVERY_METRICS_REPORT_JSON("application/3gpp-media-delivery-metrics-report+json"), + APPLICATION_3GPPHAL_JSON("application/3gppHal+json"), + APPLICATION_3GPPHALFORMS_JSON("application/3gppHalForms+json"), + APPLICATION_AAS_ZIP("application/aas+zip"), + APPLICATION_A2L("application/A2L"), + APPLICATION_ACE_GROUPCOMM_CBOR("application/ace-groupcomm+cbor"), + APPLICATION_ACE_TRL_CBOR("application/ace-trl+cbor"), + APPLICATION_ACE_CBOR("application/ace+cbor"), + APPLICATION_ACE_JSON("application/ace+json"), + APPLICATION_ACTIVEMESSAGE("application/activemessage"), + APPLICATION_ACTIVITY_JSON("application/activity+json"), + APPLICATION_AIF_CBOR("application/aif+cbor"), + APPLICATION_AIF_JSON("application/aif+json"), + APPLICATION_ALTO_CDNI_JSON("application/alto-cdni+json"), + APPLICATION_ALTO_CDNIFILTER_JSON("application/alto-cdnifilter+json"), + APPLICATION_ALTO_COSTMAP_JSON("application/alto-costmap+json"), + APPLICATION_ALTO_COSTMAPFILTER_JSON("application/alto-costmapfilter+json"), + APPLICATION_ALTO_DIRECTORY_JSON("application/alto-directory+json"), + APPLICATION_ALTO_ENDPOINTPROP_JSON("application/alto-endpointprop+json"), + APPLICATION_ALTO_ENDPOINTPROPPARAMS_JSON("application/alto-endpointpropparams+json"), + APPLICATION_ALTO_ENDPOINTCOST_JSON("application/alto-endpointcost+json"), + APPLICATION_ALTO_ENDPOINTCOSTPARAMS_JSON("application/alto-endpointcostparams+json"), + APPLICATION_ALTO_ERROR_JSON("application/alto-error+json"), + APPLICATION_ALTO_NETWORKMAPFILTER_JSON("application/alto-networkmapfilter+json"), + APPLICATION_ALTO_NETWORKMAP_JSON("application/alto-networkmap+json"), + APPLICATION_ALTO_PROPMAP_JSON("application/alto-propmap+json"), + APPLICATION_ALTO_PROPMAPPARAMS_JSON("application/alto-propmapparams+json"), + APPLICATION_ALTO_TIPS_JSON("application/alto-tips+json"), + APPLICATION_ALTO_TIPSPARAMS_JSON("application/alto-tipsparams+json"), + APPLICATION_ALTO_UPDATESTREAMCONTROL_JSON("application/alto-updatestreamcontrol+json"), + APPLICATION_ALTO_UPDATESTREAMPARAMS_JSON("application/alto-updatestreamparams+json"), + APPLICATION_AML("application/AML"), + APPLICATION_ANDREW_INSET("application/andrew-inset"), + APPLICATION_APPLEFILE("application/applefile"), + APPLICATION_ASYNCAPI_JSON("application/asyncapi+json"), + APPLICATION_ASYNCAPI_YAML("application/asyncapi+yaml"), + APPLICATION_AT_JWT("application/at+jwt"), + APPLICATION_ATF("application/ATF"), + APPLICATION_ATFX("application/ATFX"), + APPLICATION_ATOM_XML("application/atom+xml"), + APPLICATION_ATOMCAT_XML("application/atomcat+xml"), + APPLICATION_ATOMDELETED_XML("application/atomdeleted+xml"), + APPLICATION_ATOMICMAIL("application/atomicmail"), + APPLICATION_ATOMSVC_XML("application/atomsvc+xml"), + APPLICATION_ATSC_DWD_XML("application/atsc-dwd+xml"), + APPLICATION_ATSC_DYNAMIC_EVENT_MESSAGE("application/atsc-dynamic-event-message"), + APPLICATION_ATSC_HELD_XML("application/atsc-held+xml"), + APPLICATION_ATSC_RDT_JSON("application/atsc-rdt+json"), + APPLICATION_ATSC_RSAT_XML("application/atsc-rsat+xml"), + APPLICATION_ATXML("application/ATXML"), + APPLICATION_AUTH_POLICY_XML("application/auth-policy+xml"), + APPLICATION_AUTOMATIONML_AML_XML("application/automationml-aml+xml"), + APPLICATION_AUTOMATIONML_AMLX_ZIP("application/automationml-amlx+zip"), + APPLICATION_BACNET_XDD_ZIP("application/bacnet-xdd+zip"), + APPLICATION_BATCH_SMTP("application/batch-SMTP"), + APPLICATION_BEEP_XML("application/beep+xml"), + APPLICATION_BUFR("application/bufr"), + APPLICATION_C2PA("application/c2pa"), + APPLICATION_CALENDAR_JSON("application/calendar+json"), + APPLICATION_CALENDAR_XML("application/calendar+xml"), + APPLICATION_CALL_COMPLETION("application/call-completion"), + APPLICATION_CALS_1840("application/CALS-1840"), + APPLICATION_CAPTIVE_JSON("application/captive+json"), + APPLICATION_CBOR("application/cbor"), + APPLICATION_CBOR_SEQ("application/cbor-seq"), + APPLICATION_CCCEX("application/cccex"), + APPLICATION_CCMP_XML("application/ccmp+xml"), + APPLICATION_CCXML_XML("application/ccxml+xml"), + APPLICATION_CDA_XML("application/cda+xml"), + APPLICATION_CDFX_XML("application/CDFX+XML"), + APPLICATION_CDMI_CAPABILITY("application/cdmi-capability"), + APPLICATION_CDMI_CONTAINER("application/cdmi-container"), + APPLICATION_CDMI_DOMAIN("application/cdmi-domain"), + APPLICATION_CDMI_OBJECT("application/cdmi-object"), + APPLICATION_CDMI_QUEUE("application/cdmi-queue"), + APPLICATION_CDNI("application/cdni"), + APPLICATION_CE_CBOR("application/ce+cbor"), + APPLICATION_CEA("application/CEA"), + APPLICATION_CEA_2018_XML("application/cea-2018+xml"), + APPLICATION_CELLML_XML("application/cellml+xml"), + APPLICATION_CFW("application/cfw"), + APPLICATION_CID("application/cid"), + APPLICATION_CID_EDHOC_CBOR_SEQ("application/cid-edhoc+cbor-seq"), + APPLICATION_CITY_JSON("application/city+json"), + APPLICATION_CITY_JSON_SEQ("application/city+json-seq"), + APPLICATION_CLR("application/clr"), + APPLICATION_CLUE_INFO_XML("application/clue_info+xml"), + APPLICATION_CLUE_XML("application/clue+xml"), + APPLICATION_CMS("application/cms"), + APPLICATION_CMW_CBOR("application/cmw+cbor"), + APPLICATION_CMW_COSE("application/cmw+cose"), + APPLICATION_CMW_JSON("application/cmw+json"), + APPLICATION_CMW_JWS("application/cmw+jws"), + APPLICATION_CNRP_XML("application/cnrp+xml"), + APPLICATION_COAP_EAP("application/coap-eap"), + APPLICATION_COAP_GROUP_JSON("application/coap-group+json"), + APPLICATION_COAP_PAYLOAD("application/coap-payload"), + APPLICATION_COMMONGROUND("application/commonground"), + APPLICATION_CONCISE_PROBLEM_DETAILS_CBOR("application/concise-problem-details+cbor"), + APPLICATION_CONFERENCE_INFO_XML("application/conference-info+xml"), + APPLICATION_CPL_XML("application/cpl+xml"), + APPLICATION_COSE("application/cose"), + APPLICATION_COSE_KEY("application/cose-key"), + APPLICATION_COSE_KEY_SET("application/cose-key-set"), + APPLICATION_COSE_X509("application/cose-x509"), + APPLICATION_CSRATTRS("application/csrattrs"), + APPLICATION_CSTA_XML("application/csta+xml"), + APPLICATION_CSTADATA_XML("application/CSTAdata+xml"), + APPLICATION_CSVM_JSON("application/csvm+json"), + APPLICATION_CWL("application/cwl"), + APPLICATION_CWL_JSON("application/cwl+json"), + APPLICATION_CWL_YAML("application/cwl+yaml"), + APPLICATION_CWT("application/cwt"), + APPLICATION_CYBERCASH("application/cybercash"), + APPLICATION_DASH_XML("application/dash+xml"), + APPLICATION_DASH_PATCH_XML("application/dash-patch+xml"), + APPLICATION_DASHDELTA("application/dashdelta"), + APPLICATION_DAVMOUNT_XML("application/davmount+xml"), + APPLICATION_DCA_RFT("application/dca-rft"), + APPLICATION_DCD("application/DCD"), + APPLICATION_DEC_DX("application/dec-dx"), + APPLICATION_DIALOG_INFO_XML("application/dialog-info+xml"), + APPLICATION_DICOM("application/dicom"), + APPLICATION_DICOM_JSON("application/dicom+json"), + APPLICATION_DICOM_XML("application/dicom+xml"), + APPLICATION_DID("application/did"), + APPLICATION_DII("application/DII"), + APPLICATION_DIT("application/DIT"), + APPLICATION_DNS("application/dns"), + APPLICATION_DNS_JSON("application/dns+json"), + APPLICATION_DNS_MESSAGE("application/dns-message"), + APPLICATION_DOTS_CBOR("application/dots+cbor"), + APPLICATION_DPOP_JWT("application/dpop+jwt"), + APPLICATION_DSKPP_XML("application/dskpp+xml"), + APPLICATION_DSSC_DER("application/dssc+der"), + APPLICATION_DSSC_XML("application/dssc+xml"), + APPLICATION_DVCS("application/dvcs"), + APPLICATION_EAT_CWT("application/eat+cwt"), + APPLICATION_EAT_JWT("application/eat+jwt"), + APPLICATION_EAT_BUN_CBOR("application/eat-bun+cbor"), + APPLICATION_EAT_BUN_JSON("application/eat-bun+json"), + APPLICATION_EAT_UCS_CBOR("application/eat-ucs+cbor"), + APPLICATION_EAT_UCS_JSON("application/eat-ucs+json"), + APPLICATION_ECMASCRIPT("application/ecmascript"), + APPLICATION_EDHOC_CBOR_SEQ("application/edhoc+cbor-seq"), + APPLICATION_EDI_CONSENT("application/EDI-consent"), + APPLICATION_EDIFACT("application/EDIFACT"), + APPLICATION_EDI_X12("application/EDI-X12"), + APPLICATION_EFI("application/efi"), + APPLICATION_ELM_JSON("application/elm+json"), + APPLICATION_ELM_XML("application/elm+xml"), + APPLICATION_EMERGENCYCALLDATA_CAP_XML("application/EmergencyCallData.cap+xml"), + APPLICATION_EMERGENCYCALLDATA_COMMENT_XML("application/EmergencyCallData.Comment+xml"), + APPLICATION_EMERGENCYCALLDATA_CONTROL_XML("application/EmergencyCallData.Control+xml"), + APPLICATION_EMERGENCYCALLDATA_DEVICEINFO_XML("application/EmergencyCallData.DeviceInfo+xml"), + APPLICATION_EMERGENCYCALLDATA_ECALL_MSD("application/EmergencyCallData.eCall.MSD"), + APPLICATION_EMERGENCYCALLDATA_LEGACYESN_JSON("application/EmergencyCallData.LegacyESN+json"), + APPLICATION_EMERGENCYCALLDATA_PROVIDERINFO_XML("application/EmergencyCallData.ProviderInfo+xml"), + APPLICATION_EMERGENCYCALLDATA_SERVICEINFO_XML("application/EmergencyCallData.ServiceInfo+xml"), + APPLICATION_EMERGENCYCALLDATA_SUBSCRIBERINFO_XML("application/EmergencyCallData.SubscriberInfo+xml"), + APPLICATION_EMERGENCYCALLDATA_VEDS_XML("application/EmergencyCallData.VEDS+xml"), + APPLICATION_EMMA_XML("application/emma+xml"), + APPLICATION_EMOTIONML_XML("application/emotionml+xml"), + APPLICATION_ENCAPRTP("application/encaprtp"), + APPLICATION_ENTITY_STATEMENT_JWT("application/entity-statement+jwt"), + APPLICATION_EPP_XML("application/epp+xml"), + APPLICATION_EPUB_ZIP("application/epub+zip"), + APPLICATION_ESHOP("application/eshop"), + APPLICATION_EXAMPLE("application/example"), + APPLICATION_EXI("application/exi"), + APPLICATION_EXPECT_CT_REPORT_JSON("application/expect-ct-report+json"), + APPLICATION_EXPLICIT_REGISTRATION_RESPONSE_JWT("application/explicit-registration-response+jwt"), + APPLICATION_EXPRESS("application/express"), + APPLICATION_FASTINFOSET("application/fastinfoset"), + APPLICATION_FASTSOAP("application/fastsoap"), + APPLICATION_FDF("application/fdf"), + APPLICATION_FDT_XML("application/fdt+xml"), + APPLICATION_FHIR_JSON("application/fhir+json"), + APPLICATION_FHIR_XML("application/fhir+xml"), + APPLICATION_FITS("application/fits"), + APPLICATION_FLEXFEC("application/flexfec"), + APPLICATION_FONT_SFNT("application/font-sfnt"), + APPLICATION_FONT_TDPFR("application/font-tdpfr"), + APPLICATION_FONT_WOFF("application/font-woff"), + APPLICATION_FRAMEWORK_ATTRIBUTES_XML("application/framework-attributes+xml"), + APPLICATION_GEO_JSON("application/geo+json"), + APPLICATION_GEO_JSON_SEQ("application/geo+json-seq"), + APPLICATION_GEOFEED_CSV("application/geofeed+csv"), + APPLICATION_GEOPACKAGE_SQLITE3("application/geopackage+sqlite3"), + APPLICATION_GEOPOSE_JSON("application/geopose+json"), + APPLICATION_GEOXACML_JSON("application/geoxacml+json"), + APPLICATION_GEOXACML_XML("application/geoxacml+xml"), + APPLICATION_GLTF_BUFFER("application/gltf-buffer"), + APPLICATION_GML_XML("application/gml+xml"), + APPLICATION_GNAP_BINDING_JWS("application/gnap-binding-jws"), + APPLICATION_GNAP_BINDING_JWSD("application/gnap-binding-jwsd"), + APPLICATION_GNAP_BINDING_ROTATION_JWS("application/gnap-binding-rotation-jws"), + APPLICATION_GNAP_BINDING_ROTATION_JWSD("application/gnap-binding-rotation-jwsd"), + APPLICATION_GRIB("application/grib"), + APPLICATION_GZIP("application/gzip"), + APPLICATION_H224("application/H224"), + APPLICATION_HELD_XML("application/held+xml"), + APPLICATION_HL7V2_XML("application/hl7v2+xml"), + APPLICATION_HTTP("application/http"), + APPLICATION_HYPERSTUDIO("application/hyperstudio"), + APPLICATION_IBE_KEY_REQUEST_XML("application/ibe-key-request+xml"), + APPLICATION_IBE_PKG_REPLY_XML("application/ibe-pkg-reply+xml"), + APPLICATION_IBE_PP_DATA("application/ibe-pp-data"), + APPLICATION_IGES("application/iges"), + APPLICATION_IM_ISCOMPOSING_XML("application/im-iscomposing+xml"), + APPLICATION_INDEX("application/index"), + APPLICATION_INDEX_CMD("application/index.cmd"), + APPLICATION_INDEX_OBJ("application/index.obj"), + APPLICATION_INDEX_RESPONSE("application/index.response"), + APPLICATION_INDEX_VND("application/index.vnd"), + APPLICATION_INKML_XML("application/inkml+xml"), + APPLICATION_IOTP("application/IOTP"), + APPLICATION_IPFIX("application/ipfix"), + APPLICATION_IPP("application/ipp"), + APPLICATION_ISUP("application/ISUP"), + APPLICATION_ITS_XML("application/its+xml"), + APPLICATION_JAVA_ARCHIVE("application/java-archive"), + APPLICATION_JAVASCRIPT("application/javascript"), + APPLICATION_JF2FEED_JSON("application/jf2feed+json"), + APPLICATION_JOSE("application/jose"), + APPLICATION_JOSE_JSON("application/jose+json"), + APPLICATION_JRD_JSON("application/jrd+json"), + APPLICATION_JSCALENDAR_JSON("application/jscalendar+json"), + APPLICATION_JSCONTACT_JSON("application/jscontact+json"), + APPLICATION_JSON("application/json"), + APPLICATION_JSON_PATCH_JSON("application/json-patch+json"), + APPLICATION_JSON_PATCH_QUERY_JSON("application/json-patch-query+json"), + APPLICATION_JSON_SEQ("application/json-seq"), + APPLICATION_JSONPATH("application/jsonpath"), + APPLICATION_JWK_JSON("application/jwk+json"), + APPLICATION_JWK_SET_JSON("application/jwk-set+json"), + APPLICATION_JWK_SET_JWT("application/jwk-set+jwt"), + APPLICATION_JWT("application/jwt"), + APPLICATION_KB_JWT("application/kb+jwt"), + APPLICATION_KBL_XML("application/kbl+xml"), + APPLICATION_KPML_REQUEST_XML("application/kpml-request+xml"), + APPLICATION_KPML_RESPONSE_XML("application/kpml-response+xml"), + APPLICATION_LD_JSON("application/ld+json"), + APPLICATION_LGR_XML("application/lgr+xml"), + APPLICATION_LINK_FORMAT("application/link-format"), + APPLICATION_LINKSET("application/linkset"), + APPLICATION_LINKSET_JSON("application/linkset+json"), + APPLICATION_LOAD_CONTROL_XML("application/load-control+xml"), + APPLICATION_LOGOUT_JWT("application/logout+jwt"), + APPLICATION_LOST_XML("application/lost+xml"), + APPLICATION_LOSTSYNC_XML("application/lostsync+xml"), + APPLICATION_LPF_ZIP("application/lpf+zip"), + APPLICATION_LXF("application/LXF"), + APPLICATION_MAC_BINHEX40("application/mac-binhex40"), + APPLICATION_MACWRITEII("application/macwriteii"), + APPLICATION_MADS_XML("application/mads+xml"), + APPLICATION_MANIFEST_JSON("application/manifest+json"), + APPLICATION_MARC("application/marc"), + APPLICATION_MARCXML_XML("application/marcxml+xml"), + APPLICATION_MATHEMATICA("application/mathematica"), + APPLICATION_MATHML_XML("application/mathml+xml"), + APPLICATION_MATHML_CONTENT_XML("application/mathml-content+xml"), + APPLICATION_MATHML_PRESENTATION_XML("application/mathml-presentation+xml"), + APPLICATION_MBMS_ASSOCIATED_PROCEDURE_DESCRIPTION_XML("application/mbms-associated-procedure-description+xml"), + APPLICATION_MBMS_DEREGISTER_XML("application/mbms-deregister+xml"), + APPLICATION_MBMS_ENVELOPE_XML("application/mbms-envelope+xml"), + APPLICATION_MBMS_MSK_RESPONSE_XML("application/mbms-msk-response+xml"), + APPLICATION_MBMS_MSK_XML("application/mbms-msk+xml"), + APPLICATION_MBMS_PROTECTION_DESCRIPTION_XML("application/mbms-protection-description+xml"), + APPLICATION_MBMS_RECEPTION_REPORT_XML("application/mbms-reception-report+xml"), + APPLICATION_MBMS_REGISTER_RESPONSE_XML("application/mbms-register-response+xml"), + APPLICATION_MBMS_REGISTER_XML("application/mbms-register+xml"), + APPLICATION_MBMS_SCHEDULE_XML("application/mbms-schedule+xml"), + APPLICATION_MBMS_USER_SERVICE_DESCRIPTION_XML("application/mbms-user-service-description+xml"), + APPLICATION_MBOX("application/mbox"), + APPLICATION_MEDIA_CONTROL_XML("application/media_control+xml"), + APPLICATION_MEDIA_POLICY_DATASET_XML("application/media-policy-dataset+xml"), + APPLICATION_MEDIASERVERCONTROL_XML("application/mediaservercontrol+xml"), + APPLICATION_MERGE_PATCH_JSON("application/merge-patch+json"), + APPLICATION_METALINK4_XML("application/metalink4+xml"), + APPLICATION_METS_XML("application/mets+xml"), + APPLICATION_MF4("application/MF4"), + APPLICATION_MIKEY("application/mikey"), + APPLICATION_MIPC("application/mipc"), + APPLICATION_MISSING_BLOCKS_CBOR_SEQ("application/missing-blocks+cbor-seq"), + APPLICATION_MMT_AEI_XML("application/mmt-aei+xml"), + APPLICATION_MMT_USD_XML("application/mmt-usd+xml"), + APPLICATION_MODS_XML("application/mods+xml"), + APPLICATION_MOSS_KEYS("application/moss-keys"), + APPLICATION_MOSS_SIGNATURE("application/moss-signature"), + APPLICATION_MOSSKEY_DATA("application/mosskey-data"), + APPLICATION_MOSSKEY_REQUEST("application/mosskey-request"), + APPLICATION_MP21("application/mp21"), + APPLICATION_MP4("application/mp4"), + APPLICATION_MPEG4_GENERIC("application/mpeg4-generic"), + APPLICATION_MPEG4_IOD("application/mpeg4-iod"), + APPLICATION_MPEG4_IOD_XMT("application/mpeg4-iod-xmt"), + APPLICATION_MRB_CONSUMER_XML("application/mrb-consumer+xml"), + APPLICATION_MRB_PUBLISH_XML("application/mrb-publish+xml"), + APPLICATION_MSC_IVR_XML("application/msc-ivr+xml"), + APPLICATION_MSC_MIXER_XML("application/msc-mixer+xml"), + APPLICATION_MSWORD("application/msword"), + APPLICATION_MUD_JSON("application/mud+json"), + APPLICATION_MULTIPART_CORE("application/multipart-core"), + APPLICATION_MXF("application/mxf"), + APPLICATION_N_QUADS("application/n-quads"), + APPLICATION_N_TRIPLES("application/n-triples"), + APPLICATION_NASDATA("application/nasdata"), + APPLICATION_NEWS_CHECKGROUPS("application/news-checkgroups"), + APPLICATION_NEWS_GROUPINFO("application/news-groupinfo"), + APPLICATION_NEWS_TRANSMISSION("application/news-transmission"), + APPLICATION_NLSML_XML("application/nlsml+xml"), + APPLICATION_NODE("application/node"), + APPLICATION_NSS("application/nss"), + APPLICATION_OAUTH_AUTHZ_REQ_JWT("application/oauth-authz-req+jwt"), + APPLICATION_OBLIVIOUS_DNS_MESSAGE("application/oblivious-dns-message"), + APPLICATION_OCSP_REQUEST("application/ocsp-request"), + APPLICATION_OCSP_RESPONSE("application/ocsp-response"), + APPLICATION_OCTET_STREAM("application/octet-stream"), + APPLICATION_ODA("application/ODA"), + APPLICATION_ODM_XML("application/odm+xml"), + APPLICATION_ODX("application/ODX"), + APPLICATION_OEBPS_PACKAGE_XML("application/oebps-package+xml"), + APPLICATION_OGG("application/ogg"), + APPLICATION_OHTTP_KEYS("application/ohttp-keys"), + APPLICATION_OPC_NODESET_XML("application/opc-nodeset+xml"), + APPLICATION_OSCORE("application/oscore"), + APPLICATION_OXPS("application/oxps"), + APPLICATION_P21("application/p21"), + APPLICATION_P21_ZIP("application/p21+zip"), + APPLICATION_P2P_OVERLAY_XML("application/p2p-overlay+xml"), + APPLICATION_PARITYFEC("application/parityfec"), + APPLICATION_PASSPORT("application/passport"), + APPLICATION_PATCH_OPS_ERROR_XML("application/patch-ops-error+xml"), + APPLICATION_PDF("application/pdf"), + APPLICATION_PDX("application/PDX"), + APPLICATION_PEM_CERTIFICATE_CHAIN("application/pem-certificate-chain"), + APPLICATION_PGP_ENCRYPTED("application/pgp-encrypted"), + APPLICATION_PGP_KEYS("application/pgp-keys"), + APPLICATION_PGP_SIGNATURE("application/pgp-signature"), + APPLICATION_PIDF_DIFF_XML("application/pidf-diff+xml"), + APPLICATION_PIDF_XML("application/pidf+xml"), + APPLICATION_PKCS10("application/pkcs10"), + APPLICATION_PKCS7_MIME("application/pkcs7-mime"), + APPLICATION_PKCS7_SIGNATURE("application/pkcs7-signature"), + APPLICATION_PKCS8("application/pkcs8"), + APPLICATION_PKCS8_ENCRYPTED("application/pkcs8-encrypted"), + APPLICATION_PKCS12("application/pkcs12"), + APPLICATION_PKIX_ATTR_CERT("application/pkix-attr-cert"), + APPLICATION_PKIX_CERT("application/pkix-cert"), + APPLICATION_PKIX_CRL("application/pkix-crl"), + APPLICATION_PKIX_PKIPATH("application/pkix-pkipath"), + APPLICATION_PKIXCMP("application/pkixcmp"), + APPLICATION_PLS_XML("application/pls+xml"), + APPLICATION_POC_SETTINGS_XML("application/poc-settings+xml"), + APPLICATION_POSTSCRIPT("application/postscript"), + APPLICATION_PPSP_TRACKER_JSON("application/ppsp-tracker+json"), + APPLICATION_PRIVATE_TOKEN_ISSUER_DIRECTORY("application/private-token-issuer-directory"), + APPLICATION_PRIVATE_TOKEN_REQUEST("application/private-token-request"), + APPLICATION_PRIVATE_TOKEN_RESPONSE("application/private-token-response"), + APPLICATION_PROBLEM_JSON("application/problem+json"), + APPLICATION_PROBLEM_XML("application/problem+xml"), + APPLICATION_PROTOBUF("application/protobuf"), + APPLICATION_PROTOBUF_JSON("application/protobuf+json"), + APPLICATION_PROVENANCE_XML("application/provenance+xml"), + APPLICATION_PROVIDED_CLAIMS_JWT("application/provided-claims+jwt"), + APPLICATION_PRS_ALVESTRAND_TITRAX_SHEET("application/prs.alvestrand.titrax-sheet"), + APPLICATION_PRS_CWW("application/prs.cww"), + APPLICATION_PRS_CYN("application/prs.cyn"), + APPLICATION_PRS_HPUB_ZIP("application/prs.hpub+zip"), + APPLICATION_PRS_IMPLIED_DOCUMENT_XML("application/prs.implied-document+xml"), + APPLICATION_PRS_IMPLIED_EXECUTABLE("application/prs.implied-executable"), + APPLICATION_PRS_IMPLIED_OBJECT_JSON("application/prs.implied-object+json"), + APPLICATION_PRS_IMPLIED_OBJECT_JSON_SEQ("application/prs.implied-object+json-seq"), + APPLICATION_PRS_IMPLIED_OBJECT_YAML("application/prs.implied-object+yaml"), + APPLICATION_PRS_IMPLIED_STRUCTURE("application/prs.implied-structure"), + APPLICATION_PRS_MAYFILE("application/prs.mayfile"), + APPLICATION_PRS_NPREND("application/prs.nprend"), + APPLICATION_PRS_PLUCKER("application/prs.plucker"), + APPLICATION_PRS_RDF_XML_CRYPT("application/prs.rdf-xml-crypt"), + APPLICATION_PRS_SCLT("application/prs.sclt"), + APPLICATION_PRS_VCFBZIP2("application/prs.vcfbzip2"), + APPLICATION_PRS_XSF_XML("application/prs.xsf+xml"), + APPLICATION_PSKC_XML("application/pskc+xml"), + APPLICATION_PVD_JSON("application/pvd+json"), + APPLICATION_RDF_XML("application/rdf+xml"), + APPLICATION_ROUTE_APD_XML("application/route-apd+xml"), + APPLICATION_ROUTE_S_TSID_XML("application/route-s-tsid+xml"), + APPLICATION_ROUTE_USD_XML("application/route-usd+xml"), + APPLICATION_QSIG("application/QSIG"), + APPLICATION_RAPTORFEC("application/raptorfec"), + APPLICATION_RDAP_JSON("application/rdap+json"), + APPLICATION_REGINFO_XML("application/reginfo+xml"), + APPLICATION_RELAX_NG_COMPACT_SYNTAX("application/relax-ng-compact-syntax"), + APPLICATION_REMOTE_PRINTING("application/remote-printing"), + APPLICATION_REPUTON_JSON("application/reputon+json"), + APPLICATION_RESOLVE_RESPONSE_JWT("application/resolve-response+jwt"), + APPLICATION_RESOURCE_LISTS_DIFF_XML("application/resource-lists-diff+xml"), + APPLICATION_RESOURCE_LISTS_XML("application/resource-lists+xml"), + APPLICATION_RFC_XML("application/rfc+xml"), + APPLICATION_RISCOS("application/riscos"), + APPLICATION_RLMI_XML("application/rlmi+xml"), + APPLICATION_RLS_SERVICES_XML("application/rls-services+xml"), + APPLICATION_RPKI_CHECKLIST("application/rpki-checklist"), + APPLICATION_RPKI_GHOSTBUSTERS("application/rpki-ghostbusters"), + APPLICATION_RPKI_MANIFEST("application/rpki-manifest"), + APPLICATION_RPKI_PUBLICATION("application/rpki-publication"), + APPLICATION_RPKI_ROA("application/rpki-roa"), + APPLICATION_RPKI_SIGNED_TAL("application/rpki-signed-tal"), + APPLICATION_RPKI_UPDOWN("application/rpki-updown"), + APPLICATION_RS_METADATA_XML("application/rs-metadata+xml"), + APPLICATION_RTF("application/rtf"), + APPLICATION_RTPLOOPBACK("application/rtploopback"), + APPLICATION_RTX("application/rtx"), + APPLICATION_SAMLASSERTION_XML("application/samlassertion+xml"), + APPLICATION_SAMLMETADATA_XML("application/samlmetadata+xml"), + APPLICATION_SARIF_EXTERNAL_PROPERTIES_JSON("application/sarif-external-properties+json"), + APPLICATION_SARIF_JSON("application/sarif+json"), + APPLICATION_SBE("application/sbe"), + APPLICATION_SBML_XML("application/sbml+xml"), + APPLICATION_SCAIP_XML("application/scaip+xml"), + APPLICATION_SCIM_JSON("application/scim+json"), + APPLICATION_SCITT_RECEIPT_COSE("application/scitt-receipt+cose"), + APPLICATION_SCITT_STATEMENT_COSE("application/scitt-statement+cose"), + APPLICATION_SCVP_CV_REQUEST("application/scvp-cv-request"), + APPLICATION_SCVP_CV_RESPONSE("application/scvp-cv-response"), + APPLICATION_SCVP_VP_REQUEST("application/scvp-vp-request"), + APPLICATION_SCVP_VP_RESPONSE("application/scvp-vp-response"), + APPLICATION_SD_JWT("application/sd-jwt"), + APPLICATION_SD_JWT_JSON("application/sd-jwt+json"), + APPLICATION_SDF_JSON("application/sdf+json"), + APPLICATION_SDP("application/sdp"), + APPLICATION_SECEVENT_JWT("application/secevent+jwt"), + APPLICATION_SENML_ETCH_CBOR("application/senml-etch+cbor"), + APPLICATION_SENML_ETCH_JSON("application/senml-etch+json"), + APPLICATION_SENML_EXI("application/senml-exi"), + APPLICATION_SENML_CBOR("application/senml+cbor"), + APPLICATION_SENML_JSON("application/senml+json"), + APPLICATION_SENML_XML("application/senml+xml"), + APPLICATION_SENSML_EXI("application/sensml-exi"), + APPLICATION_SENSML_CBOR("application/sensml+cbor"), + APPLICATION_SENSML_JSON("application/sensml+json"), + APPLICATION_SENSML_XML("application/sensml+xml"), + APPLICATION_SEP_EXI("application/sep-exi"), + APPLICATION_SEP_XML("application/sep+xml"), + APPLICATION_SESSION_INFO("application/session-info"), + APPLICATION_SET_PAYMENT("application/set-payment"), + APPLICATION_SET_PAYMENT_INITIATION("application/set-payment-initiation"), + APPLICATION_SET_REGISTRATION("application/set-registration"), + APPLICATION_SET_REGISTRATION_INITIATION("application/set-registration-initiation"), + APPLICATION_SGML("application/SGML"), + APPLICATION_SGML_OPEN_CATALOG("application/sgml-open-catalog"), + APPLICATION_SHF_XML("application/shf+xml"), + APPLICATION_SIEVE("application/sieve"), + APPLICATION_SIMPLE_FILTER_XML("application/simple-filter+xml"), + APPLICATION_SIMPLE_MESSAGE_SUMMARY("application/simple-message-summary"), + APPLICATION_SIMPLESYMBOLCONTAINER("application/simpleSymbolContainer"), + APPLICATION_SIPC("application/sipc"), + APPLICATION_SLATE("application/slate"), + APPLICATION_SMIL("application/smil"), + APPLICATION_SMIL_XML("application/smil+xml"), + APPLICATION_SMPTE336M("application/smpte336m"), + APPLICATION_SOAP_FASTINFOSET("application/soap+fastinfoset"), + APPLICATION_SOAP_XML("application/soap+xml"), + APPLICATION_SPARQL_QUERY("application/sparql-query"), + APPLICATION_SPDX_JSON("application/spdx+json"), + APPLICATION_SPARQL_RESULTS_XML("application/sparql-results+xml"), + APPLICATION_SPIRITS_EVENT_XML("application/spirits-event+xml"), + APPLICATION_SQL("application/sql"), + APPLICATION_SRGS("application/srgs"), + APPLICATION_SRGS_XML("application/srgs+xml"), + APPLICATION_SRU_XML("application/sru+xml"), + APPLICATION_SSLKEYLOGFILE("application/sslkeylogfile"), + APPLICATION_SSML_XML("application/ssml+xml"), + APPLICATION_ST2110_41("application/ST2110-41"), + APPLICATION_STIX_JSON("application/stix+json"), + APPLICATION_STRATUM("application/stratum"), + APPLICATION_SUIT_ENVELOPE_COSE("application/suit-envelope+cose"), + APPLICATION_SUIT_REPORT_COSE("application/suit-report+cose"), + APPLICATION_SWID_CBOR("application/swid+cbor"), + APPLICATION_SWID_XML("application/swid+xml"), + APPLICATION_TAMP_APEX_UPDATE("application/tamp-apex-update"), + APPLICATION_TAMP_APEX_UPDATE_CONFIRM("application/tamp-apex-update-confirm"), + APPLICATION_TAMP_COMMUNITY_UPDATE("application/tamp-community-update"), + APPLICATION_TAMP_COMMUNITY_UPDATE_CONFIRM("application/tamp-community-update-confirm"), + APPLICATION_TAMP_ERROR("application/tamp-error"), + APPLICATION_TAMP_SEQUENCE_ADJUST("application/tamp-sequence-adjust"), + APPLICATION_TAMP_SEQUENCE_ADJUST_CONFIRM("application/tamp-sequence-adjust-confirm"), + APPLICATION_TAMP_STATUS_QUERY("application/tamp-status-query"), + APPLICATION_TAMP_STATUS_RESPONSE("application/tamp-status-response"), + APPLICATION_TAMP_UPDATE("application/tamp-update"), + APPLICATION_TAMP_UPDATE_CONFIRM("application/tamp-update-confirm"), + APPLICATION_TAXII_JSON("application/taxii+json"), + APPLICATION_TD_JSON("application/td+json"), + APPLICATION_TEI_XML("application/tei+xml"), + APPLICATION_TETRA_ISI("application/TETRA_ISI"), + APPLICATION_TEXINFO("application/texinfo"), + APPLICATION_THRAUD_XML("application/thraud+xml"), + APPLICATION_TIMESTAMP_QUERY("application/timestamp-query"), + APPLICATION_TIMESTAMP_REPLY("application/timestamp-reply"), + APPLICATION_TIMESTAMPED_DATA("application/timestamped-data"), + APPLICATION_TLSRPT_GZIP("application/tlsrpt+gzip"), + APPLICATION_TLSRPT_JSON("application/tlsrpt+json"), + APPLICATION_TM_JSON("application/tm+json"), + APPLICATION_TNAUTHLIST("application/tnauthlist"), + APPLICATION_TOC_CBOR("application/toc+cbor"), + APPLICATION_TOKEN_INTROSPECTION_JWT("application/token-introspection+jwt"), + APPLICATION_TOML("application/toml"), + APPLICATION_TRICKLE_ICE_SDPFRAG("application/trickle-ice-sdpfrag"), + APPLICATION_TRIG("application/trig"), + APPLICATION_TRUST_CHAIN_JSON("application/trust-chain+json"), + APPLICATION_TRUST_MARK_JWT("application/trust-mark+jwt"), + APPLICATION_TRUST_MARK_DELEGATION_JWT("application/trust-mark-delegation+jwt"), + APPLICATION_TRUST_MARK_STATUS_RESPONSE_JWT("application/trust-mark-status-response+jwt"), + APPLICATION_TTML_XML("application/ttml+xml"), + APPLICATION_TVE_TRIGGER("application/tve-trigger"), + APPLICATION_TZIF("application/tzif"), + APPLICATION_TZIF_LEAP("application/tzif-leap"), + APPLICATION_UCCS_CBOR("application/uccs+cbor"), + APPLICATION_UJCS_JSON("application/ujcs+json"), + APPLICATION_ULPFEC("application/ulpfec"), + APPLICATION_URC_GRPSHEET_XML("application/urc-grpsheet+xml"), + APPLICATION_URC_RESSHEET_XML("application/urc-ressheet+xml"), + APPLICATION_URC_TARGETDESC_XML("application/urc-targetdesc+xml"), + APPLICATION_URC_UISOCKETDESC_XML("application/urc-uisocketdesc+xml"), + APPLICATION_VC("application/vc"), + APPLICATION_VC_COSE("application/vc+cose"), + APPLICATION_VC_JWT("application/vc+jwt"), + APPLICATION_VC_SD_JWT("application/vc+sd-jwt"), + APPLICATION_VCARD_JSON("application/vcard+json"), + APPLICATION_VCARD_XML("application/vcard+xml"), + APPLICATION_VEC_XML("application/vec+xml"), + APPLICATION_VEC_PACKAGE_GZIP("application/vec-package+gzip"), + APPLICATION_VEC_PACKAGE_ZIP("application/vec-package+zip"), + APPLICATION_VEMMI("application/vemmi"), + APPLICATION_VND_1000MINDS_DECISION_MODEL_XML("application/vnd.1000minds.decision-model+xml"), + APPLICATION_VND_1OB("application/vnd.1ob"), + APPLICATION_VND_3GPP_5GNAS("application/vnd.3gpp.5gnas"), + APPLICATION_VND_3GPP_5GSA2X("application/vnd.3gpp.5gsa2x"), + APPLICATION_VND_3GPP_5GSA2X_LOCAL_SERVICE_INFORMATION("application/vnd.3gpp.5gsa2x-local-service-information"), + APPLICATION_VND_3GPP_5GSV2X("application/vnd.3gpp.5gsv2x"), + APPLICATION_VND_3GPP_5GSV2X_LOCAL_SERVICE_INFORMATION("application/vnd.3gpp.5gsv2x-local-service-information"), + APPLICATION_VND_3GPP_ACCESS_TRANSFER_EVENTS_XML("application/vnd.3gpp.access-transfer-events+xml"), + APPLICATION_VND_3GPP_BSF_XML("application/vnd.3gpp.bsf+xml"), + APPLICATION_VND_3GPP_CRS_XML("application/vnd.3gpp.crs+xml"), + APPLICATION_VND_3GPP_CURRENT_LOCATION_DISCOVERY_XML("application/vnd.3gpp.current-location-discovery+xml"), + APPLICATION_VND_3GPP_GMOP_XML("application/vnd.3gpp.GMOP+xml"), + APPLICATION_VND_3GPP_GTPC("application/vnd.3gpp.gtpc"), + APPLICATION_VND_3GPP_INTERWORKING_DATA("application/vnd.3gpp.interworking-data"), + APPLICATION_VND_3GPP_LPP("application/vnd.3gpp.lpp"), + APPLICATION_VND_3GPP_MC_SIGNALLING_EAR("application/vnd.3gpp.mc-signalling-ear"), + APPLICATION_VND_3GPP_MCDATA_AFFILIATION_COMMAND_XML("application/vnd.3gpp.mcdata-affiliation-command+xml"), + APPLICATION_VND_3GPP_MCDATA_INFO_XML("application/vnd.3gpp.mcdata-info+xml"), + APPLICATION_VND_3GPP_MCDATA_MSGSTORE_CTRL_REQUEST_XML("application/vnd.3gpp.mcdata-msgstore-ctrl-request+xml"), + APPLICATION_VND_3GPP_MCDATA_PAYLOAD("application/vnd.3gpp.mcdata-payload"), + APPLICATION_VND_3GPP_MCDATA_REGROUP_XML("application/vnd.3gpp.mcdata-regroup+xml"), + APPLICATION_VND_3GPP_MCDATA_SERVICE_CONFIG_XML("application/vnd.3gpp.mcdata-service-config+xml"), + APPLICATION_VND_3GPP_MCDATA_SIGNALLING("application/vnd.3gpp.mcdata-signalling"), + APPLICATION_VND_3GPP_MCDATA_UE_CONFIG_XML("application/vnd.3gpp.mcdata-ue-config+xml"), + APPLICATION_VND_3GPP_MCDATA_USER_PROFILE_XML("application/vnd.3gpp.mcdata-user-profile+xml"), + APPLICATION_VND_3GPP_MCPTT_AFFILIATION_COMMAND_XML("application/vnd.3gpp.mcptt-affiliation-command+xml"), + APPLICATION_VND_3GPP_MCPTT_FLOOR_REQUEST_XML("application/vnd.3gpp.mcptt-floor-request+xml"), + APPLICATION_VND_3GPP_MCPTT_INFO_XML("application/vnd.3gpp.mcptt-info+xml"), + APPLICATION_VND_3GPP_MCPTT_LOCATION_INFO_XML("application/vnd.3gpp.mcptt-location-info+xml"), + APPLICATION_VND_3GPP_MCPTT_MBMS_USAGE_INFO_XML("application/vnd.3gpp.mcptt-mbms-usage-info+xml"), + APPLICATION_VND_3GPP_MCPTT_REGROUP_XML("application/vnd.3gpp.mcptt-regroup+xml"), + APPLICATION_VND_3GPP_MCPTT_SERVICE_CONFIG_XML("application/vnd.3gpp.mcptt-service-config+xml"), + APPLICATION_VND_3GPP_MCPTT_SIGNED_XML("application/vnd.3gpp.mcptt-signed+xml"), + APPLICATION_VND_3GPP_MCPTT_UE_CONFIG_XML("application/vnd.3gpp.mcptt-ue-config+xml"), + APPLICATION_VND_3GPP_MCPTT_UE_INIT_CONFIG_XML("application/vnd.3gpp.mcptt-ue-init-config+xml"), + APPLICATION_VND_3GPP_MCPTT_USER_PROFILE_XML("application/vnd.3gpp.mcptt-user-profile+xml"), + APPLICATION_VND_3GPP_MCVIDEO_AFFILIATION_COMMAND_XML("application/vnd.3gpp.mcvideo-affiliation-command+xml"), + APPLICATION_VND_3GPP_MCVIDEO_AFFILIATION_INFO_XML("application/vnd.3gpp.mcvideo-affiliation-info+xml"), + APPLICATION_VND_3GPP_MCVIDEO_INFO_XML("application/vnd.3gpp.mcvideo-info+xml"), + APPLICATION_VND_3GPP_MCVIDEO_LOCATION_INFO_XML("application/vnd.3gpp.mcvideo-location-info+xml"), + APPLICATION_VND_3GPP_MCVIDEO_MBMS_USAGE_INFO_XML("application/vnd.3gpp.mcvideo-mbms-usage-info+xml"), + APPLICATION_VND_3GPP_MCVIDEO_REGROUP_XML("application/vnd.3gpp.mcvideo-regroup+xml"), + APPLICATION_VND_3GPP_MCVIDEO_SERVICE_CONFIG_XML("application/vnd.3gpp.mcvideo-service-config+xml"), + APPLICATION_VND_3GPP_MCVIDEO_TRANSMISSION_REQUEST_XML("application/vnd.3gpp.mcvideo-transmission-request+xml"), + APPLICATION_VND_3GPP_MCVIDEO_UE_CONFIG_XML("application/vnd.3gpp.mcvideo-ue-config+xml"), + APPLICATION_VND_3GPP_MCVIDEO_USER_PROFILE_XML("application/vnd.3gpp.mcvideo-user-profile+xml"), + APPLICATION_VND_3GPP_MID_CALL_XML("application/vnd.3gpp.mid-call+xml"), + APPLICATION_VND_3GPP_NGAP("application/vnd.3gpp.ngap"), + APPLICATION_VND_3GPP_PFCP("application/vnd.3gpp.pfcp"), + APPLICATION_VND_3GPP_PIC_BW_LARGE("application/vnd.3gpp.pic-bw-large"), + APPLICATION_VND_3GPP_PIC_BW_SMALL("application/vnd.3gpp.pic-bw-small"), + APPLICATION_VND_3GPP_PIC_BW_VAR("application/vnd.3gpp.pic-bw-var"), + APPLICATION_VND_3GPP_PINAPP_INFO_XML("application/vnd.3gpp.pinapp-info+xml"), + APPLICATION_VND_3GPP_PROSE_PC3A_XML("application/vnd.3gpp-prose-pc3a+xml"), + APPLICATION_VND_3GPP_PROSE_PC3ACH_XML("application/vnd.3gpp-prose-pc3ach+xml"), + APPLICATION_VND_3GPP_PROSE_PC3CH_XML("application/vnd.3gpp-prose-pc3ch+xml"), + APPLICATION_VND_3GPP_PROSE_PC8_XML("application/vnd.3gpp-prose-pc8+xml"), + APPLICATION_VND_3GPP_PROSE_XML("application/vnd.3gpp-prose+xml"), + APPLICATION_VND_3GPP_S1AP("application/vnd.3gpp.s1ap"), + APPLICATION_VND_3GPP_SEAL_APP_COMM_REQUIREMENTS_INFO_XML("application/vnd.3gpp.seal-app-comm-requirements-info+xml"), + APPLICATION_VND_3GPP_SEAL_DATA_DELIVERY_INFO_CBOR("application/vnd.3gpp.seal-data-delivery-info+cbor"), + APPLICATION_VND_3GPP_SEAL_DATA_DELIVERY_INFO_XML("application/vnd.3gpp.seal-data-delivery-info+xml"), + APPLICATION_VND_3GPP_SEAL_GROUP_DOC_XML("application/vnd.3gpp.seal-group-doc+xml"), + APPLICATION_VND_3GPP_SEAL_INFO_XML("application/vnd.3gpp.seal-info+xml"), + APPLICATION_VND_3GPP_SEAL_LOCATION_INFO_CBOR("application/vnd.3gpp.seal-location-info+cbor"), + APPLICATION_VND_3GPP_SEAL_LOCATION_INFO_XML("application/vnd.3gpp.seal-location-info+xml"), + APPLICATION_VND_3GPP_SEAL_MBMS_USAGE_INFO_XML("application/vnd.3gpp.seal-mbms-usage-info+xml"), + APPLICATION_VND_3GPP_SEAL_MBS_USAGE_INFO_XML("application/vnd.3gpp.seal-mbs-usage-info+xml"), + APPLICATION_VND_3GPP_SEAL_NETWORK_QOS_MANAGEMENT_INFO_XML("application/vnd.3gpp.seal-network-QoS-management-info+xml"), + APPLICATION_VND_3GPP_SEAL_NETWORK_RESOURCE_INFO_CBOR("application/vnd.3gpp.seal-network-resource-info+cbor"), + APPLICATION_VND_3GPP_SEAL_UE_CONFIG_INFO_XML("application/vnd.3gpp.seal-ue-config-info+xml"), + APPLICATION_VND_3GPP_SEAL_UNICAST_INFO_XML("application/vnd.3gpp.seal-unicast-info+xml"), + APPLICATION_VND_3GPP_SEAL_USER_PROFILE_INFO_XML("application/vnd.3gpp.seal-user-profile-info+xml"), + APPLICATION_VND_3GPP_SMS("application/vnd.3gpp.sms"), + APPLICATION_VND_3GPP_SMS_XML("application/vnd.3gpp.sms+xml"), + APPLICATION_VND_3GPP_SRVCC_EXT_XML("application/vnd.3gpp.srvcc-ext+xml"), + APPLICATION_VND_3GPP_SRVCC_INFO_XML("application/vnd.3gpp.SRVCC-info+xml"), + APPLICATION_VND_3GPP_STATE_AND_EVENT_INFO_XML("application/vnd.3gpp.state-and-event-info+xml"), + APPLICATION_VND_3GPP_USSD_XML("application/vnd.3gpp.ussd+xml"), + APPLICATION_VND_3GPP_VAE_INFO_XML("application/vnd.3gpp.vae-info+xml"), + APPLICATION_VND_3GPP_V2X_LOCAL_SERVICE_INFORMATION("application/vnd.3gpp-v2x-local-service-information"), + APPLICATION_VND_3GPP2_BCMCSINFO_XML("application/vnd.3gpp2.bcmcsinfo+xml"), + APPLICATION_VND_3GPP2_SMS("application/vnd.3gpp2.sms"), + APPLICATION_VND_3GPP2_TCAP("application/vnd.3gpp2.tcap"), + APPLICATION_VND_3GPP_V2X("application/vnd.3gpp.v2x"), + APPLICATION_VND_3LIGHTSSOFTWARE_IMAGESCAL("application/vnd.3lightssoftware.imagescal"), + APPLICATION_VND_3M_POST_IT_NOTES("application/vnd.3M.Post-it-Notes"), + APPLICATION_VND_ACCPAC_SIMPLY_ASO("application/vnd.accpac.simply.aso"), + APPLICATION_VND_ACCPAC_SIMPLY_IMP("application/vnd.accpac.simply.imp"), + APPLICATION_VND_ACM_ADDRESSXFER_JSON("application/vnd.acm.addressxfer+json"), + APPLICATION_VND_ACM_CHATBOT_JSON("application/vnd.acm.chatbot+json"), + APPLICATION_VND_ACUCOBOL("application/vnd.acucobol"), + APPLICATION_VND_ACUCORP("application/vnd.acucorp"), + APPLICATION_VND_ADOBE_FLASH_MOVIE("application/vnd.adobe.flash.movie"), + APPLICATION_VND_ADOBE_FORMSCENTRAL_FCDT("application/vnd.adobe.formscentral.fcdt"), + APPLICATION_VND_ADOBE_FXP("application/vnd.adobe.fxp"), + APPLICATION_VND_ADOBE_PARTIAL_UPLOAD("application/vnd.adobe.partial-upload"), + APPLICATION_VND_ADOBE_XDP_XML("application/vnd.adobe.xdp+xml"), + APPLICATION_VND_AETHER_IMP("application/vnd.aether.imp"), + APPLICATION_VND_AFPC_AFPLINEDATA("application/vnd.afpc.afplinedata"), + APPLICATION_VND_AFPC_AFPLINEDATA_PAGEDEF("application/vnd.afpc.afplinedata-pagedef"), + APPLICATION_VND_AFPC_CMOCA_CMRESOURCE("application/vnd.afpc.cmoca-cmresource"), + APPLICATION_VND_AFPC_FOCA_CHARSET("application/vnd.afpc.foca-charset"), + APPLICATION_VND_AFPC_FOCA_CODEDFONT("application/vnd.afpc.foca-codedfont"), + APPLICATION_VND_AFPC_FOCA_CODEPAGE("application/vnd.afpc.foca-codepage"), + APPLICATION_VND_AFPC_MODCA("application/vnd.afpc.modca"), + APPLICATION_VND_AFPC_MODCA_CMTABLE("application/vnd.afpc.modca-cmtable"), + APPLICATION_VND_AFPC_MODCA_FORMDEF("application/vnd.afpc.modca-formdef"), + APPLICATION_VND_AFPC_MODCA_MEDIUMMAP("application/vnd.afpc.modca-mediummap"), + APPLICATION_VND_AFPC_MODCA_OBJECTCONTAINER("application/vnd.afpc.modca-objectcontainer"), + APPLICATION_VND_AFPC_MODCA_OVERLAY("application/vnd.afpc.modca-overlay"), + APPLICATION_VND_AFPC_MODCA_PAGESEGMENT("application/vnd.afpc.modca-pagesegment"), + APPLICATION_VND_AGE("application/vnd.age"), + APPLICATION_VND_AH_BARCODE("application/vnd.ah-barcode"), + APPLICATION_VND_AHEAD_SPACE("application/vnd.ahead.space"), + APPLICATION_VND_AIA("application/vnd.aia"), + APPLICATION_VND_AIRZIP_FILESECURE_AZF("application/vnd.airzip.filesecure.azf"), + APPLICATION_VND_AIRZIP_FILESECURE_AZS("application/vnd.airzip.filesecure.azs"), + APPLICATION_VND_AMADEUS_JSON("application/vnd.amadeus+json"), + APPLICATION_VND_AMAZON_MOBI8_EBOOK("application/vnd.amazon.mobi8-ebook"), + APPLICATION_VND_AMERICANDYNAMICS_ACC("application/vnd.americandynamics.acc"), + APPLICATION_VND_AMIGA_AMI("application/vnd.amiga.ami"), + APPLICATION_VND_AMUNDSEN_MAZE_XML("application/vnd.amundsen.maze+xml"), + APPLICATION_VND_ANDROID_OTA("application/vnd.android.ota"), + APPLICATION_VND_ANKI("application/vnd.anki"), + APPLICATION_VND_ANSER_WEB_CERTIFICATE_ISSUE_INITIATION("application/vnd.anser-web-certificate-issue-initiation"), + APPLICATION_VND_ANTIX_GAME_COMPONENT("application/vnd.antix.game-component"), + APPLICATION_VND_APACHE_ARROW_FILE("application/vnd.apache.arrow.file"), + APPLICATION_VND_APACHE_ARROW_STREAM("application/vnd.apache.arrow.stream"), + APPLICATION_VND_APACHE_PARQUET("application/vnd.apache.parquet"), + APPLICATION_VND_APACHE_THRIFT_BINARY("application/vnd.apache.thrift.binary"), + APPLICATION_VND_APACHE_THRIFT_COMPACT("application/vnd.apache.thrift.compact"), + APPLICATION_VND_APACHE_THRIFT_JSON("application/vnd.apache.thrift.json"), + APPLICATION_VND_APEXLANG("application/vnd.apexlang"), + APPLICATION_VND_API_JSON("application/vnd.api+json"), + APPLICATION_VND_APLEXTOR_WARRP_JSON("application/vnd.aplextor.warrp+json"), + APPLICATION_VND_APOTHEKENDE_RESERVATION_JSON("application/vnd.apothekende.reservation+json"), + APPLICATION_VND_APPLE_INSTALLER_XML("application/vnd.apple.installer+xml"), + APPLICATION_VND_APPLE_KEYNOTE("application/vnd.apple.keynote"), + APPLICATION_VND_APPLE_MPEGURL("application/vnd.apple.mpegurl"), + APPLICATION_VND_APPLE_NUMBERS("application/vnd.apple.numbers"), + APPLICATION_VND_APPLE_PAGES("application/vnd.apple.pages"), + APPLICATION_VND_ARASTRA_SWI("application/vnd.arastra.swi"), + APPLICATION_VND_ARISTANETWORKS_SWI("application/vnd.aristanetworks.swi"), + APPLICATION_VND_ARTISAN_JSON("application/vnd.artisan+json"), + APPLICATION_VND_ARTSQUARE("application/vnd.artsquare"), + APPLICATION_VND_AS207960_VAS_CONFIG_JER("application/vnd.as207960.vas.config+jer"), + APPLICATION_VND_AS207960_VAS_CONFIG_UPER("application/vnd.as207960.vas.config+uper"), + APPLICATION_VND_AS207960_VAS_TAP_JER("application/vnd.as207960.vas.tap+jer"), + APPLICATION_VND_AS207960_VAS_TAP_UPER("application/vnd.as207960.vas.tap+uper"), + APPLICATION_VND_ASTRAEA_SOFTWARE_IOTA("application/vnd.astraea-software.iota"), + APPLICATION_VND_AUDIOGRAPH("application/vnd.audiograph"), + APPLICATION_VND_AUTOPACKAGE("application/vnd.autopackage"), + APPLICATION_VND_AVALON_JSON("application/vnd.avalon+json"), + APPLICATION_VND_AVISTAR_XML("application/vnd.avistar+xml"), + APPLICATION_VND_BALSAMIQ_BMML_XML("application/vnd.balsamiq.bmml+xml"), + APPLICATION_VND_BANANA_ACCOUNTING("application/vnd.banana-accounting"), + APPLICATION_VND_BBF_USP_ERROR("application/vnd.bbf.usp.error"), + APPLICATION_VND_BBF_USP_MSG("application/vnd.bbf.usp.msg"), + APPLICATION_VND_BBF_USP_MSG_JSON("application/vnd.bbf.usp.msg+json"), + APPLICATION_VND_BALSAMIQ_BMPR("application/vnd.balsamiq.bmpr"), + APPLICATION_VND_BEKITZUR_STECH_JSON("application/vnd.bekitzur-stech+json"), + APPLICATION_VND_BELIGHTSOFT_LHZD_ZIP("application/vnd.belightsoft.lhzd+zip"), + APPLICATION_VND_BELIGHTSOFT_LHZL_ZIP("application/vnd.belightsoft.lhzl+zip"), + APPLICATION_VND_BINT_MED_CONTENT("application/vnd.bint.med-content"), + APPLICATION_VND_BIOPAX_RDF_XML("application/vnd.biopax.rdf+xml"), + APPLICATION_VND_BLINK_IDB_VALUE_WRAPPER("application/vnd.blink-idb-value-wrapper"), + APPLICATION_VND_BLUEICE_MULTIPASS("application/vnd.blueice.multipass"), + APPLICATION_VND_BLUETOOTH_EP_OOB("application/vnd.bluetooth.ep.oob"), + APPLICATION_VND_BLUETOOTH_LE_OOB("application/vnd.bluetooth.le.oob"), + APPLICATION_VND_BMI("application/vnd.bmi"), + APPLICATION_VND_BPF("application/vnd.bpf"), + APPLICATION_VND_BPF3("application/vnd.bpf3"), + APPLICATION_VND_BUSINESSOBJECTS("application/vnd.businessobjects"), + APPLICATION_VND_BYU_UAPI_JSON("application/vnd.byu.uapi+json"), + APPLICATION_VND_BZIP3("application/vnd.bzip3"), + APPLICATION_VND_C3VOC_SCHEDULE_XML("application/vnd.c3voc.schedule+xml"), + APPLICATION_VND_CAB_JSCRIPT("application/vnd.cab-jscript"), + APPLICATION_VND_CANON_CPDL("application/vnd.canon-cpdl"), + APPLICATION_VND_CANON_LIPS("application/vnd.canon-lips"), + APPLICATION_VND_CAPASYSTEMS_PG_JSON("application/vnd.capasystems-pg+json"), + APPLICATION_VND_CEL("application/vnd.cel"), + APPLICATION_VND_CENDIO_THINLINC_CLIENTCONF("application/vnd.cendio.thinlinc.clientconf"), + APPLICATION_VND_CENTURY_SYSTEMS_TCP_STREAM("application/vnd.century-systems.tcp_stream"), + APPLICATION_VND_CHEMDRAW_XML("application/vnd.chemdraw+xml"), + APPLICATION_VND_CHESS_PGN("application/vnd.chess-pgn"), + APPLICATION_VND_CHIPNUTS_KARAOKE_MMD("application/vnd.chipnuts.karaoke-mmd"), + APPLICATION_VND_CIEDI("application/vnd.ciedi"), + APPLICATION_VND_CINDERELLA("application/vnd.cinderella"), + APPLICATION_VND_CIRPACK_ISDN_EXT("application/vnd.cirpack.isdn-ext"), + APPLICATION_VND_CITATIONSTYLES_STYLE_XML("application/vnd.citationstyles.style+xml"), + APPLICATION_VND_CLAYMORE("application/vnd.claymore"), + APPLICATION_VND_CLOANTO_RP9("application/vnd.cloanto.rp9"), + APPLICATION_VND_CLONK_C4GROUP("application/vnd.clonk.c4group"), + APPLICATION_VND_CLUETRUST_CARTOMOBILE_CONFIG("application/vnd.cluetrust.cartomobile-config"), + APPLICATION_VND_CLUETRUST_CARTOMOBILE_CONFIG_PKG("application/vnd.cluetrust.cartomobile-config-pkg"), + APPLICATION_VND_CNCF_HELM_CHART_CONTENT_V1_TAR_GZIP("application/vnd.cncf.helm.chart.content.v1.tar+gzip"), + APPLICATION_VND_CNCF_HELM_CHART_PROVENANCE_V1_PROV("application/vnd.cncf.helm.chart.provenance.v1.prov"), + APPLICATION_VND_CNCF_HELM_CONFIG_V1_JSON("application/vnd.cncf.helm.config.v1+json"), + APPLICATION_VND_COFFEESCRIPT("application/vnd.coffeescript"), + APPLICATION_VND_COLLABIO_XODOCUMENTS_DOCUMENT("application/vnd.collabio.xodocuments.document"), + APPLICATION_VND_COLLABIO_XODOCUMENTS_DOCUMENT_TEMPLATE("application/vnd.collabio.xodocuments.document-template"), + APPLICATION_VND_COLLABIO_XODOCUMENTS_PRESENTATION("application/vnd.collabio.xodocuments.presentation"), + APPLICATION_VND_COLLABIO_XODOCUMENTS_PRESENTATION_TEMPLATE("application/vnd.collabio.xodocuments.presentation-template"), + APPLICATION_VND_COLLABIO_XODOCUMENTS_SPREADSHEET("application/vnd.collabio.xodocuments.spreadsheet"), + APPLICATION_VND_COLLABIO_XODOCUMENTS_SPREADSHEET_TEMPLATE("application/vnd.collabio.xodocuments.spreadsheet-template"), + APPLICATION_VND_COLLECTION_DOC_JSON("application/vnd.collection.doc+json"), + APPLICATION_VND_COLLECTION_JSON("application/vnd.collection+json"), + APPLICATION_VND_COLLECTION_NEXT_JSON("application/vnd.collection.next+json"), + APPLICATION_VND_COMICBOOK_RAR("application/vnd.comicbook-rar"), + APPLICATION_VND_COMICBOOK_ZIP("application/vnd.comicbook+zip"), + APPLICATION_VND_COMMERCE_BATTELLE("application/vnd.commerce-battelle"), + APPLICATION_VND_COMMONSPACE("application/vnd.commonspace"), + APPLICATION_VND_COREOS_IGNITION_JSON("application/vnd.coreos.ignition+json"), + APPLICATION_VND_COSMOCALLER("application/vnd.cosmocaller"), + APPLICATION_VND_CONTACT_CMSG("application/vnd.contact.cmsg"), + APPLICATION_VND_CRICK_CLICKER("application/vnd.crick.clicker"), + APPLICATION_VND_CRICK_CLICKER_KEYBOARD("application/vnd.crick.clicker.keyboard"), + APPLICATION_VND_CRICK_CLICKER_PALETTE("application/vnd.crick.clicker.palette"), + APPLICATION_VND_CRICK_CLICKER_TEMPLATE("application/vnd.crick.clicker.template"), + APPLICATION_VND_CRICK_CLICKER_WORDBANK("application/vnd.crick.clicker.wordbank"), + APPLICATION_VND_CRITICALTOOLS_WBS_XML("application/vnd.criticaltools.wbs+xml"), + APPLICATION_VND_CRYPTII_PIPE_JSON("application/vnd.cryptii.pipe+json"), + APPLICATION_VND_CRYPTO_SHADE_FILE("application/vnd.crypto-shade-file"), + APPLICATION_VND_CRYPTOMATOR_ENCRYPTED("application/vnd.cryptomator.encrypted"), + APPLICATION_VND_CRYPTOMATOR_VAULT("application/vnd.cryptomator.vault"), + APPLICATION_VND_CTC_POSML("application/vnd.ctc-posml"), + APPLICATION_VND_CTCT_WS_XML("application/vnd.ctct.ws+xml"), + APPLICATION_VND_CUPS_PDF("application/vnd.cups-pdf"), + APPLICATION_VND_CUPS_POSTSCRIPT("application/vnd.cups-postscript"), + APPLICATION_VND_CUPS_PPD("application/vnd.cups-ppd"), + APPLICATION_VND_CUPS_RASTER("application/vnd.cups-raster"), + APPLICATION_VND_CUPS_RAW("application/vnd.cups-raw"), + APPLICATION_VND_CURL("application/vnd.curl"), + APPLICATION_VND_CYAN_DEAN_ROOT_XML("application/vnd.cyan.dean.root+xml"), + APPLICATION_VND_CYBANK("application/vnd.cybank"), + APPLICATION_VND_CYCLONEDX_JSON("application/vnd.cyclonedx+json"), + APPLICATION_VND_CYCLONEDX_XML("application/vnd.cyclonedx+xml"), + APPLICATION_VND_D2L_COURSEPACKAGE1P0_ZIP("application/vnd.d2l.coursepackage1p0+zip"), + APPLICATION_VND_D3M_DATASET("application/vnd.d3m-dataset"), + APPLICATION_VND_D3M_PROBLEM("application/vnd.d3m-problem"), + APPLICATION_VND_DART("application/vnd.dart"), + APPLICATION_VND_DATA_VISION_RDZ("application/vnd.data-vision.rdz"), + APPLICATION_VND_DATALOG("application/vnd.datalog"), + APPLICATION_VND_DATAPACKAGE_JSON("application/vnd.datapackage+json"), + APPLICATION_VND_DATARESOURCE_JSON("application/vnd.dataresource+json"), + APPLICATION_VND_DBF("application/vnd.dbf"), + APPLICATION_VND_DCMP_XML("application/vnd.dcmp+xml"), + APPLICATION_VND_DEBIAN_BINARY_PACKAGE("application/vnd.debian.binary-package"), + APPLICATION_VND_DECE_DATA("application/vnd.dece.data"), + APPLICATION_VND_DECE_TTML_XML("application/vnd.dece.ttml+xml"), + APPLICATION_VND_DECE_UNSPECIFIED("application/vnd.dece.unspecified"), + APPLICATION_VND_DECE_ZIP("application/vnd.dece.zip"), + APPLICATION_VND_DENOVO_FCSELAYOUT_LINK("application/vnd.denovo.fcselayout-link"), + APPLICATION_VND_DESMUME_MOVIE("application/vnd.desmume.movie"), + APPLICATION_VND_DIR_BI_PLATE_DL_NOSUFFIX("application/vnd.dir-bi.plate-dl-nosuffix"), + APPLICATION_VND_DM_DELEGATION_XML("application/vnd.dm.delegation+xml"), + APPLICATION_VND_DNA("application/vnd.dna"), + APPLICATION_VND_DOCUMENT_JSON("application/vnd.document+json"), + APPLICATION_VND_DOLBY_MOBILE_1("application/vnd.dolby.mobile.1"), + APPLICATION_VND_DOLBY_MOBILE_2("application/vnd.dolby.mobile.2"), + APPLICATION_VND_DOREMIR_SCORECLOUD_BINARY_DOCUMENT("application/vnd.doremir.scorecloud-binary-document"), + APPLICATION_VND_DPGRAPH("application/vnd.dpgraph"), + APPLICATION_VND_DREAMFACTORY("application/vnd.dreamfactory"), + APPLICATION_VND_DRIVE_JSON("application/vnd.drive+json"), + APPLICATION_VND_DTG_LOCAL("application/vnd.dtg.local"), + APPLICATION_VND_DTG_LOCAL_FLASH("application/vnd.dtg.local.flash"), + APPLICATION_VND_DTG_LOCAL_HTML("application/vnd.dtg.local.html"), + APPLICATION_VND_DVB_AIT("application/vnd.dvb.ait"), + APPLICATION_VND_DVB_DVBISL_XML("application/vnd.dvb.dvbisl+xml"), + APPLICATION_VND_DVB_DVBJ("application/vnd.dvb.dvbj"), + APPLICATION_VND_DVB_ESGCONTAINER("application/vnd.dvb.esgcontainer"), + APPLICATION_VND_DVB_IPDCDFTNOTIFACCESS("application/vnd.dvb.ipdcdftnotifaccess"), + APPLICATION_VND_DVB_IPDCESGACCESS("application/vnd.dvb.ipdcesgaccess"), + APPLICATION_VND_DVB_IPDCESGACCESS2("application/vnd.dvb.ipdcesgaccess2"), + APPLICATION_VND_DVB_IPDCESGPDD("application/vnd.dvb.ipdcesgpdd"), + APPLICATION_VND_DVB_IPDCROAMING("application/vnd.dvb.ipdcroaming"), + APPLICATION_VND_DVB_IPTV_ALFEC_BASE("application/vnd.dvb.iptv.alfec-base"), + APPLICATION_VND_DVB_IPTV_ALFEC_ENHANCEMENT("application/vnd.dvb.iptv.alfec-enhancement"), + APPLICATION_VND_DVB_NOTIF_AGGREGATE_ROOT_XML("application/vnd.dvb.notif-aggregate-root+xml"), + APPLICATION_VND_DVB_NOTIF_CONTAINER_XML("application/vnd.dvb.notif-container+xml"), + APPLICATION_VND_DVB_NOTIF_GENERIC_XML("application/vnd.dvb.notif-generic+xml"), + APPLICATION_VND_DVB_NOTIF_IA_MSGLIST_XML("application/vnd.dvb.notif-ia-msglist+xml"), + APPLICATION_VND_DVB_NOTIF_IA_REGISTRATION_REQUEST_XML("application/vnd.dvb.notif-ia-registration-request+xml"), + APPLICATION_VND_DVB_NOTIF_IA_REGISTRATION_RESPONSE_XML("application/vnd.dvb.notif-ia-registration-response+xml"), + APPLICATION_VND_DVB_NOTIF_INIT_XML("application/vnd.dvb.notif-init+xml"), + APPLICATION_VND_DVB_PFR("application/vnd.dvb.pfr"), + APPLICATION_VND_DVB_SERVICE("application/vnd.dvb.service"), + APPLICATION_VND_DXR("application/vnd.dxr"), + APPLICATION_VND_DYNAGEO("application/vnd.dynageo"), + APPLICATION_VND_DZR("application/vnd.dzr"), + APPLICATION_VND_EASYKARAOKE_CDGDOWNLOAD("application/vnd.easykaraoke.cdgdownload"), + APPLICATION_VND_ECIP_RLP("application/vnd.ecip.rlp"), + APPLICATION_VND_ECDIS_UPDATE("application/vnd.ecdis-update"), + APPLICATION_VND_ECLIPSE_DITTO_JSON("application/vnd.eclipse.ditto+json"), + APPLICATION_VND_ECOWIN_CHART("application/vnd.ecowin.chart"), + APPLICATION_VND_ECOWIN_FILEREQUEST("application/vnd.ecowin.filerequest"), + APPLICATION_VND_ECOWIN_FILEUPDATE("application/vnd.ecowin.fileupdate"), + APPLICATION_VND_ECOWIN_SERIES("application/vnd.ecowin.series"), + APPLICATION_VND_ECOWIN_SERIESREQUEST("application/vnd.ecowin.seriesrequest"), + APPLICATION_VND_ECOWIN_SERIESUPDATE("application/vnd.ecowin.seriesupdate"), + APPLICATION_VND_EFI_IMG("application/vnd.efi.img"), + APPLICATION_VND_EFI_ISO("application/vnd.efi.iso"), + APPLICATION_VND_ELN_ZIP("application/vnd.eln+zip"), + APPLICATION_VND_EMCLIENT_ACCESSREQUEST_XML("application/vnd.emclient.accessrequest+xml"), + APPLICATION_VND_ENLIVEN("application/vnd.enliven"), + APPLICATION_VND_ENPHASE_ENVOY("application/vnd.enphase.envoy"), + APPLICATION_VND_EPRINTS_DATA_XML("application/vnd.eprints.data+xml"), + APPLICATION_VND_EPSON_ESF("application/vnd.epson.esf"), + APPLICATION_VND_EPSON_MSF("application/vnd.epson.msf"), + APPLICATION_VND_EPSON_QUICKANIME("application/vnd.epson.quickanime"), + APPLICATION_VND_EPSON_SALT("application/vnd.epson.salt"), + APPLICATION_VND_EPSON_SSF("application/vnd.epson.ssf"), + APPLICATION_VND_ERICSSON_QUICKCALL("application/vnd.ericsson.quickcall"), + APPLICATION_VND_EROFS("application/vnd.erofs"), + APPLICATION_VND_ESPASS_ESPASS_ZIP("application/vnd.espass-espass+zip"), + APPLICATION_VND_ESZIGNO3_XML("application/vnd.eszigno3+xml"), + APPLICATION_VND_ETSI_AOC_XML("application/vnd.etsi.aoc+xml"), + APPLICATION_VND_ETSI_ASIC_S_ZIP("application/vnd.etsi.asic-s+zip"), + APPLICATION_VND_ETSI_ASIC_E_ZIP("application/vnd.etsi.asic-e+zip"), + APPLICATION_VND_ETSI_CUG_XML("application/vnd.etsi.cug+xml"), + APPLICATION_VND_ETSI_IPTVCOMMAND_XML("application/vnd.etsi.iptvcommand+xml"), + APPLICATION_VND_ETSI_IPTVDISCOVERY_XML("application/vnd.etsi.iptvdiscovery+xml"), + APPLICATION_VND_ETSI_IPTVPROFILE_XML("application/vnd.etsi.iptvprofile+xml"), + APPLICATION_VND_ETSI_IPTVSAD_BC_XML("application/vnd.etsi.iptvsad-bc+xml"), + APPLICATION_VND_ETSI_IPTVSAD_COD_XML("application/vnd.etsi.iptvsad-cod+xml"), + APPLICATION_VND_ETSI_IPTVSAD_NPVR_XML("application/vnd.etsi.iptvsad-npvr+xml"), + APPLICATION_VND_ETSI_IPTVSERVICE_XML("application/vnd.etsi.iptvservice+xml"), + APPLICATION_VND_ETSI_IPTVSYNC_XML("application/vnd.etsi.iptvsync+xml"), + APPLICATION_VND_ETSI_IPTVUEPROFILE_XML("application/vnd.etsi.iptvueprofile+xml"), + APPLICATION_VND_ETSI_MCID_XML("application/vnd.etsi.mcid+xml"), + APPLICATION_VND_ETSI_MHEG5("application/vnd.etsi.mheg5"), + APPLICATION_VND_ETSI_OVERLOAD_CONTROL_POLICY_DATASET_XML("application/vnd.etsi.overload-control-policy-dataset+xml"), + APPLICATION_VND_ETSI_PSTN_XML("application/vnd.etsi.pstn+xml"), + APPLICATION_VND_ETSI_SCI_XML("application/vnd.etsi.sci+xml"), + APPLICATION_VND_ETSI_SIMSERVS_XML("application/vnd.etsi.simservs+xml"), + APPLICATION_VND_ETSI_TIMESTAMP_TOKEN("application/vnd.etsi.timestamp-token"), + APPLICATION_VND_ETSI_TSL_XML("application/vnd.etsi.tsl+xml"), + APPLICATION_VND_ETSI_TSL_DER("application/vnd.etsi.tsl.der"), + APPLICATION_VND_EU_KASPARIAN_CAR_JSON("application/vnd.eu.kasparian.car+json"), + APPLICATION_VND_EUDORA_DATA("application/vnd.eudora.data"), + APPLICATION_VND_EVOLV_ECIG_PROFILE("application/vnd.evolv.ecig.profile"), + APPLICATION_VND_EVOLV_ECIG_SETTINGS("application/vnd.evolv.ecig.settings"), + APPLICATION_VND_EVOLV_ECIG_THEME("application/vnd.evolv.ecig.theme"), + APPLICATION_VND_EXSTREAM_EMPOWER_ZIP("application/vnd.exstream-empower+zip"), + APPLICATION_VND_EXSTREAM_PACKAGE("application/vnd.exstream-package"), + APPLICATION_VND_EZPIX_ALBUM("application/vnd.ezpix-album"), + APPLICATION_VND_EZPIX_PACKAGE("application/vnd.ezpix-package"), + APPLICATION_VND_F_SECURE_MOBILE("application/vnd.f-secure.mobile"), + APPLICATION_VND_FAF_YAML("application/vnd.faf+yaml"), + APPLICATION_VND_FASTCOPY_DISK_IMAGE("application/vnd.fastcopy-disk-image"), + APPLICATION_VND_FAMILYSEARCH_GEDCOM_ZIP("application/vnd.familysearch.gedcom+zip"), + APPLICATION_VND_FDSN_MSEED("application/vnd.fdsn.mseed"), + APPLICATION_VND_FDSN_SEED("application/vnd.fdsn.seed"), + APPLICATION_VND_FDSN_STATIONXML_XML("application/vnd.fdsn.stationxml+xml"), + APPLICATION_VND_FFSNS("application/vnd.ffsns"), + APPLICATION_VND_FGB("application/vnd.fgb"), + APPLICATION_VND_FICLAB_FLB_ZIP("application/vnd.ficlab.flb+zip"), + APPLICATION_VND_FILMIT_ZFC("application/vnd.filmit.zfc"), + APPLICATION_VND_FINTS("application/vnd.fints"), + APPLICATION_VND_FIREMONKEYS_CLOUDCELL("application/vnd.firemonkeys.cloudcell"), + APPLICATION_VND_FLOGRAPHIT("application/vnd.FloGraphIt"), + APPLICATION_VND_FLUXTIME_CLIP("application/vnd.fluxtime.clip"), + APPLICATION_VND_FONT_FONTFORGE_SFD("application/vnd.font-fontforge-sfd"), + APPLICATION_VND_FRAMEMAKER("application/vnd.framemaker"), + APPLICATION_VND_FREELOG_COMIC("application/vnd.freelog.comic"), + APPLICATION_VND_FROGANS_FNC("application/vnd.frogans.fnc"), + APPLICATION_VND_FROGANS_LTF("application/vnd.frogans.ltf"), + APPLICATION_VND_FSC_WEBLAUNCH("application/vnd.fsc.weblaunch"), + APPLICATION_VND_FUJIFILM_FB_DOCUWORKS("application/vnd.fujifilm.fb.docuworks"), + APPLICATION_VND_FUJIFILM_FB_DOCUWORKS_BINDER("application/vnd.fujifilm.fb.docuworks.binder"), + APPLICATION_VND_FUJIFILM_FB_DOCUWORKS_CONTAINER("application/vnd.fujifilm.fb.docuworks.container"), + APPLICATION_VND_FUJIFILM_FB_JFI_XML("application/vnd.fujifilm.fb.jfi+xml"), + APPLICATION_VND_FUJITSU_OASYS("application/vnd.fujitsu.oasys"), + APPLICATION_VND_FUJITSU_OASYS2("application/vnd.fujitsu.oasys2"), + APPLICATION_VND_FUJITSU_OASYS3("application/vnd.fujitsu.oasys3"), + APPLICATION_VND_FUJITSU_OASYSGP("application/vnd.fujitsu.oasysgp"), + APPLICATION_VND_FUJITSU_OASYSPRS("application/vnd.fujitsu.oasysprs"), + APPLICATION_VND_FUJIXEROX_ART4("application/vnd.fujixerox.ART4"), + APPLICATION_VND_FUJIXEROX_ART_EX("application/vnd.fujixerox.ART-EX"), + APPLICATION_VND_FUJIXEROX_DDD("application/vnd.fujixerox.ddd"), + APPLICATION_VND_FUJIXEROX_DOCUWORKS("application/vnd.fujixerox.docuworks"), + APPLICATION_VND_FUJIXEROX_DOCUWORKS_BINDER("application/vnd.fujixerox.docuworks.binder"), + APPLICATION_VND_FUJIXEROX_DOCUWORKS_CONTAINER("application/vnd.fujixerox.docuworks.container"), + APPLICATION_VND_FUJIXEROX_HBPL("application/vnd.fujixerox.HBPL"), + APPLICATION_VND_FUT_MISNET("application/vnd.fut-misnet"), + APPLICATION_VND_FUTOIN_CBOR("application/vnd.futoin+cbor"), + APPLICATION_VND_FUTOIN_JSON("application/vnd.futoin+json"), + APPLICATION_VND_FUZZYSHEET("application/vnd.fuzzysheet"), + APPLICATION_VND_G3PIX_G3FC("application/vnd.g3pix.g3fc"), + APPLICATION_VND_GA4GH_PASSPORT_JWT("application/vnd.ga4gh.passport+jwt"), + APPLICATION_VND_GENOMATIX_TUXEDO("application/vnd.genomatix.tuxedo"), + APPLICATION_VND_GENOZIP("application/vnd.genozip"), + APPLICATION_VND_GENTICS_GRD_JSON("application/vnd.gentics.grd+json"), + APPLICATION_VND_GENTOO_CATMETADATA_XML("application/vnd.gentoo.catmetadata+xml"), + APPLICATION_VND_GENTOO_EBUILD("application/vnd.gentoo.ebuild"), + APPLICATION_VND_GENTOO_ECLASS("application/vnd.gentoo.eclass"), + APPLICATION_VND_GENTOO_GPKG("application/vnd.gentoo.gpkg"), + APPLICATION_VND_GENTOO_MANIFEST("application/vnd.gentoo.manifest"), + APPLICATION_VND_GENTOO_XPAK("application/vnd.gentoo.xpak"), + APPLICATION_VND_GENTOO_PKGMETADATA_XML("application/vnd.gentoo.pkgmetadata+xml"), + APPLICATION_VND_GEO_JSON("application/vnd.geo+json"), + APPLICATION_VND_GEOCUBE_XML("application/vnd.geocube+xml"), + APPLICATION_VND_GEOGEBRA_FILE("application/vnd.geogebra.file"), + APPLICATION_VND_GEOGEBRA_PINBOARD("application/vnd.geogebra.pinboard"), + APPLICATION_VND_GEOGEBRA_SLIDES("application/vnd.geogebra.slides"), + APPLICATION_VND_GEOGEBRA_TOOL("application/vnd.geogebra.tool"), + APPLICATION_VND_GEOMETRY_EXPLORER("application/vnd.geometry-explorer"), + APPLICATION_VND_GEONEXT("application/vnd.geonext"), + APPLICATION_VND_GEOPLAN("application/vnd.geoplan"), + APPLICATION_VND_GEOSPACE("application/vnd.geospace"), + APPLICATION_VND_GERBER("application/vnd.gerber"), + APPLICATION_VND_GLOBALPLATFORM_CARD_CONTENT_MGT("application/vnd.globalplatform.card-content-mgt"), + APPLICATION_VND_GLOBALPLATFORM_CARD_CONTENT_MGT_RESPONSE("application/vnd.globalplatform.card-content-mgt-response"), + APPLICATION_VND_GMX("application/vnd.gmx"), + APPLICATION_VND_GNU_TALER_EXCHANGE_JSON("application/vnd.gnu.taler.exchange+json"), + APPLICATION_VND_GNU_TALER_MERCHANT_JSON("application/vnd.gnu.taler.merchant+json"), + APPLICATION_VND_GOOGLE_EARTH_KML_XML("application/vnd.google-earth.kml+xml"), + APPLICATION_VND_GOOGLE_EARTH_KMZ("application/vnd.google-earth.kmz"), + APPLICATION_VND_GOV_SK_E_FORM_XML("application/vnd.gov.sk.e-form+xml"), + APPLICATION_VND_GOV_SK_E_FORM_ZIP("application/vnd.gov.sk.e-form+zip"), + APPLICATION_VND_GOV_SK_XMLDATACONTAINER_XML("application/vnd.gov.sk.xmldatacontainer+xml"), + APPLICATION_VND_GPXSEE_MAP_XML("application/vnd.gpxsee.map+xml"), + APPLICATION_VND_GRAFEQ("application/vnd.grafeq"), + APPLICATION_VND_GRIDMP("application/vnd.gridmp"), + APPLICATION_VND_GROOVE_ACCOUNT("application/vnd.groove-account"), + APPLICATION_VND_GROOVE_HELP("application/vnd.groove-help"), + APPLICATION_VND_GROOVE_IDENTITY_MESSAGE("application/vnd.groove-identity-message"), + APPLICATION_VND_GROOVE_INJECTOR("application/vnd.groove-injector"), + APPLICATION_VND_GROOVE_TOOL_MESSAGE("application/vnd.groove-tool-message"), + APPLICATION_VND_GROOVE_TOOL_TEMPLATE("application/vnd.groove-tool-template"), + APPLICATION_VND_GROOVE_VCARD("application/vnd.groove-vcard"), + APPLICATION_VND_HAL_JSON("application/vnd.hal+json"), + APPLICATION_VND_HAL_XML("application/vnd.hal+xml"), + APPLICATION_VND_HANDHELD_ENTERTAINMENT_XML("application/vnd.HandHeld-Entertainment+xml"), + APPLICATION_VND_HBCI("application/vnd.hbci"), + APPLICATION_VND_HC_JSON("application/vnd.hc+json"), + APPLICATION_VND_HCL_BIREPORTS("application/vnd.hcl-bireports"), + APPLICATION_VND_HDT("application/vnd.hdt"), + APPLICATION_VND_HEROKU_JSON("application/vnd.heroku+json"), + APPLICATION_VND_HHE_LESSON_PLAYER("application/vnd.hhe.lesson-player"), + APPLICATION_VND_HP_HPGL("application/vnd.hp-HPGL"), + APPLICATION_VND_HP_HPID("application/vnd.hp-hpid"), + APPLICATION_VND_HP_HPS("application/vnd.hp-hps"), + APPLICATION_VND_HP_JLYT("application/vnd.hp-jlyt"), + APPLICATION_VND_HP_PCL("application/vnd.hp-PCL"), + APPLICATION_VND_HP_PCLXL("application/vnd.hp-PCLXL"), + APPLICATION_VND_HSL("application/vnd.hsl"), + APPLICATION_VND_HTTPHONE("application/vnd.httphone"), + APPLICATION_VND_HYDROSTATIX_SOF_DATA("application/vnd.hydrostatix.sof-data"), + APPLICATION_VND_HYPER_ITEM_JSON("application/vnd.hyper-item+json"), + APPLICATION_VND_HYPER_JSON("application/vnd.hyper+json"), + APPLICATION_VND_HYPERDRIVE_JSON("application/vnd.hyperdrive+json"), + APPLICATION_VND_HZN_3D_CROSSWORD("application/vnd.hzn-3d-crossword"), + APPLICATION_VND_IBM_AFPLINEDATA("application/vnd.ibm.afplinedata"), + APPLICATION_VND_IBM_ELECTRONIC_MEDIA("application/vnd.ibm.electronic-media"), + APPLICATION_VND_IBM_MINIPAY("application/vnd.ibm.MiniPay"), + APPLICATION_VND_IBM_MODCAP("application/vnd.ibm.modcap"), + APPLICATION_VND_IBM_RIGHTS_MANAGEMENT("application/vnd.ibm.rights-management"), + APPLICATION_VND_IBM_SECURE_CONTAINER("application/vnd.ibm.secure-container"), + APPLICATION_VND_ICCPROFILE("application/vnd.iccprofile"), + APPLICATION_VND_IEEE_1905("application/vnd.ieee.1905"), + APPLICATION_VND_IGLOADER("application/vnd.igloader"), + APPLICATION_VND_IMAGEMETER_FOLDER_ZIP("application/vnd.imagemeter.folder+zip"), + APPLICATION_VND_IMAGEMETER_IMAGE_ZIP("application/vnd.imagemeter.image+zip"), + APPLICATION_VND_IMMERVISION_IVP("application/vnd.immervision-ivp"), + APPLICATION_VND_IMMERVISION_IVU("application/vnd.immervision-ivu"), + APPLICATION_VND_IMS_IMSCCV1P1("application/vnd.ims.imsccv1p1"), + APPLICATION_VND_IMS_IMSCCV1P2("application/vnd.ims.imsccv1p2"), + APPLICATION_VND_IMS_IMSCCV1P3("application/vnd.ims.imsccv1p3"), + APPLICATION_VND_IMS_LIS_V2_RESULT_JSON("application/vnd.ims.lis.v2.result+json"), + APPLICATION_VND_IMS_LTI_V2_TOOLCONSUMERPROFILE_JSON("application/vnd.ims.lti.v2.toolconsumerprofile+json"), + APPLICATION_VND_IMS_LTI_V2_TOOLPROXY_ID_JSON("application/vnd.ims.lti.v2.toolproxy.id+json"), + APPLICATION_VND_IMS_LTI_V2_TOOLPROXY_JSON("application/vnd.ims.lti.v2.toolproxy+json"), + APPLICATION_VND_IMS_LTI_V2_TOOLSETTINGS_JSON("application/vnd.ims.lti.v2.toolsettings+json"), + APPLICATION_VND_IMS_LTI_V2_TOOLSETTINGS_SIMPLE_JSON("application/vnd.ims.lti.v2.toolsettings.simple+json"), + APPLICATION_VND_INFORMEDCONTROL_RMS_XML("application/vnd.informedcontrol.rms+xml"), + APPLICATION_VND_INFOTECH_PROJECT("application/vnd.infotech.project"), + APPLICATION_VND_INFOTECH_PROJECT_XML("application/vnd.infotech.project+xml"), + APPLICATION_VND_INFORMIX_VISIONARY("application/vnd.informix-visionary"), + APPLICATION_VND_INNOPATH_WAMP_NOTIFICATION("application/vnd.innopath.wamp.notification"), + APPLICATION_VND_INSORS_IGM("application/vnd.insors.igm"), + APPLICATION_VND_INTERCON_FORMNET("application/vnd.intercon.formnet"), + APPLICATION_VND_INTERGEO("application/vnd.intergeo"), + APPLICATION_VND_INTERTRUST_DIGIBOX("application/vnd.intertrust.digibox"), + APPLICATION_VND_INTERTRUST_NNCP("application/vnd.intertrust.nncp"), + APPLICATION_VND_INTU_QBO("application/vnd.intu.qbo"), + APPLICATION_VND_INTU_QFX("application/vnd.intu.qfx"), + APPLICATION_VND_IPFS_IPNS_RECORD("application/vnd.ipfs.ipns-record"), + APPLICATION_VND_IPLD_CAR("application/vnd.ipld.car"), + APPLICATION_VND_IPLD_DAG_CBOR("application/vnd.ipld.dag-cbor"), + APPLICATION_VND_IPLD_DAG_JSON("application/vnd.ipld.dag-json"), + APPLICATION_VND_IPLD_RAW("application/vnd.ipld.raw"), + APPLICATION_VND_IPTC_G2_CATALOGITEM_XML("application/vnd.iptc.g2.catalogitem+xml"), + APPLICATION_VND_IPTC_G2_CONCEPTITEM_XML("application/vnd.iptc.g2.conceptitem+xml"), + APPLICATION_VND_IPTC_G2_KNOWLEDGEITEM_XML("application/vnd.iptc.g2.knowledgeitem+xml"), + APPLICATION_VND_IPTC_G2_NEWSITEM_XML("application/vnd.iptc.g2.newsitem+xml"), + APPLICATION_VND_IPTC_G2_NEWSMESSAGE_XML("application/vnd.iptc.g2.newsmessage+xml"), + APPLICATION_VND_IPTC_G2_PACKAGEITEM_XML("application/vnd.iptc.g2.packageitem+xml"), + APPLICATION_VND_IPTC_G2_PLANNINGITEM_XML("application/vnd.iptc.g2.planningitem+xml"), + APPLICATION_VND_IPUNPLUGGED_RCPROFILE("application/vnd.ipunplugged.rcprofile"), + APPLICATION_VND_IREPOSITORY_PACKAGE_XML("application/vnd.irepository.package+xml"), + APPLICATION_VND_IS_XPR("application/vnd.is-xpr"), + APPLICATION_VND_ISAC_FCS("application/vnd.isac.fcs"), + APPLICATION_VND_JAM("application/vnd.jam"), + APPLICATION_VND_ISO11783_10_ZIP("application/vnd.iso11783-10+zip"), + APPLICATION_VND_JAPANNET_DIRECTORY_SERVICE("application/vnd.japannet-directory-service"), + APPLICATION_VND_JAPANNET_JPNSTORE_WAKEUP("application/vnd.japannet-jpnstore-wakeup"), + APPLICATION_VND_JAPANNET_PAYMENT_WAKEUP("application/vnd.japannet-payment-wakeup"), + APPLICATION_VND_JAPANNET_REGISTRATION("application/vnd.japannet-registration"), + APPLICATION_VND_JAPANNET_REGISTRATION_WAKEUP("application/vnd.japannet-registration-wakeup"), + APPLICATION_VND_JAPANNET_SETSTORE_WAKEUP("application/vnd.japannet-setstore-wakeup"), + APPLICATION_VND_JAPANNET_VERIFICATION("application/vnd.japannet-verification"), + APPLICATION_VND_JAPANNET_VERIFICATION_WAKEUP("application/vnd.japannet-verification-wakeup"), + APPLICATION_VND_JCP_JAVAME_MIDLET_RMS("application/vnd.jcp.javame.midlet-rms"), + APPLICATION_VND_JISP("application/vnd.jisp"), + APPLICATION_VND_JOOST_JODA_ARCHIVE("application/vnd.joost.joda-archive"), + APPLICATION_VND_JSK_ISDN_NGN("application/vnd.jsk.isdn-ngn"), + APPLICATION_VND_KAHOOTZ("application/vnd.kahootz"), + APPLICATION_VND_KDE_KARBON("application/vnd.kde.karbon"), + APPLICATION_VND_KDE_KCHART("application/vnd.kde.kchart"), + APPLICATION_VND_KDE_KFORMULA("application/vnd.kde.kformula"), + APPLICATION_VND_KDE_KIVIO("application/vnd.kde.kivio"), + APPLICATION_VND_KDE_KONTOUR("application/vnd.kde.kontour"), + APPLICATION_VND_KDE_KPRESENTER("application/vnd.kde.kpresenter"), + APPLICATION_VND_KDE_KSPREAD("application/vnd.kde.kspread"), + APPLICATION_VND_KDE_KWORD("application/vnd.kde.kword"), + APPLICATION_VND_KDL("application/vnd.kdl"), + APPLICATION_VND_KENAMEAAPP("application/vnd.kenameaapp"), + APPLICATION_VND_KEYMAN_KMP_ZIP("application/vnd.keyman.kmp+zip"), + APPLICATION_VND_KEYMAN_KMX("application/vnd.keyman.kmx"), + APPLICATION_VND_KIDSPIRATION("application/vnd.kidspiration"), + APPLICATION_VND_KINAR("application/vnd.Kinar"), + APPLICATION_VND_KOAN("application/vnd.koan"), + APPLICATION_VND_KODAK_DESCRIPTOR("application/vnd.kodak-descriptor"), + APPLICATION_VND_LAS("application/vnd.las"), + APPLICATION_VND_LAS_LAS_JSON("application/vnd.las.las+json"), + APPLICATION_VND_LAS_LAS_XML("application/vnd.las.las+xml"), + APPLICATION_VND_LASZIP("application/vnd.laszip"), + APPLICATION_VND_LDEV_PRODUCTLICENSING("application/vnd.ldev.productlicensing"), + APPLICATION_VND_LEAP_JSON("application/vnd.leap+json"), + APPLICATION_VND_LIBERTY_REQUEST_XML("application/vnd.liberty-request+xml"), + APPLICATION_VND_LLAMAGRAPHICS_LIFE_BALANCE_DESKTOP("application/vnd.llamagraphics.life-balance.desktop"), + APPLICATION_VND_LLAMAGRAPHICS_LIFE_BALANCE_EXCHANGE_XML("application/vnd.llamagraphics.life-balance.exchange+xml"), + APPLICATION_VND_LOGIPIPE_CIRCUIT_ZIP("application/vnd.logipipe.circuit+zip"), + APPLICATION_VND_LOOM("application/vnd.loom"), + APPLICATION_VND_LOTUS_1_2_3("application/vnd.lotus-1-2-3"), + APPLICATION_VND_LOTUS_APPROACH("application/vnd.lotus-approach"), + APPLICATION_VND_LOTUS_FREELANCE("application/vnd.lotus-freelance"), + APPLICATION_VND_LOTUS_NOTES("application/vnd.lotus-notes"), + APPLICATION_VND_LOTUS_ORGANIZER("application/vnd.lotus-organizer"), + APPLICATION_VND_LOTUS_SCREENCAM("application/vnd.lotus-screencam"), + APPLICATION_VND_LOTUS_WORDPRO("application/vnd.lotus-wordpro"), + APPLICATION_VND_MACPORTS_PORTPKG("application/vnd.macports.portpkg"), + APPLICATION_VND_MAML("application/vnd.maml"), + APPLICATION_VND_MAPBOX_VECTOR_TILE("application/vnd.mapbox-vector-tile"), + APPLICATION_VND_MARLIN_DRM_ACTIONTOKEN_XML("application/vnd.marlin.drm.actiontoken+xml"), + APPLICATION_VND_MARLIN_DRM_CONFTOKEN_XML("application/vnd.marlin.drm.conftoken+xml"), + APPLICATION_VND_MARLIN_DRM_LICENSE_XML("application/vnd.marlin.drm.license+xml"), + APPLICATION_VND_MARLIN_DRM_MDCF("application/vnd.marlin.drm.mdcf"), + APPLICATION_VND_MASON_JSON("application/vnd.mason+json"), + APPLICATION_VND_MAXAR_ARCHIVE_3TZ_ZIP("application/vnd.maxar.archive.3tz+zip"), + APPLICATION_VND_MAXMIND_MAXMIND_DB("application/vnd.maxmind.maxmind-db"), + APPLICATION_VND_MCD("application/vnd.mcd"), + APPLICATION_VND_MDL("application/vnd.mdl"), + APPLICATION_VND_MDL_MBSDF("application/vnd.mdl-mbsdf"), + APPLICATION_VND_MEDCALCDATA("application/vnd.medcalcdata"), + APPLICATION_VND_MEDIASTATION_CDKEY("application/vnd.mediastation.cdkey"), + APPLICATION_VND_MEDICALHOLODECK_RECORDXR("application/vnd.medicalholodeck.recordxr"), + APPLICATION_VND_MERIDIAN_SLINGSHOT("application/vnd.meridian-slingshot"), + APPLICATION_VND_MERMAID("application/vnd.mermaid"), + APPLICATION_VND_MFER("application/vnd.MFER"), + APPLICATION_VND_MFMP("application/vnd.mfmp"), + APPLICATION_VND_MICRO_JSON("application/vnd.micro+json"), + APPLICATION_VND_MICROGRAFX_FLO("application/vnd.micrografx.flo"), + APPLICATION_VND_MICROGRAFX_IGX("application/vnd.micrografx.igx"), + APPLICATION_VND_MICROSOFT_PORTABLE_EXECUTABLE("application/vnd.microsoft.portable-executable"), + APPLICATION_VND_MICROSOFT_WINDOWS_THUMBNAIL_CACHE("application/vnd.microsoft.windows.thumbnail-cache"), + APPLICATION_VND_MIELE_JSON("application/vnd.miele+json"), + APPLICATION_VND_MIF("application/vnd.mif"), + APPLICATION_VND_MINISOFT_HP3000_SAVE("application/vnd.minisoft-hp3000-save"), + APPLICATION_VND_MITSUBISHI_MISTY_GUARD_TRUSTWEB("application/vnd.mitsubishi.misty-guard.trustweb"), + APPLICATION_VND_MOBIUS_DAF("application/vnd.Mobius.DAF"), + APPLICATION_VND_MOBIUS_DIS("application/vnd.Mobius.DIS"), + APPLICATION_VND_MOBIUS_MBK("application/vnd.Mobius.MBK"), + APPLICATION_VND_MOBIUS_MQY("application/vnd.Mobius.MQY"), + APPLICATION_VND_MOBIUS_MSL("application/vnd.Mobius.MSL"), + APPLICATION_VND_MOBIUS_PLC("application/vnd.Mobius.PLC"), + APPLICATION_VND_MOBIUS_TXF("application/vnd.Mobius.TXF"), + APPLICATION_VND_MODL("application/vnd.modl"), + APPLICATION_VND_MOPHUN_APPLICATION("application/vnd.mophun.application"), + APPLICATION_VND_MOPHUN_CERTIFICATE("application/vnd.mophun.certificate"), + APPLICATION_VND_MOTOROLA_FLEXSUITE("application/vnd.motorola.flexsuite"), + APPLICATION_VND_MOTOROLA_FLEXSUITE_ADSI("application/vnd.motorola.flexsuite.adsi"), + APPLICATION_VND_MOTOROLA_FLEXSUITE_FIS("application/vnd.motorola.flexsuite.fis"), + APPLICATION_VND_MOTOROLA_FLEXSUITE_GOTAP("application/vnd.motorola.flexsuite.gotap"), + APPLICATION_VND_MOTOROLA_FLEXSUITE_KMR("application/vnd.motorola.flexsuite.kmr"), + APPLICATION_VND_MOTOROLA_FLEXSUITE_TTC("application/vnd.motorola.flexsuite.ttc"), + APPLICATION_VND_MOTOROLA_FLEXSUITE_WEM("application/vnd.motorola.flexsuite.wem"), + APPLICATION_VND_MOTOROLA_IPRM("application/vnd.motorola.iprm"), + APPLICATION_VND_MOZILLA_XUL_XML("application/vnd.mozilla.xul+xml"), + APPLICATION_VND_MS_ARTGALRY("application/vnd.ms-artgalry"), + APPLICATION_VND_MS_ASF("application/vnd.ms-asf"), + APPLICATION_VND_MS_CAB_COMPRESSED("application/vnd.ms-cab-compressed"), + APPLICATION_VND_MS_3MFDOCUMENT("application/vnd.ms-3mfdocument"), + APPLICATION_VND_MS_EXCEL("application/vnd.ms-excel"), + APPLICATION_VND_MS_EXCEL_ADDIN_MACROENABLED_12("application/vnd.ms-excel.addin.macroEnabled.12"), + APPLICATION_VND_MS_EXCEL_SHEET_BINARY_MACROENABLED_12("application/vnd.ms-excel.sheet.binary.macroEnabled.12"), + APPLICATION_VND_MS_EXCEL_SHEET_MACROENABLED_12("application/vnd.ms-excel.sheet.macroEnabled.12"), + APPLICATION_VND_MS_EXCEL_TEMPLATE_MACROENABLED_12("application/vnd.ms-excel.template.macroEnabled.12"), + APPLICATION_VND_MS_FONTOBJECT("application/vnd.ms-fontobject"), + APPLICATION_VND_MS_HTMLHELP("application/vnd.ms-htmlhelp"), + APPLICATION_VND_MS_IMS("application/vnd.ms-ims"), + APPLICATION_VND_MS_LRM("application/vnd.ms-lrm"), + APPLICATION_VND_MS_OFFICE_ACTIVEX_XML("application/vnd.ms-office.activeX+xml"), + APPLICATION_VND_MS_OFFICETHEME("application/vnd.ms-officetheme"), + APPLICATION_VND_MS_PLAYREADY_INITIATOR_XML("application/vnd.ms-playready.initiator+xml"), + APPLICATION_VND_MS_POWERPOINT("application/vnd.ms-powerpoint"), + APPLICATION_VND_MS_POWERPOINT_ADDIN_MACROENABLED_12("application/vnd.ms-powerpoint.addin.macroEnabled.12"), + APPLICATION_VND_MS_POWERPOINT_PRESENTATION_MACROENABLED_12("application/vnd.ms-powerpoint.presentation.macroEnabled.12"), + APPLICATION_VND_MS_POWERPOINT_SLIDE_MACROENABLED_12("application/vnd.ms-powerpoint.slide.macroEnabled.12"), + APPLICATION_VND_MS_POWERPOINT_SLIDESHOW_MACROENABLED_12("application/vnd.ms-powerpoint.slideshow.macroEnabled.12"), + APPLICATION_VND_MS_POWERPOINT_TEMPLATE_MACROENABLED_12("application/vnd.ms-powerpoint.template.macroEnabled.12"), + APPLICATION_VND_MS_PRINTDEVICECAPABILITIES_XML("application/vnd.ms-PrintDeviceCapabilities+xml"), + APPLICATION_VND_MS_PRINTSCHEMATICKET_XML("application/vnd.ms-PrintSchemaTicket+xml"), + APPLICATION_VND_MS_PROJECT("application/vnd.ms-project"), + APPLICATION_VND_MS_TNEF("application/vnd.ms-tnef"), + APPLICATION_VND_MS_WINDOWS_DEVICEPAIRING("application/vnd.ms-windows.devicepairing"), + APPLICATION_VND_MS_WINDOWS_NWPRINTING_OOB("application/vnd.ms-windows.nwprinting.oob"), + APPLICATION_VND_MS_WINDOWS_PRINTERPAIRING("application/vnd.ms-windows.printerpairing"), + APPLICATION_VND_MS_WINDOWS_WSD_OOB("application/vnd.ms-windows.wsd.oob"), + APPLICATION_VND_MS_WMDRM_LIC_CHLG_REQ("application/vnd.ms-wmdrm.lic-chlg-req"), + APPLICATION_VND_MS_WMDRM_LIC_RESP("application/vnd.ms-wmdrm.lic-resp"), + APPLICATION_VND_MS_WMDRM_METER_CHLG_REQ("application/vnd.ms-wmdrm.meter-chlg-req"), + APPLICATION_VND_MS_WMDRM_METER_RESP("application/vnd.ms-wmdrm.meter-resp"), + APPLICATION_VND_MS_WORD_DOCUMENT_MACROENABLED_12("application/vnd.ms-word.document.macroEnabled.12"), + APPLICATION_VND_MS_WORD_TEMPLATE_MACROENABLED_12("application/vnd.ms-word.template.macroEnabled.12"), + APPLICATION_VND_MS_WORKS("application/vnd.ms-works"), + APPLICATION_VND_MS_WPL("application/vnd.ms-wpl"), + APPLICATION_VND_MS_XPSDOCUMENT("application/vnd.ms-xpsdocument"), + APPLICATION_VND_MSA_DISK_IMAGE("application/vnd.msa-disk-image"), + APPLICATION_VND_MSEQ("application/vnd.mseq"), + APPLICATION_VND_MSGPACK("application/vnd.msgpack"), + APPLICATION_VND_MSIGN("application/vnd.msign"), + APPLICATION_VND_MULTIAD_CREATOR("application/vnd.multiad.creator"), + APPLICATION_VND_MULTIAD_CREATOR_CIF("application/vnd.multiad.creator.cif"), + APPLICATION_VND_MUSICIAN("application/vnd.musician"), + APPLICATION_VND_MUSIC_NIFF("application/vnd.music-niff"), + APPLICATION_VND_MUVEE_STYLE("application/vnd.muvee.style"), + APPLICATION_VND_MYNFC("application/vnd.mynfc"), + APPLICATION_VND_NACAMAR_YBRID_JSON("application/vnd.nacamar.ybrid+json"), + APPLICATION_VND_NATO_BINDINGDATAOBJECT_CBOR("application/vnd.nato.bindingdataobject+cbor"), + APPLICATION_VND_NATO_BINDINGDATAOBJECT_JSON("application/vnd.nato.bindingdataobject+json"), + APPLICATION_VND_NATO_BINDINGDATAOBJECT_XML("application/vnd.nato.bindingdataobject+xml"), + APPLICATION_VND_NATO_OPENXMLFORMATS_PACKAGE_IEPD_ZIP("application/vnd.nato.openxmlformats-package.iepd+zip"), + APPLICATION_VND_NCD_CONTROL("application/vnd.ncd.control"), + APPLICATION_VND_NCD_REFERENCE("application/vnd.ncd.reference"), + APPLICATION_VND_NEARST_INV_JSON("application/vnd.nearst.inv+json"), + APPLICATION_VND_NEBUMIND_LINE("application/vnd.nebumind.line"), + APPLICATION_VND_NERVANA("application/vnd.nervana"), + APPLICATION_VND_NETFPX("application/vnd.netfpx"), + APPLICATION_VND_NEUROLANGUAGE_NLU("application/vnd.neurolanguage.nlu"), + APPLICATION_VND_NIMN("application/vnd.nimn"), + APPLICATION_VND_NINTENDO_SNES_ROM("application/vnd.nintendo.snes.rom"), + APPLICATION_VND_NINTENDO_NITRO_ROM("application/vnd.nintendo.nitro.rom"), + APPLICATION_VND_NITF("application/vnd.nitf"), + APPLICATION_VND_NOBLENET_DIRECTORY("application/vnd.noblenet-directory"), + APPLICATION_VND_NOBLENET_SEALER("application/vnd.noblenet-sealer"), + APPLICATION_VND_NOBLENET_WEB("application/vnd.noblenet-web"), + APPLICATION_VND_NOKIA_CATALOGS("application/vnd.nokia.catalogs"), + APPLICATION_VND_NOKIA_CONML_WBXML("application/vnd.nokia.conml+wbxml"), + APPLICATION_VND_NOKIA_CONML_XML("application/vnd.nokia.conml+xml"), + APPLICATION_VND_NOKIA_IPTV_CONFIG_XML("application/vnd.nokia.iptv.config+xml"), + APPLICATION_VND_NOKIA_ISDS_RADIO_PRESETS("application/vnd.nokia.iSDS-radio-presets"), + APPLICATION_VND_NOKIA_LANDMARK_WBXML("application/vnd.nokia.landmark+wbxml"), + APPLICATION_VND_NOKIA_LANDMARK_XML("application/vnd.nokia.landmark+xml"), + APPLICATION_VND_NOKIA_LANDMARKCOLLECTION_XML("application/vnd.nokia.landmarkcollection+xml"), + APPLICATION_VND_NOKIA_NCD("application/vnd.nokia.ncd"), + APPLICATION_VND_NOKIA_N_GAGE_AC_XML("application/vnd.nokia.n-gage.ac+xml"), + APPLICATION_VND_NOKIA_N_GAGE_DATA("application/vnd.nokia.n-gage.data"), + APPLICATION_VND_NOKIA_N_GAGE_SYMBIAN_INSTALL("application/vnd.nokia.n-gage.symbian.install"), + APPLICATION_VND_NOKIA_PCD_WBXML("application/vnd.nokia.pcd+wbxml"), + APPLICATION_VND_NOKIA_PCD_XML("application/vnd.nokia.pcd+xml"), + APPLICATION_VND_NOKIA_RADIO_PRESET("application/vnd.nokia.radio-preset"), + APPLICATION_VND_NOKIA_RADIO_PRESETS("application/vnd.nokia.radio-presets"), + APPLICATION_VND_NOVADIGM_EDM("application/vnd.novadigm.EDM"), + APPLICATION_VND_NOVADIGM_EDX("application/vnd.novadigm.EDX"), + APPLICATION_VND_NOVADIGM_EXT("application/vnd.novadigm.EXT"), + APPLICATION_VND_NTT_LOCAL_CONTENT_SHARE("application/vnd.ntt-local.content-share"), + APPLICATION_VND_NTT_LOCAL_FILE_TRANSFER("application/vnd.ntt-local.file-transfer"), + APPLICATION_VND_NTT_LOCAL_OGW_REMOTE_ACCESS("application/vnd.ntt-local.ogw_remote-access"), + APPLICATION_VND_NTT_LOCAL_SIP_TA_REMOTE("application/vnd.ntt-local.sip-ta_remote"), + APPLICATION_VND_NTT_LOCAL_SIP_TA_TCP_STREAM("application/vnd.ntt-local.sip-ta_tcp_stream"), + APPLICATION_VND_NUBALTEC_NUDOKU_GAME("application/vnd.nubaltec.nudoku-game"), + APPLICATION_VND_OAI_WORKFLOWS("application/vnd.oai.workflows"), + APPLICATION_VND_OAI_WORKFLOWS_JSON("application/vnd.oai.workflows+json"), + APPLICATION_VND_OAI_WORKFLOWS_YAML("application/vnd.oai.workflows+yaml"), + APPLICATION_VND_OASIS_OPENDOCUMENT_BASE("application/vnd.oasis.opendocument.base"), + APPLICATION_VND_OASIS_OPENDOCUMENT_CHART("application/vnd.oasis.opendocument.chart"), + APPLICATION_VND_OASIS_OPENDOCUMENT_CHART_TEMPLATE("application/vnd.oasis.opendocument.chart-template"), + APPLICATION_VND_OASIS_OPENDOCUMENT_DATABASE("application/vnd.oasis.opendocument.database"), + APPLICATION_VND_OASIS_OPENDOCUMENT_FORMULA("application/vnd.oasis.opendocument.formula"), + APPLICATION_VND_OASIS_OPENDOCUMENT_FORMULA_TEMPLATE("application/vnd.oasis.opendocument.formula-template"), + APPLICATION_VND_OASIS_OPENDOCUMENT_GRAPHICS("application/vnd.oasis.opendocument.graphics"), + APPLICATION_VND_OASIS_OPENDOCUMENT_GRAPHICS_TEMPLATE("application/vnd.oasis.opendocument.graphics-template"), + APPLICATION_VND_OASIS_OPENDOCUMENT_IMAGE("application/vnd.oasis.opendocument.image"), + APPLICATION_VND_OASIS_OPENDOCUMENT_IMAGE_TEMPLATE("application/vnd.oasis.opendocument.image-template"), + APPLICATION_VND_OASIS_OPENDOCUMENT_PRESENTATION("application/vnd.oasis.opendocument.presentation"), + APPLICATION_VND_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE("application/vnd.oasis.opendocument.presentation-template"), + APPLICATION_VND_OASIS_OPENDOCUMENT_SPREADSHEET("application/vnd.oasis.opendocument.spreadsheet"), + APPLICATION_VND_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE("application/vnd.oasis.opendocument.spreadsheet-template"), + APPLICATION_VND_OASIS_OPENDOCUMENT_TEXT("application/vnd.oasis.opendocument.text"), + APPLICATION_VND_OASIS_OPENDOCUMENT_TEXT_MASTER("application/vnd.oasis.opendocument.text-master"), + APPLICATION_VND_OASIS_OPENDOCUMENT_TEXT_MASTER_TEMPLATE("application/vnd.oasis.opendocument.text-master-template"), + APPLICATION_VND_OASIS_OPENDOCUMENT_TEXT_TEMPLATE("application/vnd.oasis.opendocument.text-template"), + APPLICATION_VND_OASIS_OPENDOCUMENT_TEXT_WEB("application/vnd.oasis.opendocument.text-web"), + APPLICATION_VND_OBN("application/vnd.obn"), + APPLICATION_VND_OCF_CBOR("application/vnd.ocf+cbor"), + APPLICATION_VND_OCI_IMAGE_MANIFEST_V1_JSON("application/vnd.oci.image.manifest.v1+json"), + APPLICATION_VND_OFTN_L10N_JSON("application/vnd.oftn.l10n+json"), + APPLICATION_VND_OIPF_CONTENTACCESSDOWNLOAD_XML("application/vnd.oipf.contentaccessdownload+xml"), + APPLICATION_VND_OIPF_CONTENTACCESSSTREAMING_XML("application/vnd.oipf.contentaccessstreaming+xml"), + APPLICATION_VND_OIPF_CSPG_HEXBINARY("application/vnd.oipf.cspg-hexbinary"), + APPLICATION_VND_OIPF_DAE_SVG_XML("application/vnd.oipf.dae.svg+xml"), + APPLICATION_VND_OIPF_DAE_XHTML_XML("application/vnd.oipf.dae.xhtml+xml"), + APPLICATION_VND_OIPF_MIPPVCONTROLMESSAGE_XML("application/vnd.oipf.mippvcontrolmessage+xml"), + APPLICATION_VND_OIPF_PAE_GEM("application/vnd.oipf.pae.gem"), + APPLICATION_VND_OIPF_SPDISCOVERY_XML("application/vnd.oipf.spdiscovery+xml"), + APPLICATION_VND_OIPF_SPDLIST_XML("application/vnd.oipf.spdlist+xml"), + APPLICATION_VND_OIPF_UEPROFILE_XML("application/vnd.oipf.ueprofile+xml"), + APPLICATION_VND_OIPF_USERPROFILE_XML("application/vnd.oipf.userprofile+xml"), + APPLICATION_VND_OLPC_SUGAR("application/vnd.olpc-sugar"), + APPLICATION_VND_OMA_BCAST_ASSOCIATED_PROCEDURE_PARAMETER_XML("application/vnd.oma.bcast.associated-procedure-parameter+xml"), + APPLICATION_VND_OMA_BCAST_DRM_TRIGGER_XML("application/vnd.oma.bcast.drm-trigger+xml"), + APPLICATION_VND_OMA_BCAST_IMD_XML("application/vnd.oma.bcast.imd+xml"), + APPLICATION_VND_OMA_BCAST_LTKM("application/vnd.oma.bcast.ltkm"), + APPLICATION_VND_OMA_BCAST_NOTIFICATION_XML("application/vnd.oma.bcast.notification+xml"), + APPLICATION_VND_OMA_BCAST_PROVISIONINGTRIGGER("application/vnd.oma.bcast.provisioningtrigger"), + APPLICATION_VND_OMA_BCAST_SGBOOT("application/vnd.oma.bcast.sgboot"), + APPLICATION_VND_OMA_BCAST_SGDD_XML("application/vnd.oma.bcast.sgdd+xml"), + APPLICATION_VND_OMA_BCAST_SGDU("application/vnd.oma.bcast.sgdu"), + APPLICATION_VND_OMA_BCAST_SIMPLE_SYMBOL_CONTAINER("application/vnd.oma.bcast.simple-symbol-container"), + APPLICATION_VND_OMA_BCAST_SMARTCARD_TRIGGER_XML("application/vnd.oma.bcast.smartcard-trigger+xml"), + APPLICATION_VND_OMA_BCAST_SPROV_XML("application/vnd.oma.bcast.sprov+xml"), + APPLICATION_VND_OMA_BCAST_STKM("application/vnd.oma.bcast.stkm"), + APPLICATION_VND_OMA_CAB_ADDRESS_BOOK_XML("application/vnd.oma.cab-address-book+xml"), + APPLICATION_VND_OMA_CAB_FEATURE_HANDLER_XML("application/vnd.oma.cab-feature-handler+xml"), + APPLICATION_VND_OMA_CAB_PCC_XML("application/vnd.oma.cab-pcc+xml"), + APPLICATION_VND_OMA_CAB_SUBS_INVITE_XML("application/vnd.oma.cab-subs-invite+xml"), + APPLICATION_VND_OMA_CAB_USER_PREFS_XML("application/vnd.oma.cab-user-prefs+xml"), + APPLICATION_VND_OMA_DCD("application/vnd.oma.dcd"), + APPLICATION_VND_OMA_DCDC("application/vnd.oma.dcdc"), + APPLICATION_VND_OMA_DD2_XML("application/vnd.oma.dd2+xml"), + APPLICATION_VND_OMA_DRM_RISD_XML("application/vnd.oma.drm.risd+xml"), + APPLICATION_VND_OMA_GROUP_USAGE_LIST_XML("application/vnd.oma.group-usage-list+xml"), + APPLICATION_VND_OMA_LWM2M_CBOR("application/vnd.oma.lwm2m+cbor"), + APPLICATION_VND_OMA_LWM2M_JSON("application/vnd.oma.lwm2m+json"), + APPLICATION_VND_OMA_LWM2M_TLV("application/vnd.oma.lwm2m+tlv"), + APPLICATION_VND_OMA_PAL_XML("application/vnd.oma.pal+xml"), + APPLICATION_VND_OMA_POC_DETAILED_PROGRESS_REPORT_XML("application/vnd.oma.poc.detailed-progress-report+xml"), + APPLICATION_VND_OMA_POC_FINAL_REPORT_XML("application/vnd.oma.poc.final-report+xml"), + APPLICATION_VND_OMA_POC_GROUPS_XML("application/vnd.oma.poc.groups+xml"), + APPLICATION_VND_OMA_POC_INVOCATION_DESCRIPTOR_XML("application/vnd.oma.poc.invocation-descriptor+xml"), + APPLICATION_VND_OMA_POC_OPTIMIZED_PROGRESS_REPORT_XML("application/vnd.oma.poc.optimized-progress-report+xml"), + APPLICATION_VND_OMA_PUSH("application/vnd.oma.push"), + APPLICATION_VND_OMA_SCIDM_MESSAGES_XML("application/vnd.oma.scidm.messages+xml"), + APPLICATION_VND_OMA_XCAP_DIRECTORY_XML("application/vnd.oma.xcap-directory+xml"), + APPLICATION_VND_OMADS_EMAIL_XML("application/vnd.omads-email+xml"), + APPLICATION_VND_OMADS_FILE_XML("application/vnd.omads-file+xml"), + APPLICATION_VND_OMADS_FOLDER_XML("application/vnd.omads-folder+xml"), + APPLICATION_VND_OMALOC_SUPL_INIT("application/vnd.omaloc-supl-init"), + APPLICATION_VND_OMA_SCWS_CONFIG("application/vnd.oma-scws-config"), + APPLICATION_VND_OMA_SCWS_HTTP_REQUEST("application/vnd.oma-scws-http-request"), + APPLICATION_VND_OMA_SCWS_HTTP_RESPONSE("application/vnd.oma-scws-http-response"), + APPLICATION_VND_OMS_CELLULAR_COSE_CONTENT_CBOR("application/vnd.oms.cellular-cose-content+cbor"), + APPLICATION_VND_ONEPAGER("application/vnd.onepager"), + APPLICATION_VND_ONEPAGERTAMP("application/vnd.onepagertamp"), + APPLICATION_VND_ONEPAGERTAMX("application/vnd.onepagertamx"), + APPLICATION_VND_ONEPAGERTAT("application/vnd.onepagertat"), + APPLICATION_VND_ONEPAGERTATP("application/vnd.onepagertatp"), + APPLICATION_VND_ONEPAGERTATX("application/vnd.onepagertatx"), + APPLICATION_VND_ONVIF_METADATA("application/vnd.onvif.metadata"), + APPLICATION_VND_OPENBLOX_GAME_BINARY("application/vnd.openblox.game-binary"), + APPLICATION_VND_OPENBLOX_GAME_XML("application/vnd.openblox.game+xml"), + APPLICATION_VND_OPENEYE_OEB("application/vnd.openeye.oeb"), + APPLICATION_VND_OPENPRINTTAG("application/vnd.openprinttag"), + APPLICATION_VND_OPENSTREETMAP_DATA_XML("application/vnd.openstreetmap.data+xml"), + APPLICATION_VND_OPENTIMESTAMPS_OTS("application/vnd.opentimestamps.ots"), + APPLICATION_VND_OPENVPI_DSPX_JSON("application/vnd.openvpi.dspx+json"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_CUSTOM_PROPERTIES_XML("application/vnd.openxmlformats-officedocument.custom-properties+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_CUSTOMXMLPROPERTIES_XML("application/vnd.openxmlformats-officedocument.customXmlProperties+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_DRAWING_XML("application/vnd.openxmlformats-officedocument.drawing+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_DRAWINGML_CHART_XML("application/vnd.openxmlformats-officedocument.drawingml.chart+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_DRAWINGML_CHARTSHAPES_XML("application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_DRAWINGML_DIAGRAMCOLORS_XML("application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_DRAWINGML_DIAGRAMDATA_XML("application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_DRAWINGML_DIAGRAMLAYOUT_XML("application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_DRAWINGML_DIAGRAMSTYLE_XML("application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_EXTENDED_PROPERTIES_XML("application/vnd.openxmlformats-officedocument.extended-properties+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_COMMENTAUTHORS_XML("application/vnd.openxmlformats-officedocument.presentationml.commentAuthors+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_COMMENTS_XML("application/vnd.openxmlformats-officedocument.presentationml.comments+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_HANDOUTMASTER_XML("application/vnd.openxmlformats-officedocument.presentationml.handoutMaster+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_NOTESMASTER_XML("application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_NOTESSLIDE_XML("application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_PRESENTATION("application/vnd.openxmlformats-officedocument.presentationml.presentation"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_PRESENTATION_MAIN_XML("application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_PRESPROPS_XML("application/vnd.openxmlformats-officedocument.presentationml.presProps+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_SLIDE("application/vnd.openxmlformats-officedocument.presentationml.slide"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_SLIDE_XML("application/vnd.openxmlformats-officedocument.presentationml.slide+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_SLIDELAYOUT_XML("application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_SLIDEMASTER_XML("application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_SLIDESHOW("application/vnd.openxmlformats-officedocument.presentationml.slideshow"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_SLIDESHOW_MAIN_XML("application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_SLIDEUPDATEINFO_XML("application/vnd.openxmlformats-officedocument.presentationml.slideUpdateInfo+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_TABLESTYLES_XML("application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_TAGS_XML("application/vnd.openxmlformats-officedocument.presentationml.tags+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_TEMPLATE("application/vnd.openxmlformats-officedocument.presentationml.template"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_TEMPLATE_MAIN_XML("application/vnd.openxmlformats-officedocument.presentationml.template.main+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_VIEWPROPS_XML("application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_CALCCHAIN_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_CHARTSHEET_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_COMMENTS_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_CONNECTIONS_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_DIALOGSHEET_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_EXTERNALLINK_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_PIVOTCACHEDEFINITION_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_PIVOTCACHERECORDS_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_PIVOTTABLE_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_QUERYTABLE_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_REVISIONHEADERS_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_REVISIONLOG_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHAREDSTRINGS_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEET("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEET_MAIN_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEETMETADATA_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_STYLES_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_TABLE_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_TABLESINGLECELLS_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_TEMPLATE("application/vnd.openxmlformats-officedocument.spreadsheetml.template"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_TEMPLATE_MAIN_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_USERNAMES_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_VOLATILEDEPENDENCIES_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_WORKSHEET_XML("application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_THEME_XML("application/vnd.openxmlformats-officedocument.theme+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_THEMEOVERRIDE_XML("application/vnd.openxmlformats-officedocument.themeOverride+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_VMLDRAWING("application/vnd.openxmlformats-officedocument.vmlDrawing"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_COMMENTS_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT("application/vnd.openxmlformats-officedocument.wordprocessingml.document"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT_GLOSSARY_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT_MAIN_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_ENDNOTES_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_FONTTABLE_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_FOOTER_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_FOOTNOTES_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_NUMBERING_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_SETTINGS_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_STYLES_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_TEMPLATE("application/vnd.openxmlformats-officedocument.wordprocessingml.template"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_TEMPLATE_MAIN_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml"), + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_WEBSETTINGS_XML("application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml"), + APPLICATION_VND_OPENXMLFORMATS_PACKAGE_CORE_PROPERTIES_XML("application/vnd.openxmlformats-package.core-properties+xml"), + APPLICATION_VND_OPENXMLFORMATS_PACKAGE_DIGITAL_SIGNATURE_XMLSIGNATURE_XML("application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml"), + APPLICATION_VND_OPENXMLFORMATS_PACKAGE_RELATIONSHIPS_XML("application/vnd.openxmlformats-package.relationships+xml"), + APPLICATION_VND_ORACLE_RESOURCE_JSON("application/vnd.oracle.resource+json"), + APPLICATION_VND_ORANGE_INDATA("application/vnd.orange.indata"), + APPLICATION_VND_OSA_NETDEPLOY("application/vnd.osa.netdeploy"), + APPLICATION_VND_OSGEO_MAPGUIDE_PACKAGE("application/vnd.osgeo.mapguide.package"), + APPLICATION_VND_OSGI_BUNDLE("application/vnd.osgi.bundle"), + APPLICATION_VND_OSGI_DP("application/vnd.osgi.dp"), + APPLICATION_VND_OSGI_SUBSYSTEM("application/vnd.osgi.subsystem"), + APPLICATION_VND_OTPS_CT_KIP_XML("application/vnd.otps.ct-kip+xml"), + APPLICATION_VND_OXLI_COUNTGRAPH("application/vnd.oxli.countgraph"), + APPLICATION_VND_PAGERDUTY_JSON("application/vnd.pagerduty+json"), + APPLICATION_VND_PALM("application/vnd.palm"), + APPLICATION_VND_PANOPLY("application/vnd.panoply"), + APPLICATION_VND_PAOS_XML("application/vnd.paos.xml"), + APPLICATION_VND_PATENTDIVE("application/vnd.patentdive"), + APPLICATION_VND_PATIENTECOMMSDOC("application/vnd.patientecommsdoc"), + APPLICATION_VND_PAWAAFILE("application/vnd.pawaafile"), + APPLICATION_VND_PCOS("application/vnd.pcos"), + APPLICATION_VND_PG_FORMAT("application/vnd.pg.format"), + APPLICATION_VND_PG_OSASLI("application/vnd.pg.osasli"), + APPLICATION_VND_PIACCESS_APPLICATION_LICENCE("application/vnd.piaccess.application-licence"), + APPLICATION_VND_PICSEL("application/vnd.picsel"), + APPLICATION_VND_PMI_WIDGET("application/vnd.pmi.widget"), + APPLICATION_VND_PMTILES("application/vnd.pmtiles"), + APPLICATION_VND_POC_GROUP_ADVERTISEMENT_XML("application/vnd.poc.group-advertisement+xml"), + APPLICATION_VND_POCKETLEARN("application/vnd.pocketlearn"), + APPLICATION_VND_POWERBUILDER6("application/vnd.powerbuilder6"), + APPLICATION_VND_POWERBUILDER6_S("application/vnd.powerbuilder6-s"), + APPLICATION_VND_POWERBUILDER7("application/vnd.powerbuilder7"), + APPLICATION_VND_POWERBUILDER75("application/vnd.powerbuilder75"), + APPLICATION_VND_POWERBUILDER75_S("application/vnd.powerbuilder75-s"), + APPLICATION_VND_POWERBUILDER7_S("application/vnd.powerbuilder7-s"), + APPLICATION_VND_PP_SYSTEMVERIFY_XML("application/vnd.pp.systemverify+xml"), + APPLICATION_VND_PREMINET("application/vnd.preminet"), + APPLICATION_VND_PREVIEWSYSTEMS_BOX("application/vnd.previewsystems.box"), + APPLICATION_VND_PROJECT_GRAPH("application/vnd.project-graph"), + APPLICATION_VND_PROTEUS_MAGAZINE("application/vnd.proteus.magazine"), + APPLICATION_VND_PSFS("application/vnd.psfs"), + APPLICATION_VND_PT_MUNDUSMUNDI("application/vnd.pt.mundusmundi"), + APPLICATION_VND_PUBLISHARE_DELTA_TREE("application/vnd.publishare-delta-tree"), + APPLICATION_VND_PVI_PTID1("application/vnd.pvi.ptid1"), + APPLICATION_VND_PWG_MULTIPLEXED("application/vnd.pwg-multiplexed"), + APPLICATION_VND_PWG_XHTML_PRINT_XML("application/vnd.pwg-xhtml-print+xml"), + APPLICATION_VND_PYON_JSON("application/vnd.pyon+json"), + APPLICATION_VND_QUALCOMM_BREW_APP_RES("application/vnd.qualcomm.brew-app-res"), + APPLICATION_VND_QUARANTAINENET("application/vnd.quarantainenet"), + APPLICATION_VND_QUARK_QUARKXPRESS("application/vnd.Quark.QuarkXPress"), + APPLICATION_VND_QUOBJECT_QUOXDOCUMENT("application/vnd.quobject-quoxdocument"), + APPLICATION_VND_R74N_SANDBOXELS_JSON("application/vnd.R74n.sandboxels+json"), + APPLICATION_VND_RADISYS_MOML_XML("application/vnd.radisys.moml+xml"), + APPLICATION_VND_RADISYS_MSML_AUDIT_CONF_XML("application/vnd.radisys.msml-audit-conf+xml"), + APPLICATION_VND_RADISYS_MSML_AUDIT_CONN_XML("application/vnd.radisys.msml-audit-conn+xml"), + APPLICATION_VND_RADISYS_MSML_AUDIT_DIALOG_XML("application/vnd.radisys.msml-audit-dialog+xml"), + APPLICATION_VND_RADISYS_MSML_AUDIT_STREAM_XML("application/vnd.radisys.msml-audit-stream+xml"), + APPLICATION_VND_RADISYS_MSML_AUDIT_XML("application/vnd.radisys.msml-audit+xml"), + APPLICATION_VND_RADISYS_MSML_CONF_XML("application/vnd.radisys.msml-conf+xml"), + APPLICATION_VND_RADISYS_MSML_DIALOG_BASE_XML("application/vnd.radisys.msml-dialog-base+xml"), + APPLICATION_VND_RADISYS_MSML_DIALOG_FAX_DETECT_XML("application/vnd.radisys.msml-dialog-fax-detect+xml"), + APPLICATION_VND_RADISYS_MSML_DIALOG_FAX_SENDRECV_XML("application/vnd.radisys.msml-dialog-fax-sendrecv+xml"), + APPLICATION_VND_RADISYS_MSML_DIALOG_GROUP_XML("application/vnd.radisys.msml-dialog-group+xml"), + APPLICATION_VND_RADISYS_MSML_DIALOG_SPEECH_XML("application/vnd.radisys.msml-dialog-speech+xml"), + APPLICATION_VND_RADISYS_MSML_DIALOG_TRANSFORM_XML("application/vnd.radisys.msml-dialog-transform+xml"), + APPLICATION_VND_RADISYS_MSML_DIALOG_XML("application/vnd.radisys.msml-dialog+xml"), + APPLICATION_VND_RADISYS_MSML_XML("application/vnd.radisys.msml+xml"), + APPLICATION_VND_RAINSTOR_DATA("application/vnd.rainstor.data"), + APPLICATION_VND_RAPID("application/vnd.rapid"), + APPLICATION_VND_RAR("application/vnd.rar"), + APPLICATION_VND_REALVNC_BED("application/vnd.realvnc.bed"), + APPLICATION_VND_RECORDARE_MUSICXML("application/vnd.recordare.musicxml"), + APPLICATION_VND_RECORDARE_MUSICXML_XML("application/vnd.recordare.musicxml+xml"), + APPLICATION_VND_RELPIPE("application/vnd.relpipe"), + APPLICATION_VND_RENLEARN_RLPRINT("application/vnd.RenLearn.rlprint"), + APPLICATION_VND_RESILIENT_LOGIC("application/vnd.resilient.logic"), + APPLICATION_VND_RESTFUL_JSON("application/vnd.restful+json"), + APPLICATION_VND_RIG_CRYPTONOTE("application/vnd.rig.cryptonote"), + APPLICATION_VND_ROUTE66_LINK66_XML("application/vnd.route66.link66+xml"), + APPLICATION_VND_RS_274X("application/vnd.rs-274x"), + APPLICATION_VND_RUCKUS_DOWNLOAD("application/vnd.ruckus.download"), + APPLICATION_VND_S3SMS("application/vnd.s3sms"), + APPLICATION_VND_SAILINGTRACKER_TRACK("application/vnd.sailingtracker.track"), + APPLICATION_VND_SAR("application/vnd.sar"), + APPLICATION_VND_SBM_CID("application/vnd.sbm.cid"), + APPLICATION_VND_SBM_MID2("application/vnd.sbm.mid2"), + APPLICATION_VND_SCRIBUS("application/vnd.scribus"), + APPLICATION_VND_SEALED_3DF("application/vnd.sealed.3df"), + APPLICATION_VND_SEALED_CSF("application/vnd.sealed.csf"), + APPLICATION_VND_SEALED_DOC("application/vnd.sealed.doc"), + APPLICATION_VND_SEALED_EML("application/vnd.sealed.eml"), + APPLICATION_VND_SEALED_MHT("application/vnd.sealed.mht"), + APPLICATION_VND_SEALED_NET("application/vnd.sealed.net"), + APPLICATION_VND_SEALED_PPT("application/vnd.sealed.ppt"), + APPLICATION_VND_SEALED_TIFF("application/vnd.sealed.tiff"), + APPLICATION_VND_SEALED_XLS("application/vnd.sealed.xls"), + APPLICATION_VND_SEALEDMEDIA_SOFTSEAL_HTML("application/vnd.sealedmedia.softseal.html"), + APPLICATION_VND_SEALEDMEDIA_SOFTSEAL_PDF("application/vnd.sealedmedia.softseal.pdf"), + APPLICATION_VND_SEEMAIL("application/vnd.seemail"), + APPLICATION_VND_SEIS_JSON("application/vnd.seis+json"), + APPLICATION_VND_SEMA("application/vnd.sema"), + APPLICATION_VND_SEMD("application/vnd.semd"), + APPLICATION_VND_SEMF("application/vnd.semf"), + APPLICATION_VND_SHADE_SAVE_FILE("application/vnd.shade-save-file"), + APPLICATION_VND_SHANA_INFORMED_FORMDATA("application/vnd.shana.informed.formdata"), + APPLICATION_VND_SHANA_INFORMED_FORMTEMPLATE("application/vnd.shana.informed.formtemplate"), + APPLICATION_VND_SHANA_INFORMED_INTERCHANGE("application/vnd.shana.informed.interchange"), + APPLICATION_VND_SHANA_INFORMED_PACKAGE("application/vnd.shana.informed.package"), + APPLICATION_VND_SHOOTPROOF_JSON("application/vnd.shootproof+json"), + APPLICATION_VND_SHOPKICK_JSON("application/vnd.shopkick+json"), + APPLICATION_VND_SHP("application/vnd.shp"), + APPLICATION_VND_SHX("application/vnd.shx"), + APPLICATION_VND_SIGROK_SESSION("application/vnd.sigrok.session"), + APPLICATION_VND_SIMTECH_MINDMAPPER("application/vnd.SimTech-MindMapper"), + APPLICATION_VND_SIREN_JSON("application/vnd.siren+json"), + APPLICATION_VND_SIRTX_VMV0("application/vnd.sirtx.vmv0"), + APPLICATION_VND_SKETCHOMETRY("application/vnd.sketchometry"), + APPLICATION_VND_SMAF("application/vnd.smaf"), + APPLICATION_VND_SMART_NOTEBOOK("application/vnd.smart.notebook"), + APPLICATION_VND_SMART_TEACHER("application/vnd.smart.teacher"), + APPLICATION_VND_SMINTIO_PORTALS_ARCHIVE("application/vnd.smintio.portals.archive"), + APPLICATION_VND_SNESDEV_PAGE_TABLE("application/vnd.snesdev-page-table"), + APPLICATION_VND_SOFTWARE602_FILLER_FORM_XML("application/vnd.software602.filler.form+xml"), + APPLICATION_VND_SOFTWARE602_FILLER_FORM_XML_ZIP("application/vnd.software602.filler.form-xml-zip"), + APPLICATION_VND_SOLENT_SDKM_XML("application/vnd.solent.sdkm+xml"), + APPLICATION_VND_SPOTFIRE_DXP("application/vnd.spotfire.dxp"), + APPLICATION_VND_SPOTFIRE_SFS("application/vnd.spotfire.sfs"), + APPLICATION_VND_SQLITE3("application/vnd.sqlite3"), + APPLICATION_VND_SSS_COD("application/vnd.sss-cod"), + APPLICATION_VND_SSS_DTF("application/vnd.sss-dtf"), + APPLICATION_VND_SSS_NTF("application/vnd.sss-ntf"), + APPLICATION_VND_STEPMANIA_PACKAGE("application/vnd.stepmania.package"), + APPLICATION_VND_STEPMANIA_STEPCHART("application/vnd.stepmania.stepchart"), + APPLICATION_VND_STREET_STREAM("application/vnd.street-stream"), + APPLICATION_VND_SUN_WADL_XML("application/vnd.sun.wadl+xml"), + APPLICATION_VND_SUPERFILE_SUPER("application/vnd.superfile.super"), + APPLICATION_VND_SUS_CALENDAR("application/vnd.sus-calendar"), + APPLICATION_VND_SVD("application/vnd.svd"), + APPLICATION_VND_SWIFTVIEW_ICS("application/vnd.swiftview-ics"), + APPLICATION_VND_SYBYL_MOL2("application/vnd.sybyl.mol2"), + APPLICATION_VND_SYCLE_XML("application/vnd.sycle+xml"), + APPLICATION_VND_SYFT_JSON("application/vnd.syft+json"), + APPLICATION_VND_SYNCML_DM_NOTIFICATION("application/vnd.syncml.dm.notification"), + APPLICATION_VND_SYNCML_DMDDF_XML("application/vnd.syncml.dmddf+xml"), + APPLICATION_VND_SYNCML_DMTNDS_WBXML("application/vnd.syncml.dmtnds+wbxml"), + APPLICATION_VND_SYNCML_DMTNDS_XML("application/vnd.syncml.dmtnds+xml"), + APPLICATION_VND_SYNCML_DMDDF_WBXML("application/vnd.syncml.dmddf+wbxml"), + APPLICATION_VND_SYNCML_DM_WBXML("application/vnd.syncml.dm+wbxml"), + APPLICATION_VND_SYNCML_DM_XML("application/vnd.syncml.dm+xml"), + APPLICATION_VND_SYNCML_DS_NOTIFICATION("application/vnd.syncml.ds.notification"), + APPLICATION_VND_SYNCML_XML("application/vnd.syncml+xml"), + APPLICATION_VND_TABLESCHEMA_JSON("application/vnd.tableschema+json"), + APPLICATION_VND_TAO_INTENT_MODULE_ARCHIVE("application/vnd.tao.intent-module-archive"), + APPLICATION_VND_TCPDUMP_PCAP("application/vnd.tcpdump.pcap"), + APPLICATION_VND_THINK_CELL_PPTTC_JSON("application/vnd.think-cell.ppttc+json"), + APPLICATION_VND_TML("application/vnd.tml"), + APPLICATION_VND_TMD_MEDIAFLEX_API_XML("application/vnd.tmd.mediaflex.api+xml"), + APPLICATION_VND_TMOBILE_LIVETV("application/vnd.tmobile-livetv"), + APPLICATION_VND_TRI_ONESOURCE("application/vnd.tri.onesource"), + APPLICATION_VND_TRID_TPT("application/vnd.trid.tpt"), + APPLICATION_VND_TRISCAPE_MXS("application/vnd.triscape.mxs"), + APPLICATION_VND_TRUEAPP("application/vnd.trueapp"), + APPLICATION_VND_TRUEDOC("application/vnd.truedoc"), + APPLICATION_VND_UBISOFT_WEBPLAYER("application/vnd.ubisoft.webplayer"), + APPLICATION_VND_UFDL("application/vnd.ufdl"), + APPLICATION_VND_UIC_DOSIPAS_V1("application/vnd.uic.dosipas.v1"), + APPLICATION_VND_UIC_DOSIPAS_V2("application/vnd.uic.dosipas.v2"), + APPLICATION_VND_UIC_OSDM_JSON("application/vnd.uic.osdm+json"), + APPLICATION_VND_UIC_TLB_FCB("application/vnd.uic.tlb-fcb"), + APPLICATION_VND_UIQ_THEME("application/vnd.uiq.theme"), + APPLICATION_VND_UMAJIN("application/vnd.umajin"), + APPLICATION_VND_UNITY("application/vnd.unity"), + APPLICATION_VND_UOML_XML("application/vnd.uoml+xml"), + APPLICATION_VND_UPLANET_ALERT("application/vnd.uplanet.alert"), + APPLICATION_VND_UPLANET_ALERT_WBXML("application/vnd.uplanet.alert-wbxml"), + APPLICATION_VND_UPLANET_BEARER_CHOICE("application/vnd.uplanet.bearer-choice"), + APPLICATION_VND_UPLANET_BEARER_CHOICE_WBXML("application/vnd.uplanet.bearer-choice-wbxml"), + APPLICATION_VND_UPLANET_CACHEOP("application/vnd.uplanet.cacheop"), + APPLICATION_VND_UPLANET_CACHEOP_WBXML("application/vnd.uplanet.cacheop-wbxml"), + APPLICATION_VND_UPLANET_CHANNEL("application/vnd.uplanet.channel"), + APPLICATION_VND_UPLANET_CHANNEL_WBXML("application/vnd.uplanet.channel-wbxml"), + APPLICATION_VND_UPLANET_LIST("application/vnd.uplanet.list"), + APPLICATION_VND_UPLANET_LISTCMD("application/vnd.uplanet.listcmd"), + APPLICATION_VND_UPLANET_LISTCMD_WBXML("application/vnd.uplanet.listcmd-wbxml"), + APPLICATION_VND_UPLANET_LIST_WBXML("application/vnd.uplanet.list-wbxml"), + APPLICATION_VND_URI_MAP("application/vnd.uri-map"), + APPLICATION_VND_UPLANET_SIGNAL("application/vnd.uplanet.signal"), + APPLICATION_VND_VALVE_SOURCE_MATERIAL("application/vnd.valve.source.material"), + APPLICATION_VND_VCX("application/vnd.vcx"), + APPLICATION_VND_VD_STUDY("application/vnd.vd-study"), + APPLICATION_VND_VECTORWORKS("application/vnd.vectorworks"), + APPLICATION_VND_VEL_JSON("application/vnd.vel+json"), + APPLICATION_VND_VERAISON_TSM_REPORT_CBOR("application/vnd.veraison.tsm-report+cbor"), + APPLICATION_VND_VERAISON_TSM_REPORT_JSON("application/vnd.veraison.tsm-report+json"), + APPLICATION_VND_VERIFIER_ATTESTATION_JWT("application/vnd.verifier-attestation+jwt"), + APPLICATION_VND_VERIMATRIX_VCAS("application/vnd.verimatrix.vcas"), + APPLICATION_VND_VERITONE_AION_JSON("application/vnd.veritone.aion+json"), + APPLICATION_VND_VERYANT_THIN("application/vnd.veryant.thin"), + APPLICATION_VND_VES_ENCRYPTED("application/vnd.ves.encrypted"), + APPLICATION_VND_VIDSOFT_VIDCONFERENCE("application/vnd.vidsoft.vidconference"), + APPLICATION_VND_VISIO("application/vnd.visio"), + APPLICATION_VND_VISIONARY("application/vnd.visionary"), + APPLICATION_VND_VIVIDENCE_SCRIPTFILE("application/vnd.vividence.scriptfile"), + APPLICATION_VND_VOCALSHAPER_VSP4("application/vnd.vocalshaper.vsp4"), + APPLICATION_VND_VSF("application/vnd.vsf"), + APPLICATION_VND_VUQ("application/vnd.vuq"), + APPLICATION_VND_WANTVERSE("application/vnd.wantverse"), + APPLICATION_VND_WAP_SIC("application/vnd.wap.sic"), + APPLICATION_VND_WAP_SLC("application/vnd.wap.slc"), + APPLICATION_VND_WAP_WBXML("application/vnd.wap.wbxml"), + APPLICATION_VND_WAP_WMLC("application/vnd.wap.wmlc"), + APPLICATION_VND_WAP_WMLSCRIPTC("application/vnd.wap.wmlscriptc"), + APPLICATION_VND_WASMFLOW_WAFL("application/vnd.wasmflow.wafl"), + APPLICATION_VND_WEBTURBO("application/vnd.webturbo"), + APPLICATION_VND_WFA_DPP("application/vnd.wfa.dpp"), + APPLICATION_VND_WFA_P2P("application/vnd.wfa.p2p"), + APPLICATION_VND_WFA_WSC("application/vnd.wfa.wsc"), + APPLICATION_VND_WINDOWS_DEVICEPAIRING("application/vnd.windows.devicepairing"), + APPLICATION_VND_WMAP("application/vnd.wmap"), + APPLICATION_VND_WMC("application/vnd.wmc"), + APPLICATION_VND_WMF_BOOTSTRAP("application/vnd.wmf.bootstrap"), + APPLICATION_VND_WOLFRAM_MATHEMATICA("application/vnd.wolfram.mathematica"), + APPLICATION_VND_WOLFRAM_MATHEMATICA_PACKAGE("application/vnd.wolfram.mathematica.package"), + APPLICATION_VND_WOLFRAM_PLAYER("application/vnd.wolfram.player"), + APPLICATION_VND_WORDLIFT("application/vnd.wordlift"), + APPLICATION_VND_WORDPERFECT("application/vnd.wordperfect"), + APPLICATION_VND_WQD("application/vnd.wqd"), + APPLICATION_VND_WRQ_HP3000_LABELLED("application/vnd.wrq-hp3000-labelled"), + APPLICATION_VND_WT_STF("application/vnd.wt.stf"), + APPLICATION_VND_WV_CSP_XML("application/vnd.wv.csp+xml"), + APPLICATION_VND_WV_CSP_WBXML("application/vnd.wv.csp+wbxml"), + APPLICATION_VND_WV_SSP_XML("application/vnd.wv.ssp+xml"), + APPLICATION_VND_XACML_JSON("application/vnd.xacml+json"), + APPLICATION_VND_XARA("application/vnd.xara"), + APPLICATION_VND_XARIN_CPJ("application/vnd.xarin.cpj"), + APPLICATION_VND_XCDN("application/vnd.xcdn"), + APPLICATION_VND_XECRETS_ENCRYPTED("application/vnd.xecrets-encrypted"), + APPLICATION_VND_XFDL("application/vnd.xfdl"), + APPLICATION_VND_XFDL_WEBFORM("application/vnd.xfdl.webform"), + APPLICATION_VND_XMI_XML("application/vnd.xmi+xml"), + APPLICATION_VND_XMPIE_CPKG("application/vnd.xmpie.cpkg"), + APPLICATION_VND_XMPIE_DPKG("application/vnd.xmpie.dpkg"), + APPLICATION_VND_XMPIE_PLAN("application/vnd.xmpie.plan"), + APPLICATION_VND_XMPIE_PPKG("application/vnd.xmpie.ppkg"), + APPLICATION_VND_XMPIE_XLIM("application/vnd.xmpie.xlim"), + APPLICATION_VND_YAMAHA_HV_DIC("application/vnd.yamaha.hv-dic"), + APPLICATION_VND_YAMAHA_HV_SCRIPT("application/vnd.yamaha.hv-script"), + APPLICATION_VND_YAMAHA_HV_VOICE("application/vnd.yamaha.hv-voice"), + APPLICATION_VND_YAMAHA_OPENSCOREFORMAT_OSFPVG_XML("application/vnd.yamaha.openscoreformat.osfpvg+xml"), + APPLICATION_VND_YAMAHA_OPENSCOREFORMAT("application/vnd.yamaha.openscoreformat"), + APPLICATION_VND_YAMAHA_REMOTE_SETUP("application/vnd.yamaha.remote-setup"), + APPLICATION_VND_YAMAHA_SMAF_AUDIO("application/vnd.yamaha.smaf-audio"), + APPLICATION_VND_YAMAHA_SMAF_PHRASE("application/vnd.yamaha.smaf-phrase"), + APPLICATION_VND_YAMAHA_THROUGH_NGN("application/vnd.yamaha.through-ngn"), + APPLICATION_VND_YAMAHA_TUNNEL_UDPENCAP("application/vnd.yamaha.tunnel-udpencap"), + APPLICATION_VND_YAOWEME("application/vnd.yaoweme"), + APPLICATION_VND_YELLOWRIVER_CUSTOM_MENU("application/vnd.yellowriver-custom-menu"), + APPLICATION_VND_YOUTUBE_YT("application/vnd.youtube.yt"), + APPLICATION_VND_ZOHO_PRESENTATION_SHOW("application/vnd.zoho-presentation.show"), + APPLICATION_VND_ZUL("application/vnd.zul"), + APPLICATION_VND_ZZAZZ_DECK_XML("application/vnd.zzazz.deck+xml"), + APPLICATION_VOICEXML_XML("application/voicexml+xml"), + APPLICATION_VOUCHER_CMS_JSON("application/voucher-cms+json"), + APPLICATION_VOUCHER_JWS_JSON("application/voucher-jws+json"), + APPLICATION_VP("application/vp"), + APPLICATION_VP_COSE("application/vp+cose"), + APPLICATION_VP_JWT("application/vp+jwt"), + APPLICATION_VP_SD_JWT("application/vp+sd-jwt"), + APPLICATION_VQ_RTCPXR("application/vq-rtcpxr"), + APPLICATION_WASM("application/wasm"), + APPLICATION_WATCHERINFO_XML("application/watcherinfo+xml"), + APPLICATION_WEBPUSH_OPTIONS_JSON("application/webpush-options+json"), + APPLICATION_WHOISPP_QUERY("application/whoispp-query"), + APPLICATION_WHOISPP_RESPONSE("application/whoispp-response"), + APPLICATION_WIDGET("application/widget"), + APPLICATION_WITA("application/wita"), + APPLICATION_WORDPERFECT5_1("application/wordperfect5.1"), + APPLICATION_WSDL_XML("application/wsdl+xml"), + APPLICATION_WSPOLICY_XML("application/wspolicy+xml"), + APPLICATION_X_PKI_MESSAGE("application/x-pki-message"), + APPLICATION_X_WWW_FORM_URLENCODED("application/x-www-form-urlencoded"), + APPLICATION_X_X509_CA_CERT("application/x-x509-ca-cert"), + APPLICATION_X_X509_CA_RA_CERT("application/x-x509-ca-ra-cert"), + APPLICATION_X_X509_NEXT_CA_CERT("application/x-x509-next-ca-cert"), + APPLICATION_X400_BP("application/x400-bp"), + APPLICATION_XACML_XML("application/xacml+xml"), + APPLICATION_XCAP_ATT_XML("application/xcap-att+xml"), + APPLICATION_XCAP_CAPS_XML("application/xcap-caps+xml"), + APPLICATION_XCAP_DIFF_XML("application/xcap-diff+xml"), + APPLICATION_XCAP_EL_XML("application/xcap-el+xml"), + APPLICATION_XCAP_ERROR_XML("application/xcap-error+xml"), + APPLICATION_XCAP_NS_XML("application/xcap-ns+xml"), + APPLICATION_XCON_CONFERENCE_INFO_DIFF_XML("application/xcon-conference-info-diff+xml"), + APPLICATION_XCON_CONFERENCE_INFO_XML("application/xcon-conference-info+xml"), + APPLICATION_XENC_XML("application/xenc+xml"), + APPLICATION_XFDF("application/xfdf"), + APPLICATION_XHTML_XML("application/xhtml+xml"), + APPLICATION_XLIFF_XML("application/xliff+xml"), + APPLICATION_XML("application/xml"), + APPLICATION_XML_DTD("application/xml-dtd"), + APPLICATION_XML_EXTERNAL_PARSED_ENTITY("application/xml-external-parsed-entity"), + APPLICATION_XML_PATCH_XML("application/xml-patch+xml"), + APPLICATION_XMPP_XML("application/xmpp+xml"), + APPLICATION_XOP_XML("application/xop+xml"), + APPLICATION_XSLT_XML("application/xslt+xml"), + APPLICATION_XV_XML("application/xv+xml"), + APPLICATION_YAML("application/yaml"), + APPLICATION_YANG("application/yang"), + APPLICATION_YANG_DATA_CBOR("application/yang-data+cbor"), + APPLICATION_YANG_DATA_JSON("application/yang-data+json"), + APPLICATION_YANG_DATA_XML("application/yang-data+xml"), + APPLICATION_YANG_PATCH_JSON("application/yang-patch+json"), + APPLICATION_YANG_PATCH_XML("application/yang-patch+xml"), + APPLICATION_YANG_SID_JSON("application/yang-sid+json"), + APPLICATION_YIN_XML("application/yin+xml"), + APPLICATION_ZIP("application/zip"), + APPLICATION_ZLIB("application/zlib"), + APPLICATION_ZSTD("application/zstd"), + AUDIO_1D_INTERLEAVED_PARITYFEC("audio/1d-interleaved-parityfec"), + AUDIO_32KADPCM("audio/32kadpcm"), + AUDIO_3GPP("audio/3gpp"), + AUDIO_3GPP2("audio/3gpp2"), + AUDIO_AAC("audio/aac"), + AUDIO_AC3("audio/ac3"), + AUDIO_AMR("audio/AMR"), + AUDIO_AMR_WB("audio/AMR-WB"), + AUDIO_AMR_WB_("audio/amr-wb+"), + AUDIO_APTX("audio/aptx"), + AUDIO_ASC("audio/asc"), + AUDIO_ATRAC_ADVANCED_LOSSLESS("audio/ATRAC-ADVANCED-LOSSLESS"), + AUDIO_ATRAC_X("audio/ATRAC-X"), + AUDIO_ATRAC3("audio/ATRAC3"), + AUDIO_BASIC("audio/basic"), + AUDIO_BV16("audio/BV16"), + AUDIO_BV32("audio/BV32"), + AUDIO_CLEARMODE("audio/clearmode"), + AUDIO_CN("audio/CN"), + AUDIO_DAT12("audio/DAT12"), + AUDIO_DLS("audio/dls"), + AUDIO_DSR_ES201108("audio/dsr-es201108"), + AUDIO_DSR_ES202050("audio/dsr-es202050"), + AUDIO_DSR_ES202211("audio/dsr-es202211"), + AUDIO_DSR_ES202212("audio/dsr-es202212"), + AUDIO_DV("audio/DV"), + AUDIO_DVI4("audio/DVI4"), + AUDIO_EAC3("audio/eac3"), + AUDIO_ENCAPRTP("audio/encaprtp"), + AUDIO_EVRC("audio/EVRC"), + AUDIO_EVRC_QCP("audio/EVRC-QCP"), + AUDIO_EVRC0("audio/EVRC0"), + AUDIO_EVRC1("audio/EVRC1"), + AUDIO_EVRCB("audio/EVRCB"), + AUDIO_EVRCB0("audio/EVRCB0"), + AUDIO_EVRCB1("audio/EVRCB1"), + AUDIO_EVRCNW("audio/EVRCNW"), + AUDIO_EVRCNW0("audio/EVRCNW0"), + AUDIO_EVRCNW1("audio/EVRCNW1"), + AUDIO_EVRCWB("audio/EVRCWB"), + AUDIO_EVRCWB0("audio/EVRCWB0"), + AUDIO_EVRCWB1("audio/EVRCWB1"), + AUDIO_EVS("audio/EVS"), + AUDIO_EXAMPLE("audio/example"), + AUDIO_FLAC("audio/flac"), + AUDIO_FLEXFEC("audio/flexfec"), + AUDIO_FWDRED("audio/fwdred"), + AUDIO_G711_0("audio/G711-0"), + AUDIO_G719("audio/G719"), + AUDIO_G7221("audio/G7221"), + AUDIO_G722("audio/G722"), + AUDIO_G723("audio/G723"), + AUDIO_G726_16("audio/G726-16"), + AUDIO_G726_24("audio/G726-24"), + AUDIO_G726_32("audio/G726-32"), + AUDIO_G726_40("audio/G726-40"), + AUDIO_G728("audio/G728"), + AUDIO_G729("audio/G729"), + AUDIO_G7291("audio/G7291"), + AUDIO_G729D("audio/G729D"), + AUDIO_G729E("audio/G729E"), + AUDIO_GSM("audio/GSM"), + AUDIO_GSM_EFR("audio/GSM-EFR"), + AUDIO_GSM_HR_08("audio/GSM-HR-08"), + AUDIO_ILBC("audio/iLBC"), + AUDIO_IP_MR_V2_5("audio/ip-mr_v2.5"), + AUDIO_L8("audio/L8"), + AUDIO_L16("audio/L16"), + AUDIO_L20("audio/L20"), + AUDIO_L24("audio/L24"), + AUDIO_LPC("audio/LPC"), + AUDIO_MATROSKA("audio/matroska"), + AUDIO_MELP("audio/MELP"), + AUDIO_MELP600("audio/MELP600"), + AUDIO_MELP1200("audio/MELP1200"), + AUDIO_MELP2400("audio/MELP2400"), + AUDIO_MHAS("audio/mhas"), + AUDIO_MIDI_CLIP("audio/midi-clip"), + AUDIO_MOBILE_XMF("audio/mobile-xmf"), + AUDIO_MPA("audio/MPA"), + AUDIO_MP4("audio/mp4"), + AUDIO_MP4A_LATM("audio/MP4A-LATM"), + AUDIO_MPA_ROBUST("audio/mpa-robust"), + AUDIO_MPEG("audio/mpeg"), + AUDIO_MPEG4_GENERIC("audio/mpeg4-generic"), + AUDIO_OGG("audio/ogg"), + AUDIO_OPUS("audio/opus"), + AUDIO_PARITYFEC("audio/parityfec"), + AUDIO_PCMA("audio/PCMA"), + AUDIO_PCMA_WB("audio/PCMA-WB"), + AUDIO_PCMU("audio/PCMU"), + AUDIO_PCMU_WB("audio/PCMU-WB"), + AUDIO_PRS_SID("audio/prs.sid"), + AUDIO_QCELP("audio/QCELP"), + AUDIO_RAPTORFEC("audio/raptorfec"), + AUDIO_RED("audio/RED"), + AUDIO_RTP_ENC_AESCM128("audio/rtp-enc-aescm128"), + AUDIO_RTPLOOPBACK("audio/rtploopback"), + AUDIO_RTP_MIDI("audio/rtp-midi"), + AUDIO_RTX("audio/rtx"), + AUDIO_SCIP("audio/scip"), + AUDIO_SMV("audio/SMV"), + AUDIO_SMV0("audio/SMV0"), + AUDIO_SMV_QCP("audio/SMV-QCP"), + AUDIO_SOFA("audio/sofa"), + AUDIO_SOUNDFONT("audio/soundfont"), + AUDIO_SP_MIDI("audio/sp-midi"), + AUDIO_SPEEX("audio/speex"), + AUDIO_T140C("audio/t140c"), + AUDIO_T38("audio/t38"), + AUDIO_TELEPHONE_EVENT("audio/telephone-event"), + AUDIO_TETRA_ACELP("audio/TETRA_ACELP"), + AUDIO_TETRA_ACELP_BB("audio/TETRA_ACELP_BB"), + AUDIO_TONE("audio/tone"), + AUDIO_TSVCIS("audio/TSVCIS"), + AUDIO_UEMCLIP("audio/UEMCLIP"), + AUDIO_ULPFEC("audio/ulpfec"), + AUDIO_USAC("audio/usac"), + AUDIO_VDVI("audio/VDVI"), + AUDIO_VMR_WB("audio/VMR-WB"), + AUDIO_VND_3GPP_IUFP("audio/vnd.3gpp.iufp"), + AUDIO_VND_4SB("audio/vnd.4SB"), + AUDIO_VND_AUDIOKOZ("audio/vnd.audiokoz"), + AUDIO_VND_BLOCKFACT_FACTA("audio/vnd.blockfact.facta"), + AUDIO_VND_CELP("audio/vnd.CELP"), + AUDIO_VND_CISCO_NSE("audio/vnd.cisco.nse"), + AUDIO_VND_CMLES_RADIO_EVENTS("audio/vnd.cmles.radio-events"), + AUDIO_VND_CNS_ANP1("audio/vnd.cns.anp1"), + AUDIO_VND_CNS_INF1("audio/vnd.cns.inf1"), + AUDIO_VND_DECE_AUDIO("audio/vnd.dece.audio"), + AUDIO_VND_DIGITAL_WINDS("audio/vnd.digital-winds"), + AUDIO_VND_DLNA_ADTS("audio/vnd.dlna.adts"), + AUDIO_VND_DOLBY_HEAAC_1("audio/vnd.dolby.heaac.1"), + AUDIO_VND_DOLBY_HEAAC_2("audio/vnd.dolby.heaac.2"), + AUDIO_VND_DOLBY_MLP("audio/vnd.dolby.mlp"), + AUDIO_VND_DOLBY_MPS("audio/vnd.dolby.mps"), + AUDIO_VND_DOLBY_PL2("audio/vnd.dolby.pl2"), + AUDIO_VND_DOLBY_PL2X("audio/vnd.dolby.pl2x"), + AUDIO_VND_DOLBY_PL2Z("audio/vnd.dolby.pl2z"), + AUDIO_VND_DOLBY_PULSE_1("audio/vnd.dolby.pulse.1"), + AUDIO_VND_DRA("audio/vnd.dra"), + AUDIO_VND_DTS("audio/vnd.dts"), + AUDIO_VND_DTS_HD("audio/vnd.dts.hd"), + AUDIO_VND_DTS_UHD("audio/vnd.dts.uhd"), + AUDIO_VND_DVB_FILE("audio/vnd.dvb.file"), + AUDIO_VND_EVERAD_PLJ("audio/vnd.everad.plj"), + AUDIO_VND_HNS_AUDIO("audio/vnd.hns.audio"), + AUDIO_VND_LUCENT_VOICE("audio/vnd.lucent.voice"), + AUDIO_VND_MS_PLAYREADY_MEDIA_PYA("audio/vnd.ms-playready.media.pya"), + AUDIO_VND_NOKIA_MOBILE_XMF("audio/vnd.nokia.mobile-xmf"), + AUDIO_VND_NORTEL_VBK("audio/vnd.nortel.vbk"), + AUDIO_VND_NUERA_ECELP4800("audio/vnd.nuera.ecelp4800"), + AUDIO_VND_NUERA_ECELP7470("audio/vnd.nuera.ecelp7470"), + AUDIO_VND_NUERA_ECELP9600("audio/vnd.nuera.ecelp9600"), + AUDIO_VND_OCTEL_SBC("audio/vnd.octel.sbc"), + AUDIO_VND_PRESONUS_MULTITRACK("audio/vnd.presonus.multitrack"), + AUDIO_VND_QCELP("audio/vnd.qcelp"), + AUDIO_VND_RHETOREX_32KADPCM("audio/vnd.rhetorex.32kadpcm"), + AUDIO_VND_RIP("audio/vnd.rip"), + AUDIO_VND_SEALEDMEDIA_SOFTSEAL_MPEG("audio/vnd.sealedmedia.softseal.mpeg"), + AUDIO_VND_VMX_CVSD("audio/vnd.vmx.cvsd"), + AUDIO_VORBIS("audio/vorbis"), + AUDIO_VORBIS_CONFIG("audio/vorbis-config"), + FONT_COLLECTION("font/collection"), + FONT_OTF("font/otf"), + FONT_SFNT("font/sfnt"), + FONT_TTF("font/ttf"), + FONT_WOFF("font/woff"), + FONT_WOFF2("font/woff2"), + HAPTICS_IVS("haptics/ivs"), + HAPTICS_HJIF("haptics/hjif"), + HAPTICS_HMPG("haptics/hmpg"), + IMAGE_ACES("image/aces"), + IMAGE_APNG("image/apng"), + IMAGE_AVCI("image/avci"), + IMAGE_AVCS("image/avcs"), + IMAGE_AVIF("image/avif"), + IMAGE_BMP("image/bmp"), + IMAGE_CGM("image/cgm"), + IMAGE_DICOM_RLE("image/dicom-rle"), + IMAGE_DPX("image/dpx"), + IMAGE_EMF("image/emf"), + IMAGE_EXAMPLE("image/example"), + IMAGE_FITS("image/fits"), + IMAGE_G3FAX("image/g3fax"), + IMAGE_GIF("image/gif"), + IMAGE_HEIC("image/heic"), + IMAGE_HEIC_SEQUENCE("image/heic-sequence"), + IMAGE_HEIF("image/heif"), + IMAGE_HEIF_SEQUENCE("image/heif-sequence"), + IMAGE_HEJ2K("image/hej2k"), + IMAGE_HSJ2("image/hsj2"), + IMAGE_IEF("image/ief"), + IMAGE_J2C("image/j2c"), + IMAGE_JAII("image/jaii"), + IMAGE_JAIS("image/jais"), + IMAGE_JLS("image/jls"), + IMAGE_JP2("image/jp2"), + IMAGE_JPEG("image/jpeg"), + IMAGE_JPH("image/jph"), + IMAGE_JPHC("image/jphc"), + IMAGE_JPM("image/jpm"), + IMAGE_JPX("image/jpx"), + IMAGE_JXL("image/jxl"), + IMAGE_JXR("image/jxr"), + IMAGE_JXRA("image/jxrA"), + IMAGE_JXRS("image/jxrS"), + IMAGE_JXS("image/jxs"), + IMAGE_JXSC("image/jxsc"), + IMAGE_JXSI("image/jxsi"), + IMAGE_JXSS("image/jxss"), + IMAGE_KTX("image/ktx"), + IMAGE_KTX2("image/ktx2"), + IMAGE_NAPLPS("image/naplps"), + IMAGE_PNG("image/png"), + IMAGE_PRS_BTIF("image/prs.btif"), + IMAGE_PRS_PTI("image/prs.pti"), + IMAGE_PWG_RASTER("image/pwg-raster"), + IMAGE_SVG_XML("image/svg+xml"), + IMAGE_T38("image/t38"), + IMAGE_TIFF("image/tiff"), + IMAGE_TIFF_FX("image/tiff-fx"), + IMAGE_VND_ADOBE_PHOTOSHOP("image/vnd.adobe.photoshop"), + IMAGE_VND_AIRZIP_ACCELERATOR_AZV("image/vnd.airzip.accelerator.azv"), + IMAGE_VND_BLOCKFACT_FACTI("image/vnd.blockfact.facti"), + IMAGE_VND_CLIP("image/vnd.clip"), + IMAGE_VND_CNS_INF2("image/vnd.cns.inf2"), + IMAGE_VND_DECE_GRAPHIC("image/vnd.dece.graphic"), + IMAGE_VND_DJVU("image/vnd.djvu"), + IMAGE_VND_DWG("image/vnd.dwg"), + IMAGE_VND_DXF("image/vnd.dxf"), + IMAGE_VND_DVB_SUBTITLE("image/vnd.dvb.subtitle"), + IMAGE_VND_FASTBIDSHEET("image/vnd.fastbidsheet"), + IMAGE_VND_FPX("image/vnd.fpx"), + IMAGE_VND_FST("image/vnd.fst"), + IMAGE_VND_FUJIXEROX_EDMICS_MMR("image/vnd.fujixerox.edmics-mmr"), + IMAGE_VND_FUJIXEROX_EDMICS_RLC("image/vnd.fujixerox.edmics-rlc"), + IMAGE_VND_GLOBALGRAPHICS_PGB("image/vnd.globalgraphics.pgb"), + IMAGE_VND_MICROSOFT_ICON("image/vnd.microsoft.icon"), + IMAGE_VND_MIX("image/vnd.mix"), + IMAGE_VND_MS_MODI("image/vnd.ms-modi"), + IMAGE_VND_MOZILLA_APNG("image/vnd.mozilla.apng"), + IMAGE_VND_NET_FPX("image/vnd.net-fpx"), + IMAGE_VND_PCO_B16("image/vnd.pco.b16"), + IMAGE_VND_RADIANCE("image/vnd.radiance"), + IMAGE_VND_SEALED_PNG("image/vnd.sealed.png"), + IMAGE_VND_SEALEDMEDIA_SOFTSEAL_GIF("image/vnd.sealedmedia.softseal.gif"), + IMAGE_VND_SEALEDMEDIA_SOFTSEAL_JPG("image/vnd.sealedmedia.softseal.jpg"), + IMAGE_VND_SVF("image/vnd.svf"), + IMAGE_VND_TENCENT_TAP("image/vnd.tencent.tap"), + IMAGE_VND_VALVE_SOURCE_TEXTURE("image/vnd.valve.source.texture"), + IMAGE_VND_WAP_WBMP("image/vnd.wap.wbmp"), + IMAGE_VND_XIFF("image/vnd.xiff"), + IMAGE_VND_ZBRUSH_PCX("image/vnd.zbrush.pcx"), + IMAGE_WEBP("image/webp"), + IMAGE_WMF("image/wmf"), + IMAGE_X_EMF("image/x-emf"), + IMAGE_X_WMF("image/x-wmf"), + MESSAGE_BHTTP("message/bhttp"), + MESSAGE_CPIM("message/CPIM"), + MESSAGE_DELIVERY_STATUS("message/delivery-status"), + MESSAGE_DISPOSITION_NOTIFICATION("message/disposition-notification"), + MESSAGE_EXAMPLE("message/example"), + MESSAGE_EXTERNAL_BODY("message/external-body"), + MESSAGE_FEEDBACK_REPORT("message/feedback-report"), + MESSAGE_GLOBAL("message/global"), + MESSAGE_GLOBAL_DELIVERY_STATUS("message/global-delivery-status"), + MESSAGE_GLOBAL_DISPOSITION_NOTIFICATION("message/global-disposition-notification"), + MESSAGE_GLOBAL_HEADERS("message/global-headers"), + MESSAGE_HTTP("message/http"), + MESSAGE_IMDN_XML("message/imdn+xml"), + MESSAGE_MLS("message/mls"), + MESSAGE_NEWS("message/news"), + MESSAGE_OHTTP_REQ("message/ohttp-req"), + MESSAGE_OHTTP_RES("message/ohttp-res"), + MESSAGE_PARTIAL("message/partial"), + MESSAGE_RFC822("message/rfc822"), + MESSAGE_S_HTTP("message/s-http"), + MESSAGE_SIP("message/sip"), + MESSAGE_SIPFRAG("message/sipfrag"), + MESSAGE_TRACKING_STATUS("message/tracking-status"), + MESSAGE_VND_SI_SIMP("message/vnd.si.simp"), + MESSAGE_VND_WFA_WSC("message/vnd.wfa.wsc"), + MODEL_3MF("model/3mf"), + MODEL_E57("model/e57"), + MODEL_EXAMPLE("model/example"), + MODEL_GLTF_BINARY("model/gltf-binary"), + MODEL_GLTF_JSON("model/gltf+json"), + MODEL_JT("model/JT"), + MODEL_IGES("model/iges"), + MODEL_MESH("model/mesh"), + MODEL_MTL("model/mtl"), + MODEL_OBJ("model/obj"), + MODEL_PRC("model/prc"), + MODEL_STEP("model/step"), + MODEL_STEP_XML("model/step+xml"), + MODEL_STEP_ZIP("model/step+zip"), + MODEL_STEP_XML_ZIP("model/step-xml+zip"), + MODEL_STL("model/stl"), + MODEL_U3D("model/u3d"), + MODEL_VND_BARY("model/vnd.bary"), + MODEL_VND_CLD("model/vnd.cld"), + MODEL_VND_COLLADA_XML("model/vnd.collada+xml"), + MODEL_VND_DWF("model/vnd.dwf"), + MODEL_VND_FLATLAND_3DML("model/vnd.flatland.3dml"), + MODEL_VND_GDL("model/vnd.gdl"), + MODEL_VND_GS_GDL("model/vnd.gs-gdl"), + MODEL_VND_GTW("model/vnd.gtw"), + MODEL_VND_MOML_XML("model/vnd.moml+xml"), + MODEL_VND_MTS("model/vnd.mts"), + MODEL_VND_OPENGEX("model/vnd.opengex"), + MODEL_VND_PARASOLID_TRANSMIT_BINARY("model/vnd.parasolid.transmit.binary"), + MODEL_VND_PARASOLID_TRANSMIT_TEXT("model/vnd.parasolid.transmit.text"), + MODEL_VND_PYTHA_PYOX("model/vnd.pytha.pyox"), + MODEL_VND_ROSETTE_ANNOTATED_DATA_MODEL("model/vnd.rosette.annotated-data-model"), + MODEL_VND_SAP_VDS("model/vnd.sap.vds"), + MODEL_VND_USDA("model/vnd.usda"), + MODEL_VND_USDZ_ZIP("model/vnd.usdz+zip"), + MODEL_VND_VALVE_SOURCE_COMPILED_MAP("model/vnd.valve.source.compiled-map"), + MODEL_VND_VTU("model/vnd.vtu"), + MODEL_VRML("model/vrml"), + MODEL_X3D_VRML("model/x3d-vrml"), + MODEL_X3D_FASTINFOSET("model/x3d+fastinfoset"), + MODEL_X3D_XML("model/x3d+xml"), + MULTIPART_ALTERNATIVE("multipart/alternative"), + MULTIPART_APPLEDOUBLE("multipart/appledouble"), + MULTIPART_BYTERANGES("multipart/byteranges"), + MULTIPART_DIGEST("multipart/digest"), + MULTIPART_ENCRYPTED("multipart/encrypted"), + MULTIPART_EXAMPLE("multipart/example"), + MULTIPART_FORM_DATA("multipart/form-data"), + MULTIPART_HEADER_SET("multipart/header-set"), + MULTIPART_MIXED("multipart/mixed"), + MULTIPART_MULTILINGUAL("multipart/multilingual"), + MULTIPART_PARALLEL("multipart/parallel"), + MULTIPART_RELATED("multipart/related"), + MULTIPART_REPORT("multipart/report"), + MULTIPART_SIGNED("multipart/signed"), + MULTIPART_VND_BINT_MED_PLUS("multipart/vnd.bint.med-plus"), + MULTIPART_VOICE_MESSAGE("multipart/voice-message"), + MULTIPART_X_MIXED_REPLACE("multipart/x-mixed-replace"), + TEXT_1D_INTERLEAVED_PARITYFEC("text/1d-interleaved-parityfec"), + TEXT_CACHE_MANIFEST("text/cache-manifest"), + TEXT_CALENDAR("text/calendar"), + TEXT_CQL("text/cql"), + TEXT_CQL_EXPRESSION("text/cql-expression"), + TEXT_CQL_IDENTIFIER("text/cql-identifier"), + TEXT_CSS("text/css"), + TEXT_CSV("text/csv"), + TEXT_CSV_SCHEMA("text/csv-schema"), + TEXT_DIRECTORY("text/directory"), + TEXT_DNS("text/dns"), + TEXT_ECMASCRIPT("text/ecmascript"), + TEXT_ENCAPRTP("text/encaprtp"), + TEXT_ENRICHED("text/enriched"), + TEXT_EXAMPLE("text/example"), + TEXT_FHIRPATH("text/fhirpath"), + TEXT_FLEXFEC("text/flexfec"), + TEXT_FWDRED("text/fwdred"), + TEXT_GFF3("text/gff3"), + TEXT_GRAMMAR_REF_LIST("text/grammar-ref-list"), + TEXT_HL7V2("text/hl7v2"), + TEXT_HTML("text/html"), + TEXT_JAVASCRIPT("text/javascript"), + TEXT_JCR_CND("text/jcr-cnd"), + TEXT_MARKDOWN("text/markdown"), + TEXT_MIZAR("text/mizar"), + TEXT_N3("text/n3"), + TEXT_ORG("text/org"), + TEXT_PARAMETERS("text/parameters"), + TEXT_PARITYFEC("text/parityfec"), + TEXT_PLAIN("text/plain"), + TEXT_PROVENANCE_NOTATION("text/provenance-notation"), + TEXT_PRS_FALLENSTEIN_RST("text/prs.fallenstein.rst"), + TEXT_PRS_LINES_TAG("text/prs.lines.tag"), + TEXT_PRS_PROP_LOGIC("text/prs.prop.logic"), + TEXT_PRS_TEXI("text/prs.texi"), + TEXT_RAPTORFEC("text/raptorfec"), + TEXT_RED("text/RED"), + TEXT_RFC822_HEADERS("text/rfc822-headers"), + TEXT_RICHTEXT("text/richtext"), + TEXT_RTF("text/rtf"), + TEXT_RTP_ENC_AESCM128("text/rtp-enc-aescm128"), + TEXT_RTPLOOPBACK("text/rtploopback"), + TEXT_RTX("text/rtx"), + TEXT_SGML("text/SGML"), + TEXT_SHACLC("text/shaclc"), + TEXT_SHEX("text/shex"), + TEXT_SPDX("text/spdx"), + TEXT_STRINGS("text/strings"), + TEXT_T140("text/t140"), + TEXT_TAB_SEPARATED_VALUES("text/tab-separated-values"), + TEXT_TROFF("text/troff"), + TEXT_TURTLE("text/turtle"), + TEXT_ULPFEC("text/ulpfec"), + TEXT_URI_LIST("text/uri-list"), + TEXT_VCARD("text/vcard"), + TEXT_VND_A("text/vnd.a"), + TEXT_VND_ABC("text/vnd.abc"), + TEXT_VND_ASCII_ART("text/vnd.ascii-art"), + TEXT_VND_CURL("text/vnd.curl"), + TEXT_VND_DEBIAN_COPYRIGHT("text/vnd.debian.copyright"), + TEXT_VND_DMCLIENTSCRIPT("text/vnd.DMClientScript"), + TEXT_VND_DVB_SUBTITLE("text/vnd.dvb.subtitle"), + TEXT_VND_ESMERTEC_THEME_DESCRIPTOR("text/vnd.esmertec.theme-descriptor"), + TEXT_VND_EXCHANGEABLE("text/vnd.exchangeable"), + TEXT_VND_FAMILYSEARCH_GEDCOM("text/vnd.familysearch.gedcom"), + TEXT_VND_FICLAB_FLT("text/vnd.ficlab.flt"), + TEXT_VND_FLY("text/vnd.fly"), + TEXT_VND_FMI_FLEXSTOR("text/vnd.fmi.flexstor"), + TEXT_VND_GML("text/vnd.gml"), + TEXT_VND_GRAPHVIZ("text/vnd.graphviz"), + TEXT_VND_HANS("text/vnd.hans"), + TEXT_VND_HGL("text/vnd.hgl"), + TEXT_VND_IN3D_3DML("text/vnd.in3d.3dml"), + TEXT_VND_IN3D_SPOT("text/vnd.in3d.spot"), + TEXT_VND_IPTC_NEWSML("text/vnd.IPTC.NewsML"), + TEXT_VND_IPTC_NITF("text/vnd.IPTC.NITF"), + TEXT_VND_LATEX_Z("text/vnd.latex-z"), + TEXT_VND_MOTOROLA_REFLEX("text/vnd.motorola.reflex"), + TEXT_VND_MS_MEDIAPACKAGE("text/vnd.ms-mediapackage"), + TEXT_VND_NET2PHONE_COMMCENTER_COMMAND("text/vnd.net2phone.commcenter.command"), + TEXT_VND_RADISYS_MSML_BASIC_LAYOUT("text/vnd.radisys.msml-basic-layout"), + TEXT_VND_SENX_WARPSCRIPT("text/vnd.senx.warpscript"), + TEXT_VND_SI_URICATALOGUE("text/vnd.si.uricatalogue"), + TEXT_VND_SUN_J2ME_APP_DESCRIPTOR("text/vnd.sun.j2me.app-descriptor"), + TEXT_VND_SOSI("text/vnd.sosi"), + TEXT_VND_TYPST("text/vnd.typst"), + TEXT_VND_TROLLTECH_LINGUIST("text/vnd.trolltech.linguist"), + TEXT_VND_VCF("text/vnd.vcf"), + TEXT_VND_WAP_SI("text/vnd.wap.si"), + TEXT_VND_WAP_SL("text/vnd.wap.sl"), + TEXT_VND_WAP_WML("text/vnd.wap.wml"), + TEXT_VND_WAP_WMLSCRIPT("text/vnd.wap.wmlscript"), + TEXT_VND_ZOO_KCL("text/vnd.zoo.kcl"), + TEXT_VTT("text/vtt"), + TEXT_WGSL("text/wgsl"), + TEXT_XML("text/xml"), + TEXT_XML_EXTERNAL_PARSED_ENTITY("text/xml-external-parsed-entity"), + VIDEO_1D_INTERLEAVED_PARITYFEC("video/1d-interleaved-parityfec"), + VIDEO_3GPP("video/3gpp"), + VIDEO_3GPP2("video/3gpp2"), + VIDEO_3GPP_TT("video/3gpp-tt"), + VIDEO_AV1("video/AV1"), + VIDEO_BMPEG("video/BMPEG"), + VIDEO_BT656("video/BT656"), + VIDEO_CELB("video/CelB"), + VIDEO_DV("video/DV"), + VIDEO_ENCAPRTP("video/encaprtp"), + VIDEO_EVC("video/evc"), + VIDEO_EXAMPLE("video/example"), + VIDEO_FFV1("video/FFV1"), + VIDEO_FLEXFEC("video/flexfec"), + VIDEO_H261("video/H261"), + VIDEO_H263("video/H263"), + VIDEO_H263_1998("video/H263-1998"), + VIDEO_H263_2000("video/H263-2000"), + VIDEO_H264("video/H264"), + VIDEO_H264_RCDO("video/H264-RCDO"), + VIDEO_H264_SVC("video/H264-SVC"), + VIDEO_H265("video/H265"), + VIDEO_H266("video/H266"), + VIDEO_ISO_SEGMENT("video/iso.segment"), + VIDEO_JPEG("video/JPEG"), + VIDEO_JPEG2000("video/jpeg2000"), + VIDEO_JPEG2000_SCL("video/jpeg2000-scl"), + VIDEO_JXSV("video/jxsv"), + VIDEO_LOTTIE_JSON("video/lottie+json"), + VIDEO_MATROSKA("video/matroska"), + VIDEO_MATROSKA_3D("video/matroska-3d"), + VIDEO_MJ2("video/mj2"), + VIDEO_MP1S("video/MP1S"), + VIDEO_MP2P("video/MP2P"), + VIDEO_MP2T("video/MP2T"), + VIDEO_MP4("video/mp4"), + VIDEO_MP4V_ES("video/MP4V-ES"), + VIDEO_MPV("video/MPV"), + VIDEO_MPEG("video/mpeg"), + VIDEO_MPEG4_GENERIC("video/mpeg4-generic"), + VIDEO_NV("video/nv"), + VIDEO_OGG("video/ogg"), + VIDEO_PARITYFEC("video/parityfec"), + VIDEO_POINTER("video/pointer"), + VIDEO_QUICKTIME("video/quicktime"), + VIDEO_RAPTORFEC("video/raptorfec"), + VIDEO_RAW("video/raw"), + VIDEO_RTP_ENC_AESCM128("video/rtp-enc-aescm128"), + VIDEO_RTPLOOPBACK("video/rtploopback"), + VIDEO_RTX("video/rtx"), + VIDEO_SCIP("video/scip"), + VIDEO_SMPTE291("video/smpte291"), + VIDEO_SMPTE292M("video/SMPTE292M"), + VIDEO_ULPFEC("video/ulpfec"), + VIDEO_VC1("video/vc1"), + VIDEO_VC2("video/vc2"), + VIDEO_VND_BLOCKFACT_FACTV("video/vnd.blockfact.factv"), + VIDEO_VND_CCTV("video/vnd.CCTV"), + VIDEO_VND_DECE_HD("video/vnd.dece.hd"), + VIDEO_VND_DECE_MOBILE("video/vnd.dece.mobile"), + VIDEO_VND_DECE_MP4("video/vnd.dece.mp4"), + VIDEO_VND_DECE_PD("video/vnd.dece.pd"), + VIDEO_VND_DECE_SD("video/vnd.dece.sd"), + VIDEO_VND_DECE_VIDEO("video/vnd.dece.video"), + VIDEO_VND_DIRECTV_MPEG("video/vnd.directv.mpeg"), + VIDEO_VND_DIRECTV_MPEG_TTS("video/vnd.directv.mpeg-tts"), + VIDEO_VND_DLNA_MPEG_TTS("video/vnd.dlna.mpeg-tts"), + VIDEO_VND_DVB_FILE("video/vnd.dvb.file"), + VIDEO_VND_FVT("video/vnd.fvt"), + VIDEO_VND_HNS_VIDEO("video/vnd.hns.video"), + VIDEO_VND_IPTVFORUM_1DPARITYFEC_1010("video/vnd.iptvforum.1dparityfec-1010"), + VIDEO_VND_IPTVFORUM_1DPARITYFEC_2005("video/vnd.iptvforum.1dparityfec-2005"), + VIDEO_VND_IPTVFORUM_2DPARITYFEC_1010("video/vnd.iptvforum.2dparityfec-1010"), + VIDEO_VND_IPTVFORUM_2DPARITYFEC_2005("video/vnd.iptvforum.2dparityfec-2005"), + VIDEO_VND_IPTVFORUM_TTSAVC("video/vnd.iptvforum.ttsavc"), + VIDEO_VND_IPTVFORUM_TTSMPEG2("video/vnd.iptvforum.ttsmpeg2"), + VIDEO_VND_MOTOROLA_VIDEO("video/vnd.motorola.video"), + VIDEO_VND_MOTOROLA_VIDEOP("video/vnd.motorola.videop"), + VIDEO_VND_MPEGURL("video/vnd.mpegurl"), + VIDEO_VND_MS_PLAYREADY_MEDIA_PYV("video/vnd.ms-playready.media.pyv"), + VIDEO_VND_NOKIA_INTERLEAVED_MULTIMEDIA("video/vnd.nokia.interleaved-multimedia"), + VIDEO_VND_NOKIA_MP4VR("video/vnd.nokia.mp4vr"), + VIDEO_VND_NOKIA_VIDEOVOIP("video/vnd.nokia.videovoip"), + VIDEO_VND_OBJECTVIDEO("video/vnd.objectvideo"), + VIDEO_VND_PLANAR("video/vnd.planar"), + VIDEO_VND_RADGAMETTOOLS_BINK("video/vnd.radgamettools.bink"), + VIDEO_VND_RADGAMETTOOLS_SMACKER("video/vnd.radgamettools.smacker"), + VIDEO_VND_SEALED_MPEG1("video/vnd.sealed.mpeg1"), + VIDEO_VND_SEALED_MPEG4("video/vnd.sealed.mpeg4"), + VIDEO_VND_SEALED_SWF("video/vnd.sealed.swf"), + VIDEO_VND_SEALEDMEDIA_SOFTSEAL_MOV("video/vnd.sealedmedia.softseal.mov"), + VIDEO_VND_UVVU_MP4("video/vnd.uvvu.mp4"), + VIDEO_VND_YOUTUBE_YT("video/vnd.youtube.yt"), + VIDEO_VND_VIVO("video/vnd.vivo"), + VIDEO_VP8("video/VP8"), + VIDEO_VP9("video/VP9"); } diff --git a/src/main/kotlin/com/mingliqiye/utils/http/PageData.kt b/src/main/kotlin/com/mingliqiye/utils/http/PageData.kt index 2896847..33c5c4e 100644 --- a/src/main/kotlin/com/mingliqiye/utils/http/PageData.kt +++ b/src/main/kotlin/com/mingliqiye/utils/http/PageData.kt @@ -28,38 +28,38 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page * 分页数据类 */ data class PageData( - /** - * 当前页的数据列表 - */ - val records: Collection = emptyList(), + /** + * 当前页的数据列表 + */ + val records: Collection = emptyList(), - /** - * 总条数(总记录数) - */ - val totalCount: Long = 0, + /** + * 总条数(总记录数) + */ + val totalCount: Long = 0, - /** - * 总页数 - */ - val totalPages: Long = 0, + /** + * 总页数 + */ + val totalPages: Long = 0, - /** - * 每页大小 - */ - val pageSize: Long = 0, + /** + * 每页大小 + */ + val pageSize: Long = 0, - /** - * 当前页码(从 1 开始) - */ - val pageIndex: Long = 0, + /** + * 当前页码(从 1 开始) + */ + val pageIndex: Long = 0, ) { - companion object { - fun of(page: Page): PageData = PageData( - records = page.records, - totalCount = page.total, - totalPages = page.pages, - pageSize = page.size, - pageIndex = page.current, - ) - } + companion object { + fun of(page: Page): PageData = PageData( + records = page.records, + totalCount = page.total, + totalPages = page.pages, + pageSize = page.size, + pageIndex = page.current, + ) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/http/PagedResponse.kt b/src/main/kotlin/com/mingliqiye/utils/http/PagedResponse.kt index ef7a783..c91be75 100644 --- a/src/main/kotlin/com/mingliqiye/utils/http/PagedResponse.kt +++ b/src/main/kotlin/com/mingliqiye/utils/http/PagedResponse.kt @@ -26,191 +26,191 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page import com.mingliqiye.utils.time.DateTime data class PagedResponse( - override val time: String, // 响应时间,一旦创建不可修改 - override var message: String, // 响应消息,可通过setter修改 - override var data: PageData, // 响应数据,可通过setter修改 - override var statusCode: Int, // HTTP状态码,可通过setter修改 + override val time: String, // 响应时间,一旦创建不可修改 + override var message: String, // 响应消息,可通过setter修改 + override var data: PageData, // 响应数据,可通过setter修改 + override var statusCode: Int, // HTTP状态码,可通过setter修改 ) : BaseResponse>( - time, - message, - data, - statusCode + time, + message, + data, + statusCode ) { - companion object { - /** - * 创建一个默认的成功响应对象 - * 使用默认消息"操作成功",无数据,状态码200 - * - * @return Response 默认的成功响应对象 - */ - fun ok() = ok("操作成功") + companion object { + /** + * 创建一个默认的成功响应对象 + * 使用默认消息"操作成功",无数据,状态码200 + * + * @return Response 默认的成功响应对象 + */ + fun ok() = ok("操作成功") - /** - * 创建一个默认的错误响应对象 - * 使用默认消息"服务器错误",无数据,状态码500 - * - * @return Response 默认的成功响应对象 - */ - fun error() = error("服务器错误") + /** + * 创建一个默认的错误响应对象 + * 使用默认消息"服务器错误",无数据,状态码500 + * + * @return Response 默认的成功响应对象 + */ + fun error() = error("服务器错误") - /** - * 创建一个成功的响应对象(仅包含消息) - * - * @param message 响应消息 - * @return Response 成功的响应对象,数据为null - */ - @JvmStatic - fun ok(message: String) = PagedResponse( - time = DateTime.now().format(), message = message, data = PageData(), statusCode = 200 - ) + /** + * 创建一个成功的响应对象(仅包含消息) + * + * @param message 响应消息 + * @return Response 成功的响应对象,数据为null + */ + @JvmStatic + fun ok(message: String) = PagedResponse( + time = DateTime.now().format(), message = message, data = PageData(), statusCode = 200 + ) - /** - * 创建一个错误的响应对象 - * - * @param message 错误消息,默认为"服务器错误" - * @param statusCode HTTP状态码,默认为500 - * @return Response 错误的响应对象 - */ - fun error(message: String = "服务器错误", statusCode: Int = 500) = ok(message).withStatusCode(statusCode) + /** + * 创建一个错误的响应对象 + * + * @param message 错误消息,默认为"服务器错误" + * @param statusCode HTTP状态码,默认为500 + * @return Response 错误的响应对象 + */ + fun error(message: String = "服务器错误", statusCode: Int = 500) = ok(message).withStatusCode(statusCode) - /** - * 创建一个成功的响应对象(仅包含数据) - * 使用默认消息"操作成功" - * - * @param T 响应数据的类型 - * @param data 响应数据 - * @return Response 成功的响应对象,包含数据 - */ - @JvmStatic - fun okData(data: PageData) = PagedResponse( - time = DateTime.now().format(), message = "操作成功", data = data, statusCode = 200 - ) + /** + * 创建一个成功的响应对象(仅包含数据) + * 使用默认消息"操作成功" + * + * @param T 响应数据的类型 + * @param data 响应数据 + * @return Response 成功的响应对象,包含数据 + */ + @JvmStatic + fun okData(data: PageData) = PagedResponse( + time = DateTime.now().format(), message = "操作成功", data = data, statusCode = 200 + ) - /** - * 从mybatisplus的page构建 - */ - @JvmOverloads - fun okPgae( - page: Page, - time: String = DateTime.now().format(), - message: String = "操作成功", - statusCode: Int = 200, - ): PagedResponse { + /** + * 从mybatisplus的page构建 + */ + @JvmOverloads + fun okPgae( + page: Page, + time: String = DateTime.now().format(), + message: String = "操作成功", + statusCode: Int = 200, + ): PagedResponse { - return PagedResponse( - time = time, message = message, data = PageData.of(page), statusCode = statusCode - ) - } + return PagedResponse( + time = time, message = message, data = PageData.of(page), statusCode = statusCode + ) + } - /** - * 创建一个成功的响应对象(包含数据和消息) - * - * @param T 响应数据的类型 - * @param data 响应数据 - * @param message 响应消息 - * @return Response 成功的响应对象,包含数据和消息 - */ - @JvmStatic - fun okData(data: PageData, message: String) = PagedResponse( - time = DateTime.now().format(), message = message, data = data, statusCode = 200 - ) + /** + * 创建一个成功的响应对象(包含数据和消息) + * + * @param T 响应数据的类型 + * @param data 响应数据 + * @param message 响应消息 + * @return Response 成功的响应对象,包含数据和消息 + */ + @JvmStatic + fun okData(data: PageData, message: String) = PagedResponse( + time = DateTime.now().format(), message = message, data = data, statusCode = 200 + ) - /** - * 创建一个指定状态码的响应对象(仅包含状态码) - * 使用默认消息"操作成功",无数据 - * - * @param statusCode HTTP状态码 - * @return Response 指定状态码的响应对象 - */ - @JvmStatic - fun code(statusCode: Int) = PagedResponse( - time = DateTime.now().format(), message = "操作成功", data = PageData(), statusCode = statusCode - ) + /** + * 创建一个指定状态码的响应对象(仅包含状态码) + * 使用默认消息"操作成功",无数据 + * + * @param statusCode HTTP状态码 + * @return Response 指定状态码的响应对象 + */ + @JvmStatic + fun code(statusCode: Int) = PagedResponse( + time = DateTime.now().format(), message = "操作成功", data = PageData(), statusCode = statusCode + ) - /** - * 创建一个指定状态码的响应对象(包含状态码和消息) - * 无数据 - * - * @param statusCode HTTP状态码 - * @param message 响应消息 - * @return Response 指定状态码和消息的响应对象 - */ - @JvmStatic - fun code(statusCode: Int, message: String) = PagedResponse( - time = DateTime.now().format(), message = message, data = PageData(), statusCode = statusCode - ) - } + /** + * 创建一个指定状态码的响应对象(包含状态码和消息) + * 无数据 + * + * @param statusCode HTTP状态码 + * @param message 响应消息 + * @return Response 指定状态码和消息的响应对象 + */ + @JvmStatic + fun code(statusCode: Int, message: String) = PagedResponse( + time = DateTime.now().format(), message = message, data = PageData(), statusCode = statusCode + ) + } - /** - * 默认构造函数,创建一个默认的成功响应对象 - * 使用当前时间、默认消息"操作成功"、状态码200、无数据 - */ - constructor() : this( - time = DateTime.now().format(), message = "操作成功", statusCode = 200, data = PageData() - ) + /** + * 默认构造函数,创建一个默认的成功响应对象 + * 使用当前时间、默认消息"操作成功"、状态码200、无数据 + */ + constructor() : this( + time = DateTime.now().format(), message = "操作成功", statusCode = 200, data = PageData() + ) - /** - * 设置响应数据 - * - * 该方法允许修改响应数据,并返回当前对象以支持链式调用。 - * - * @param data 新的响应数据 - * @return Response 当前响应对象(支持链式调用) - */ - fun setData(data: PageData): PagedResponse { - this.data = data - return this - } + /** + * 设置响应数据 + * + * 该方法允许修改响应数据,并返回当前对象以支持链式调用。 + * + * @param data 新的响应数据 + * @return Response 当前响应对象(支持链式调用) + */ + fun setData(data: PageData): PagedResponse { + this.data = data + return this + } - /** - * 创建一个新的Response对象,使用指定的时间 - * - * 该方法用于创建具有新时间的响应对象,遵循不可变对象的设计模式。 - * 如果时间相同,则返回原对象避免不必要的对象创建。 - * - * @param time 新的响应时间 - * @return Response 新的响应对象(如果时间相同则返回原对象) - */ - fun withTime(time: String): PagedResponse = - if (this.time == time) this else PagedResponse(time, message, data, statusCode) + /** + * 创建一个新的Response对象,使用指定的时间 + * + * 该方法用于创建具有新时间的响应对象,遵循不可变对象的设计模式。 + * 如果时间相同,则返回原对象避免不必要的对象创建。 + * + * @param time 新的响应时间 + * @return Response 新的响应对象(如果时间相同则返回原对象) + */ + fun withTime(time: String): PagedResponse = + if (this.time == time) this else PagedResponse(time, message, data, statusCode) - /** - * 创建一个新的Response对象,使用指定的数据 - * - * 该方法允许改变响应数据的类型,创建一个新的响应对象。 - * 适用于需要在保持其他字段不变的情况下更新数据类型的场景。 - * - * @param D 新的数据类型 - * @param data 新的响应数据 - * @return Response 新的响应对象,数据类型为D - */ - fun withData(data: PageData): PagedResponse = - PagedResponse(this.time, this.message, data, this.statusCode) + /** + * 创建一个新的Response对象,使用指定的数据 + * + * 该方法允许改变响应数据的类型,创建一个新的响应对象。 + * 适用于需要在保持其他字段不变的情况下更新数据类型的场景。 + * + * @param D 新的数据类型 + * @param data 新的响应数据 + * @return Response 新的响应对象,数据类型为D + */ + fun withData(data: PageData): PagedResponse = + PagedResponse(this.time, this.message, data, this.statusCode) - /** - * 创建一个新的Response对象,使用指定的消息 - * - * 该方法用于创建具有新消息的响应对象,遵循不可变对象的设计模式。 - * 如果消息相同,则返回原对象避免不必要的对象创建。 - * - * @param message 新的响应消息 - * @return Response 新的响应对象(如果消息相同则返回原对象) - */ - fun withMessage(message: String): PagedResponse = - if (this.message == message) this else PagedResponse(time, message, data, statusCode) + /** + * 创建一个新的Response对象,使用指定的消息 + * + * 该方法用于创建具有新消息的响应对象,遵循不可变对象的设计模式。 + * 如果消息相同,则返回原对象避免不必要的对象创建。 + * + * @param message 新的响应消息 + * @return Response 新的响应对象(如果消息相同则返回原对象) + */ + fun withMessage(message: String): PagedResponse = + if (this.message == message) this else PagedResponse(time, message, data, statusCode) - /** - * 创建一个新的Response对象,使用指定的状态码 - * - * 该方法用于创建具有新状态码的响应对象,遵循不可变对象的设计模式。 - * 如果状态码相同,则返回原对象避免不必要的对象创建。 - * - * @param statusCode 新的状态码 - * @return Response 新的响应对象(如果状态码相同则返回原对象) - */ - fun withStatusCode(statusCode: Int): PagedResponse = - if (this.statusCode == statusCode) this else PagedResponse(time, message, data, statusCode) + /** + * 创建一个新的Response对象,使用指定的状态码 + * + * 该方法用于创建具有新状态码的响应对象,遵循不可变对象的设计模式。 + * 如果状态码相同,则返回原对象避免不必要的对象创建。 + * + * @param statusCode 新的状态码 + * @return Response 新的响应对象(如果状态码相同则返回原对象) + */ + fun withStatusCode(statusCode: Int): PagedResponse = + if (this.statusCode == statusCode) this else PagedResponse(time, message, data, statusCode) } diff --git a/src/main/kotlin/com/mingliqiye/utils/http/Response.kt b/src/main/kotlin/com/mingliqiye/utils/http/Response.kt index 2040eeb..f7d55d4 100644 --- a/src/main/kotlin/com/mingliqiye/utils/http/Response.kt +++ b/src/main/kotlin/com/mingliqiye/utils/http/Response.kt @@ -38,171 +38,171 @@ import com.mingliqiye.utils.time.DateTime * @property statusCode HTTP状态码 */ data class Response( - override val time: String, // 响应时间,一旦创建不可修改 - override var message: String, // 响应消息,可通过setter修改 - override var data: T?, // 响应数据,可通过setter修改 - override var statusCode: Int, // HTTP状态码,可通过setter修改 + override val time: String, // 响应时间,一旦创建不可修改 + override var message: String, // 响应消息,可通过setter修改 + override var data: T?, // 响应数据,可通过setter修改 + override var statusCode: Int, // HTTP状态码,可通过setter修改 ) : BaseResponse( - time, - message, - data, - statusCode, + time, + message, + data, + statusCode, ) { - companion object { - /** - * 创建一个默认的成功响应对象 - * 使用默认消息"操作成功",无数据,状态码200 - * - * @return Response 默认的成功响应对象 - */ - fun ok() = ok("操作成功") + companion object { + /** + * 创建一个默认的成功响应对象 + * 使用默认消息"操作成功",无数据,状态码200 + * + * @return Response 默认的成功响应对象 + */ + fun ok() = ok("操作成功") - /** - * 创建一个默认的错误响应对象 - * 使用默认消息"服务器错误",无数据,状态码500 - * - * @return Response 默认的成功响应对象 - */ - fun error() = error("服务器错误") + /** + * 创建一个默认的错误响应对象 + * 使用默认消息"服务器错误",无数据,状态码500 + * + * @return Response 默认的成功响应对象 + */ + fun error() = error("服务器错误") - /** - * 创建一个成功的响应对象(仅包含消息) - * - * @param message 响应消息 - * @return Response 成功的响应对象,数据为null - */ - @JvmStatic - fun ok(message: String) = Response( - time = DateTime.now().format(), message = message, data = null, statusCode = 200 - ) + /** + * 创建一个成功的响应对象(仅包含消息) + * + * @param message 响应消息 + * @return Response 成功的响应对象,数据为null + */ + @JvmStatic + fun ok(message: String) = Response( + time = DateTime.now().format(), message = message, data = null, statusCode = 200 + ) - /** - * 创建一个错误的响应对象 - * - * @param message 错误消息,默认为"服务器错误" - * @param statusCode HTTP状态码,默认为500 - * @return Response 错误的响应对象 - */ - fun error(message: String = "服务器错误", statusCode: Int = 500) = ok(message).withStatusCode(statusCode) + /** + * 创建一个错误的响应对象 + * + * @param message 错误消息,默认为"服务器错误" + * @param statusCode HTTP状态码,默认为500 + * @return Response 错误的响应对象 + */ + fun error(message: String = "服务器错误", statusCode: Int = 500) = ok(message).withStatusCode(statusCode) - /** - * 创建一个成功的响应对象(仅包含数据) - * 使用默认消息"操作成功" - * - * @param T 响应数据的类型 - * @param data 响应数据 - * @return Response 成功的响应对象,包含数据 - */ - @JvmStatic - fun okData(data: T) = Response( - time = DateTime.now().format(), message = "操作成功", data = data, statusCode = 200 - ) + /** + * 创建一个成功的响应对象(仅包含数据) + * 使用默认消息"操作成功" + * + * @param T 响应数据的类型 + * @param data 响应数据 + * @return Response 成功的响应对象,包含数据 + */ + @JvmStatic + fun okData(data: T) = Response( + time = DateTime.now().format(), message = "操作成功", data = data, statusCode = 200 + ) - /** - * 创建一个成功的响应对象(包含数据和消息) - * - * @param T 响应数据的类型 - * @param data 响应数据 - * @param message 响应消息 - * @return Response 成功的响应对象,包含数据和消息 - */ - @JvmStatic - fun okData(data: T, message: String) = Response( - time = DateTime.now().format(), message = message, data = data, statusCode = 200 - ) + /** + * 创建一个成功的响应对象(包含数据和消息) + * + * @param T 响应数据的类型 + * @param data 响应数据 + * @param message 响应消息 + * @return Response 成功的响应对象,包含数据和消息 + */ + @JvmStatic + fun okData(data: T, message: String) = Response( + time = DateTime.now().format(), message = message, data = data, statusCode = 200 + ) - /** - * 创建一个指定状态码的响应对象(仅包含状态码) - * 使用默认消息"操作成功",无数据 - * - * @param statusCode HTTP状态码 - * @return Response 指定状态码的响应对象 - */ - @JvmStatic - fun code(statusCode: Int) = Response( - time = DateTime.now().format(), message = "操作成功", data = null, statusCode = statusCode - ) + /** + * 创建一个指定状态码的响应对象(仅包含状态码) + * 使用默认消息"操作成功",无数据 + * + * @param statusCode HTTP状态码 + * @return Response 指定状态码的响应对象 + */ + @JvmStatic + fun code(statusCode: Int) = Response( + time = DateTime.now().format(), message = "操作成功", data = null, statusCode = statusCode + ) - /** - * 创建一个指定状态码的响应对象(包含状态码和消息) - * 无数据 - * - * @param statusCode HTTP状态码 - * @param message 响应消息 - * @return Response 指定状态码和消息的响应对象 - */ - @JvmStatic - fun code(statusCode: Int, message: String) = Response( - time = DateTime.now().format(), message = message, data = null, statusCode = statusCode - ) - } + /** + * 创建一个指定状态码的响应对象(包含状态码和消息) + * 无数据 + * + * @param statusCode HTTP状态码 + * @param message 响应消息 + * @return Response 指定状态码和消息的响应对象 + */ + @JvmStatic + fun code(statusCode: Int, message: String) = Response( + time = DateTime.now().format(), message = message, data = null, statusCode = statusCode + ) + } - /** - * 默认构造函数,创建一个默认的成功响应对象 - * 使用当前时间、默认消息"操作成功"、状态码200、无数据 - */ - constructor() : this( - time = DateTime.now().format(), message = "操作成功", statusCode = 200, data = null - ) + /** + * 默认构造函数,创建一个默认的成功响应对象 + * 使用当前时间、默认消息"操作成功"、状态码200、无数据 + */ + constructor() : this( + time = DateTime.now().format(), message = "操作成功", statusCode = 200, data = null + ) - /** - * 创建一个新的Response对象,使用指定的时间 - * - * 该方法用于创建具有新时间的响应对象,遵循不可变对象的设计模式。 - * 如果时间相同,则返回原对象避免不必要的对象创建。 - * - * @param time 新的响应时间 - * @return Response 新的响应对象(如果时间相同则返回原对象) - */ - fun withTime(time: String): Response = if (this.time == time) this else Response(time, message, data, statusCode) + /** + * 创建一个新的Response对象,使用指定的时间 + * + * 该方法用于创建具有新时间的响应对象,遵循不可变对象的设计模式。 + * 如果时间相同,则返回原对象避免不必要的对象创建。 + * + * @param time 新的响应时间 + * @return Response 新的响应对象(如果时间相同则返回原对象) + */ + fun withTime(time: String): Response = if (this.time == time) this else Response(time, message, data, statusCode) - /** - * 创建一个新的Response对象,使用指定的数据 - * - * 该方法允许改变响应数据的类型,创建一个新的响应对象。 - * 适用于需要在保持其他字段不变的情况下更新数据类型的场景。 - * - * @param D 新的数据类型 - * @param data 新的响应数据 - * @return Response 新的响应对象,数据类型为D - */ - fun withData(data: D): Response = Response(this.time, this.message, data, this.statusCode) + /** + * 创建一个新的Response对象,使用指定的数据 + * + * 该方法允许改变响应数据的类型,创建一个新的响应对象。 + * 适用于需要在保持其他字段不变的情况下更新数据类型的场景。 + * + * @param D 新的数据类型 + * @param data 新的响应数据 + * @return Response 新的响应对象,数据类型为D + */ + fun withData(data: D): Response = Response(this.time, this.message, data, this.statusCode) - /** - * 创建一个新的Response对象,使用指定的消息 - * - * 该方法用于创建具有新消息的响应对象,遵循不可变对象的设计模式。 - * 如果消息相同,则返回原对象避免不必要的对象创建。 - * - * @param message 新的响应消息 - * @return Response 新的响应对象(如果消息相同则返回原对象) - */ - fun withMessage(message: String): Response = - if (this.message == message) this else Response(time, message, data, statusCode) + /** + * 创建一个新的Response对象,使用指定的消息 + * + * 该方法用于创建具有新消息的响应对象,遵循不可变对象的设计模式。 + * 如果消息相同,则返回原对象避免不必要的对象创建。 + * + * @param message 新的响应消息 + * @return Response 新的响应对象(如果消息相同则返回原对象) + */ + fun withMessage(message: String): Response = + if (this.message == message) this else Response(time, message, data, statusCode) - /** - * 创建一个新的Response对象,使用指定的状态码 - * - * 该方法用于创建具有新状态码的响应对象,遵循不可变对象的设计模式。 - * 如果状态码相同,则返回原对象避免不必要的对象创建。 - * - * @param statusCode 新的状态码 - * @return Response 新的响应对象(如果状态码相同则返回原对象) - */ - fun withStatusCode(statusCode: Int): Response = - if (this.statusCode == statusCode) this else Response(time, message, data, statusCode) + /** + * 创建一个新的Response对象,使用指定的状态码 + * + * 该方法用于创建具有新状态码的响应对象,遵循不可变对象的设计模式。 + * 如果状态码相同,则返回原对象避免不必要的对象创建。 + * + * @param statusCode 新的状态码 + * @return Response 新的响应对象(如果状态码相同则返回原对象) + */ + fun withStatusCode(statusCode: Int): Response = + if (this.statusCode == statusCode) this else Response(time, message, data, statusCode) - /** - * 返回响应对象的字符串表示 - * - * 重写toString方法以提供更有意义的对象表示,便于日志记录和调试。 - * 显示时间、消息、数据类型和值以及状态码。 - * - * @return 格式化的字符串表示 - */ - override fun toString(): String = - "Response<${data?.javaClass?.simpleName ?: "Nothing"}>(time=${time}, message=${message}, data=${data}, statusCode=${statusCode})" + /** + * 返回响应对象的字符串表示 + * + * 重写toString方法以提供更有意义的对象表示,便于日志记录和调试。 + * 显示时间、消息、数据类型和值以及状态码。 + * + * @return 格式化的字符串表示 + */ + override fun toString(): String = + "Response<${data?.javaClass?.simpleName ?: "Nothing"}>(time=${time}, message=${message}, data=${data}, statusCode=${statusCode})" } diff --git a/src/main/kotlin/com/mingliqiye/utils/http/okhttp/OkHttpUtils.kt b/src/main/kotlin/com/mingliqiye/utils/http/okhttp/OkHttpUtils.kt index c7a41d5..d03829d 100644 --- a/src/main/kotlin/com/mingliqiye/utils/http/okhttp/OkHttpUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/http/okhttp/OkHttpUtils.kt @@ -16,45 +16,285 @@ * ProjectName mingli-utils * ModuleName mingli-utils.main * CurrentFile OkHttpUtils.kt - * LastUpdate 2026-10-22 20:20:42 + * LastUpdate 2026-11-07 13:44:21 * UpdateUser MingLiPro */ @file:JvmName("OkHttpUtils") package com.mingliqiye.utils.http.okhttp +import com.mingliqiye.utils.http.MediaType +import com.mingliqiye.utils.http.okhttp import com.mingliqiye.utils.json.api.JSONA import com.mingliqiye.utils.json.api.base.JsonApi import com.mingliqiye.utils.json.api.base.JsonApi.Companion.parse -import okhttp3.Call -import okhttp3.OkHttpClient -import okhttp3.Request -import okhttp3.Response - +import okhttp3.* +import okhttp3.HttpUrl.Companion.toHttpUrl +import okhttp3.RequestBody.Companion.toRequestBody +/** + * 将 OkHttp 的 [Response] 响应体解析为指定泛型类型的对象。 + * + * 会读取并关闭响应体。未显式传入 [jsonApi] 时使用 [JSONA.jsonApi]。 + * + * @param T 目标对象类型,由调用方通过 reified 推断 + * @param jsonApi 可选的 [JsonApi] 实例;为 `null` 时使用 [JSONA.jsonApi] + * @return 解析后的对象实例 + * @throws NullPointerException 未传入 [jsonApi] 且 [JSONA] 尚未注入实例时抛出 + */ inline fun Response.json(jsonApi: JsonApi? = null): T = body.use { - if (jsonApi != null) { - return jsonApi.parse(it.bytes()) - } else { - JSONA.parse(it.bytes()) - } + (jsonApi ?: JSONA.jsonApi).parse(it.bytes()) } -fun Response.text() = body.use { - String(it.bytes()) -} +/** + * 读取 [Response] 响应体为字符串,并关闭响应体。 + * + * 按响应 `Content-Type` 的 `charset` 解码,缺省 UTF-8;读取后响应体被关闭。 + * + * @return 响应体内容字符串 + */ +fun Response.text() = this.body.string() +/** + * 创建一个 [Request],通过 [calld] 配置 [Request.Builder]。 + * + * @param calld 在 [Request.Builder] 上执行的配置块 + * @return 构建完成的 [Request] + */ +fun newRequest(calld: Request.Builder.() -> Unit): Request = + Request.Builder().apply(calld).build() -fun newRequest(calld: Request.Builder.() -> Unit): Request { - val request = Request.Builder() - calld(request) - return request.build() -} - +/** + * 使用当前 [OkHttpClient] 创建一个 [Call],请求通过 [calld] 配置。 + * + * 调用返回的 [Call] 的 `execute()` 或 `enqueue()` 才会真正发起请求。 + * + * @param calld 在 [Request.Builder] 上执行的配置块 + * @return 未执行的 [Call] + */ fun OkHttpClient.newCall(calld: Request.Builder.() -> Unit): Call { - return this.newCall(newRequest(calld)) + return this.newCall(newRequest(calld)) } +/** + * 使用当前 [OkHttpClient] 同步执行一次请求,请求通过 [calld] 配置。 + * + * 注意:在 Android 主线程调用会抛出 `NetworkOnMainThreadException`。 + * + * @param calld 在 [Request.Builder] 上执行的配置块 + * @return 同步执行得到的 [Response] + * @throws java.io.IOException 网络或 I/O 失败时抛出 + */ fun OkHttpClient.newExecute(calld: Request.Builder.() -> Unit): Response { - return this.newCall(newRequest(calld)).execute() + return this.newCall(newRequest(calld)).execute() +} + +/** + * 在 [Request.Builder] 上设置 URL,并通过 [calld] 配置查询参数。 + * + * 示例: + * ``` + * Request.Builder().url("https://example.com/api") { + * addQueryParameter("page", "1") + * } + * ``` + * + * @param url 基础 URL 字符串 + * @param calld 可选的 [HttpUrl.Builder] 配置块(如添加查询参数);为 `null` 时直接使用 [url] + * @return 当前 [Request.Builder],便于链式调用 + */ +fun Request.Builder.url( + url: String, + calld: (HttpUrl.Builder.() -> Unit)? = null, +): Request.Builder { + return if (calld != null) { + this.url(url.toHttpUrl().newBuilder().apply { calld() }.build()) + } else { + this.url(url.toHttpUrl()) + } +} + +/** + * 在 [Request.Builder] 上设置请求方法和字节数组请求体。 + * + * @param method 请求方法 + * @param body 请求体字节数组 + * @param mediaType 可选的媒体类型;为 `null` 时不设置 Content-Type + * @param offset 起始偏移量,默认 0 + * @param length 读取长度,默认从 [offset] 到 [body] 末尾 + * @return 当前 [Request.Builder],便于链式调用 + */ +fun Request.Builder.methodBody( + method: Method, + body: ByteArray, + mediaType: MediaType? = null, + offset: Int = 0, + length: Int = body.size - offset, +): Request.Builder { + require(offset >= 0 && length >= 0 && offset + length <= body.size) { + "offset/length 越界: offset=$offset, length=$length, size=${body.size}" + } + return method(method.name, body.toRequestBody(mediaType?.okhttp(), offset, length)) +} + +/** + * 在 [Request.Builder] 上设置请求方法,并将对象序列化为 JSON 作为请求体。 + * + * @param method 请求方法 + * @param body 待序列化的对象 + * @param jsonApi 可选的 [JsonApi] 实例;为 `null` 时使用 [JSONA.jsonApi] + * @return 当前 [Request.Builder],便于链式调用 + */ +fun Request.Builder.methodJsonBody( + method: Method, + body: Any, + jsonApi: JsonApi? = null, +): Request.Builder = methodBody( + method, + (jsonApi ?: JSONA.jsonApi).formatBytes(body), + MediaType.APPLICATION_JSON, +) + +/** + * 在 [Request.Builder] 上设置 GET 方法,并将对象序列化为 JSON 作为请求体。 + * + * 注意:GET 请求携带请求体在 HTTP 语义中不常见,部分服务端可能忽略或拒绝。 + * + * @param body 待序列化的对象 + * @param jsonApi 可选的 [JsonApi] 实例;为 `null` 时使用 [JSONA.jsonApi] + * @return 当前 [Request.Builder],便于链式调用 + */ +fun Request.Builder.getJsonBody( + body: Any, + jsonApi: JsonApi? = null, +) = methodBody( + Method.GET, + (jsonApi ?: JSONA.jsonApi).formatBytes(body), + MediaType.APPLICATION_JSON, +) + +/** + * 在 [Request.Builder] 上设置 POST 方法,并将对象序列化为 JSON 作为请求体。 + * + * @param body 待序列化的对象 + * @param jsonApi 可选的 [JsonApi] 实例;为 `null` 时使用 [JSONA.jsonApi] + * @return 当前 [Request.Builder],便于链式调用 + */ +fun Request.Builder.postJsonBody( + body: Any, + jsonApi: JsonApi? = null, +) = methodBody( + Method.POST, + (jsonApi ?: JSONA.jsonApi).formatBytes(body), + MediaType.APPLICATION_JSON, +) + +/** + * 在 [Request.Builder] 上设置 PUT 方法,并将对象序列化为 JSON 作为请求体。 + * + * @param body 待序列化的对象 + * @param jsonApi 可选的 [JsonApi] 实例;为 `null` 时使用 [JSONA.jsonApi] + * @return 当前 [Request.Builder],便于链式调用 + */ +fun Request.Builder.putJsonBody( + body: Any, + jsonApi: JsonApi? = null, +) = methodBody( + Method.PUT, + (jsonApi ?: JSONA.jsonApi).formatBytes(body), + MediaType.APPLICATION_JSON, +) + +/** + * 在 [Request.Builder] 上设置 DELETE 方法,并将对象序列化为 JSON 作为请求体。 + * + * @param body 待序列化的对象 + * @param jsonApi 可选的 [JsonApi] 实例;为 `null` 时使用 [JSONA.jsonApi] + * @return 当前 [Request.Builder],便于链式调用 + */ +fun Request.Builder.deleteJsonBody( + body: Any, + jsonApi: JsonApi? = null, +) = methodBody( + Method.DELETE, + (jsonApi ?: JSONA.jsonApi).formatBytes(body), + MediaType.APPLICATION_JSON, +) + +/** + * 在 [Request.Builder] 上设置 HEAD 方法,并将对象序列化为 JSON 作为请求体。 + * + * 注意:HEAD 请求通常不应携带请求体,部分服务端可能忽略或拒绝。 + * + * @param body 待序列化的对象 + * @param jsonApi 可选的 [JsonApi] 实例;为 `null` 时使用 [JSONA.jsonApi] + * @return 当前 [Request.Builder],便于链式调用 + */ +fun Request.Builder.headJsonBody( + body: Any, + jsonApi: JsonApi? = null, +) = methodBody( + Method.HEAD, + (jsonApi ?: JSONA.jsonApi).formatBytes(body), + MediaType.APPLICATION_JSON, +) + +/** + * 在 [Request.Builder] 上设置 OPTIONS 方法,并将对象序列化为 JSON 作为请求体。 + * + * @param body 待序列化的对象 + * @param jsonApi 可选的 [JsonApi] 实例;为 `null` 时使用 [JSONA.jsonApi] + * @return 当前 [Request.Builder],便于链式调用 + */ +fun Request.Builder.optionsJsonBody( + body: Any, + jsonApi: JsonApi? = null, +) = methodBody( + Method.OPTIONS, + (jsonApi ?: JSONA.jsonApi).formatBytes(body), + MediaType.APPLICATION_JSON, +) + +/** + * 在 [Request.Builder] 上设置 QUERY 方法,并将对象序列化为 JSON 作为请求体。 + * + * QUERY 是 HTTP 扩展方法,需服务端支持。 + * + * @param body 待序列化的对象 + * @param jsonApi 可选的 [JsonApi] 实例;为 `null` 时使用 [JSONA.jsonApi] + * @return 当前 [Request.Builder],便于链式调用 + */ +fun Request.Builder.queryJsonBody( + body: Any, + jsonApi: JsonApi? = null, +) = methodBody( + Method.QUERY, + (jsonApi ?: JSONA.jsonApi).formatBytes(body), + MediaType.APPLICATION_JSON, +) + +/** + * HTTP 请求方法枚举,供 [Request.Builder.methodBody] 等扩展使用。 + */ +enum class Method { + /** GET 方法。 */ + GET, + + /** POST 方法。 */ + POST, + + /** PUT 方法。 */ + PUT, + + /** DELETE 方法。 */ + DELETE, + + /** HEAD 方法。 */ + HEAD, + + /** OPTIONS 方法。 */ + OPTIONS, + + /** QUERY 方法(HTTP 扩展方法,需服务端支持)。 */ + QUERY, } diff --git a/src/main/kotlin/com/mingliqiye/utils/io/InputStreamUtils.kt b/src/main/kotlin/com/mingliqiye/utils/io/InputStreamUtils.kt index 424b876..f390831 100644 --- a/src/main/kotlin/com/mingliqiye/utils/io/InputStreamUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/io/InputStreamUtils.kt @@ -31,8 +31,8 @@ import java.nio.charset.Charset fun InputStream.readAllText(charset: Charset = Charsets.UTF_8) = this.readAllBytes().toString(charset) fun InputStream.exportBytes(out: OutputStream) { - out.write(this.readAllBytes()) - out.flush() + out.write(this.readAllBytes()) + out.flush() } fun InputStream.readToList(): List = this.readBytes().toList() diff --git a/src/main/kotlin/com/mingliqiye/utils/io/SIO.kt b/src/main/kotlin/com/mingliqiye/utils/io/SIO.kt index 864b154..69a4611 100644 --- a/src/main/kotlin/com/mingliqiye/utils/io/SIO.kt +++ b/src/main/kotlin/com/mingliqiye/utils/io/SIO.kt @@ -34,244 +34,244 @@ import java.io.PrintStream */ object SIO { - /** - * 扩展函数:将字节数组以十六进制格式打印,每两个字符用空格分隔 - * @return 原始字节数组 - */ - @JvmStatic - fun ByteArray.println(): ByteArray { - this.toHexString().chunked(2).println() - return this - } + /** + * 扩展函数:将字节数组以十六进制格式打印,每两个字符用空格分隔 + * @return 原始字节数组 + */ + @JvmStatic + fun ByteArray.println(): ByteArray { + this.toHexString().chunked(2).println() + return this + } - fun T.ifOr(boolean: Boolean, pd: T.() -> T): T = if (boolean) { - this - } else pd(this) + fun T.ifOr(boolean: Boolean, pd: T.() -> T): T = if (boolean) { + this + } else pd(this) - fun T.ifOrElse(boolean: Boolean, pd: T.() -> T): T = if (!boolean) { - this - } else pd(this) + fun T.ifOrElse(boolean: Boolean, pd: T.() -> T): T = if (!boolean) { + this + } else pd(this) - /** - * 扩展函数:将列表以花括号格式打印,元素间用逗号分隔 - * @return 原始列表 - */ - @JvmStatic - fun List.println(): List { - println("{" + ",".join(this) + "}") - return this - } + /** + * 扩展函数:将列表以花括号格式打印,元素间用逗号分隔 + * @return 原始列表 + */ + @JvmStatic + fun List.println(): List { + println("{" + ",".join(this) + "}") + return this + } - /** - * 扩展函数:将数组以花括号格式打印,元素间用逗号分隔 - * @return 原始数组 - */ - @JvmStatic - fun Array.println(): Array { - println("{" + ",".join(this) + "}") - return this - } + /** + * 扩展函数:将数组以花括号格式打印,元素间用逗号分隔 + * @return 原始数组 + */ + @JvmStatic + fun Array.println(): Array { + println("{" + ",".join(this) + "}") + return this + } - /** - * 扩展函数:打印任意对象并返回该对象 - * @return 原始对象 - */ - @JvmStatic - fun T.println(): T { - println(this) - return this - } + /** + * 扩展函数:打印任意对象并返回该对象 + * @return 原始对象 + */ + @JvmStatic + fun T.println(): T { + println(this) + return this + } - /** - * 原始标准输出流的备份 - */ - @JvmStatic - val originalOut: PrintStream = System.out + /** + * 原始标准输出流的备份 + */ + @JvmStatic + val originalOut: PrintStream = System.out - /** - * 原始错误输出流的备份 - */ - @JvmStatic - val originalErr: PrintStream = System.err + /** + * 原始错误输出流的备份 + */ + @JvmStatic + val originalErr: PrintStream = System.err - /** - * 用于记录标准输出的日志记录器 - */ - @JvmStatic - val outLog: Logger = MingLiLoggerFactory.getLogger("out") + /** + * 用于记录标准输出的日志记录器 + */ + @JvmStatic + val outLog: Logger = MingLiLoggerFactory.getLogger("out") - /** - * 用于记录错误输出的日志记录器 - */ - @JvmStatic - val errLog: Logger = MingLiLoggerFactory.getLogger("err") + /** + * 用于记录错误输出的日志记录器 + */ + @JvmStatic + val errLog: Logger = MingLiLoggerFactory.getLogger("err") - /** - * 打印多个参数,使用空格分隔 - * @param args 要打印的参数数组 - */ - @JvmStatic - fun print(vararg args: Any?) { - printA(" ", *args) - } + /** + * 打印多个参数,使用空格分隔 + * @param args 要打印的参数数组 + */ + @JvmStatic + fun print(vararg args: Any?) { + printA(" ", *args) + } - /** - * 打印多个参数并换行,使用空格分隔 - * @param args 要打印的参数数组 - */ - @JvmStatic - fun println(vararg args: Any?) { - printlnA(" ", *args) - } + /** + * 打印多个参数并换行,使用空格分隔 + * @param args 要打印的参数数组 + */ + @JvmStatic + fun println(vararg args: Any?) { + printlnA(" ", *args) + } - /** - * 打印多个参数并换行,指定分隔符 - * @param sp 分隔符 - * @param args 要打印的参数数组 - */ - @JvmStatic - fun printlnA(sp: String, vararg args: Any?) { - printA(" ", *args) - kotlin.io.println() - } + /** + * 打印多个参数并换行,指定分隔符 + * @param sp 分隔符 + * @param args 要打印的参数数组 + */ + @JvmStatic + fun printlnA(sp: String, vararg args: Any?) { + printA(" ", *args) + kotlin.io.println() + } - /** - * 打印多个参数,指定分隔符 - * @param sp 分隔符,默认为空字符串 - * @param args 要打印的参数数组 - */ - @JvmStatic - fun printA(sp: String = "", vararg args: Any?) { - if (args.isEmpty()) { - kotlin.io.println() - } - val sb = StringBuilder() - for (i in args.indices) { - sb.append(args[i]) - if (i < args.size - 1) sb.append(sp) - } - kotlin.io.print(sb) - } + /** + * 打印多个参数,指定分隔符 + * @param sp 分隔符,默认为空字符串 + * @param args 要打印的参数数组 + */ + @JvmStatic + fun printA(sp: String = "", vararg args: Any?) { + if (args.isEmpty()) { + kotlin.io.println() + } + val sb = StringBuilder() + for (i in args.indices) { + sb.append(args[i]) + if (i < args.size - 1) sb.append(sp) + } + kotlin.io.print(sb) + } - /** - * 重定向 System.out 到 INFO 级别日志 - * 创建自定义PrintStream,将输出内容缓冲并记录到INFO级别日志中 - */ - @JvmStatic - fun redirectOutToInfo() { - val outLogger = PrintStream(object : OutputStream() { - private val buffer = StringBuilder() + /** + * 重定向 System.out 到 INFO 级别日志 + * 创建自定义PrintStream,将输出内容缓冲并记录到INFO级别日志中 + */ + @JvmStatic + fun redirectOutToInfo() { + val outLogger = PrintStream(object : OutputStream() { + private val buffer = StringBuilder() - override fun write(b: Int) { - if (b == '\n'.code) { - flushBuffer() - } else { - buffer.append(b.toChar()) - } - } + override fun write(b: Int) { + if (b == '\n'.code) { + flushBuffer() + } else { + buffer.append(b.toChar()) + } + } - override fun write(b: ByteArray, off: Int, len: Int) { - val str = String(b, off, len) - if (str.contains("\n")) { - val lines = str.split("\n") - lines.forEachIndexed { index, line -> - if (index == lines.size - 1 && !str.endsWith("\n")) { - buffer.append(line) - } else { - buffer.append(line) - flushBuffer() - } - } - } else { - buffer.append(str) - } - } + override fun write(b: ByteArray, off: Int, len: Int) { + val str = String(b, off, len) + if (str.contains("\n")) { + val lines = str.split("\n") + lines.forEachIndexed { index, line -> + if (index == lines.size - 1 && !str.endsWith("\n")) { + buffer.append(line) + } else { + buffer.append(line) + flushBuffer() + } + } + } else { + buffer.append(str) + } + } - private fun flushBuffer() { - val message = buffer.toString().trim() - if (message.isNotBlank()) { - outLog.info(message) - } - buffer.clear() - } + private fun flushBuffer() { + val message = buffer.toString().trim() + if (message.isNotBlank()) { + outLog.info(message) + } + buffer.clear() + } - override fun flush() { - flushBuffer() - super.flush() - } - }, true) + override fun flush() { + flushBuffer() + super.flush() + } + }, true) - System.setOut(outLogger) - } + System.setOut(outLogger) + } - /** - * 重定向 System.err 到 ERROR 级别 - * 创建自定义PrintStream,将错误输出内容缓冲并记录到ERROR级别日志中 - */ - @JvmStatic - fun redirectErrToError() { - val errLogger = PrintStream(object : OutputStream() { - private val buffer = StringBuilder() + /** + * 重定向 System.err 到 ERROR 级别 + * 创建自定义PrintStream,将错误输出内容缓冲并记录到ERROR级别日志中 + */ + @JvmStatic + fun redirectErrToError() { + val errLogger = PrintStream(object : OutputStream() { + private val buffer = StringBuilder() - override fun write(b: Int) { - if (b == '\n'.code) { - flushBuffer() - } else { - buffer.append(b.toChar()) - } - } + override fun write(b: Int) { + if (b == '\n'.code) { + flushBuffer() + } else { + buffer.append(b.toChar()) + } + } - override fun write(b: ByteArray, off: Int, len: Int) { - val str = String(b, off, len) - if (str.contains("\n")) { - val lines = str.split("\n") - lines.forEachIndexed { index, line -> - if (index == lines.size - 1 && !str.endsWith("\n")) { - buffer.append(line) - } else { - buffer.append(line) - flushBuffer() - } - } - } else { - buffer.append(str) - } - } + override fun write(b: ByteArray, off: Int, len: Int) { + val str = String(b, off, len) + if (str.contains("\n")) { + val lines = str.split("\n") + lines.forEachIndexed { index, line -> + if (index == lines.size - 1 && !str.endsWith("\n")) { + buffer.append(line) + } else { + buffer.append(line) + flushBuffer() + } + } + } else { + buffer.append(str) + } + } - private fun flushBuffer() { - val message = buffer.toString().trim() - if (message.isNotBlank()) { - errLog.error(message) - } - buffer.clear() - } + private fun flushBuffer() { + val message = buffer.toString().trim() + if (message.isNotBlank()) { + errLog.error(message) + } + buffer.clear() + } - override fun flush() { - flushBuffer() - super.flush() - } - }, true) + override fun flush() { + flushBuffer() + super.flush() + } + }, true) - System.setErr(errLogger) - } + System.setErr(errLogger) + } - /** - * 完全重定向(包括第三方库的输出) - * 同时重定向标准输出和错误输出到对应的日志级别 - */ - @JvmStatic - fun redirectAll() { - redirectOutToInfo() - redirectErrToError() - } + /** + * 完全重定向(包括第三方库的输出) + * 同时重定向标准输出和错误输出到对应的日志级别 + */ + @JvmStatic + fun redirectAll() { + redirectOutToInfo() + redirectErrToError() + } - /** - * 恢复原始输出流 - * 将System.out和System.err恢复到原始状态 - */ - @JvmStatic - fun restore() { - System.setOut(originalOut) - System.setErr(originalErr) - } + /** + * 恢复原始输出流 + * 将System.out和System.err恢复到原始状态 + */ + @JvmStatic + fun restore() { + System.setOut(originalOut) + System.setErr(originalErr) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/jna/FieldStructure.kt b/src/main/kotlin/com/mingliqiye/utils/jna/FieldStructure.kt index 7c565c7..3b1f92a 100644 --- a/src/main/kotlin/com/mingliqiye/utils/jna/FieldStructure.kt +++ b/src/main/kotlin/com/mingliqiye/utils/jna/FieldStructure.kt @@ -16,7 +16,7 @@ * ProjectName mingli-utils * ModuleName mingli-utils.main * CurrentFile FieldStructure.kt - * LastUpdate 2026-07-02 10:22:42 + * LastUpdate 2026-11-04 11:53:07 * UpdateUser MingLiPro */ @@ -30,31 +30,31 @@ import java.lang.reflect.Modifier * 该类继承自JNA的Structure类,通过反射自动获取子类的公共非静态字段, * 并按声明顺序返回字段名列表,用于JNA结构体的字段映射。 */ -open class FieldStructure : Structure() { - /** - * 获取结构体字段顺序列表 - * 通过反射遍历当前类及其父类的所有声明字段,过滤出公共非静态字段, - * 按照字段在类中声明的顺序返回字段名列表。 - * - * @return 包含字段名的列表,按声明顺序排列 - */ - override fun getFieldOrder(): MutableList { - val fieldOrderList: MutableList = ArrayList() - var cls: Class<*> = javaClass - while (cls != FieldStructure::class.java) { - val fields = cls.getDeclaredFields() - var modifiers: Int - for (field in fields) { - modifiers = field.modifiers - if (Modifier.isStatic(modifiers) || - !Modifier.isPublic(modifiers) - ) { - continue - } - fieldOrderList.add(field.name) - } - cls = cls.getSuperclass() - } - return fieldOrderList - } +abstract class FieldStructure : Structure() { + /** + * 获取结构体字段顺序列表 + * 通过反射遍历当前类及其父类的所有声明字段,过滤出公共非静态字段, + * 按照字段在类中声明的顺序返回字段名列表。 + * + * @return 包含字段名的列表,按声明顺序排列 + */ + override fun getFieldOrder(): MutableList { + val fieldOrderList: MutableList = ArrayList() + var cls: Class<*> = javaClass + while (cls != FieldStructure::class.java) { + val fields = cls.getDeclaredFields() + var modifiers: Int + for (field in fields) { + modifiers = field.modifiers + if (Modifier.isStatic(modifiers) || + !Modifier.isPublic(modifiers) + ) { + continue + } + fieldOrderList.add(field.name) + } + cls = cls.getSuperclass() + } + return fieldOrderList + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/api/JSONA.kt b/src/main/kotlin/com/mingliqiye/utils/json/api/JSONA.kt index 9bc4787..9aaef96 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/api/JSONA.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/api/JSONA.kt @@ -16,7 +16,7 @@ * ProjectName mingli-utils * ModuleName mingli-utils.main * CurrentFile JSONA.kt - * LastUpdate 2026-03-18 09:14:06 + * LastUpdate 2026-11-07 13:29:54 * UpdateUser MingLiPro */ @@ -24,6 +24,8 @@ package com.mingliqiye.utils.json.api import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.kotlin.kotlinModule +import com.mingliqiye.utils.json.api.JSONA.jsonApi +import com.mingliqiye.utils.json.api.JSONA.setJsonApi import com.mingliqiye.utils.json.api.base.JsonApi import com.mingliqiye.utils.json.api.type.JsonTypeReference import com.mingliqiye.utils.json.api.type.listType @@ -38,586 +40,644 @@ import java.nio.file.Path import kotlin.io.path.readBytes /** - * JSON工具类,提供静态方法访问JSON API功能 + * JSON 工具门面,提供静态方法访问 JSON API 功能。 + * + * [JSONA] 本身不实现 JSON 逻辑,而是持有一个可替换的 [JsonApi] 实例, + * 所有方法都转发到当前实例。使用前必须先通过 [setJsonApi] 注入实现, + * 未注入时访问 [jsonApi] 或调用任何转发方法都会抛出 [NullPointerException]。 + * + * @see JsonApi + * @see setJsonApi */ object JSONA { - @JvmStatic - private var jsonApi: JsonApi? = null - /** - * 获取JSON API实例 - * - * @return JSON API实例 - * @throws NullPointerException 当JSON API未初始化时抛出异常 - */ - @Throws(NullPointerException::class) - @JvmStatic - fun getJsonApi(): JsonApi { - if (jsonApi == null) { - throw NullPointerException("jsonApi is null plase setJsonApi first") - } - return jsonApi!! - } + /** + * 当前 JSON API 实例,未注入时为 `null`。 + * + * 使用 `@Volatile` 保证多线程下的可见性;仅在启动时注入一次的场景下无副作用。 + */ + @Volatile + @JvmStatic + private var privateJsonApi: JsonApi? = null - /** - * 设置JSON API实例 - * - * @param jsa JSON API实例 - */ - @JvmStatic - fun setJsonApi(jsa: JsonApi) { - jsonApi = jsa - } + /** + * 获取当前 JSON API 实例。 + * + * @return 已注入的 [JsonApi] 实例 + * @throws NullPointerException 尚未调用 [setJsonApi] 时抛出 + */ + @JvmStatic + val jsonApi: JsonApi + get() = privateJsonApi ?: throw NullPointerException("jsonApi is null plase setJsonApi first") - /** - * 使用反射创建并设置指定类型的JSON API实例 - * - * @param T 继承自JsonApi的具体实现类 - */ - inline fun setJsonApi() { - setJsonApi(T::class.java.getConstructor().newInstance() as JsonApi) - } + /** + * 设置或替换 JSON API 实例。 + * + * 设置后,[JSONA] 上所有转发方法立即使用新实例。 + * + * @param jsa JSON API 实例 + */ + @JvmStatic + fun setJsonApi(jsa: JsonApi) { + privateJsonApi = jsa + } - /** - * 将JSON字符串解析为指定类型的对象 - * - * @param json 待解析的JSON字符串 - * @param clazz 目标对象的Class类型 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - @JvmStatic - fun parse(json: String, clazz: Class): T = getJsonApi().parse(json, clazz) + /** + * 通过反射创建 [T] 的无参实例并设置为当前 JSON API。 + * + * @param T 继承自 [JsonApi] 的具体实现类,必须提供公开无参构造 + * @throws NoSuchMethodException 实现类没有无参构造时抛出 + * @throws ReflectiveOperationException 反射实例化失败时抛出 + */ + inline fun setJsonApi() { + setJsonApi(T::class.java.getConstructor().newInstance() as JsonApi) + } - /** - * 将JSON字符串解析为指定泛型类型对象 - * - * @param json 待解析的JSON字符串 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - @JvmStatic - inline fun parse(json: String): T { - return getJsonApi().parse(json, (object : JsonTypeReference() {})) - } + /** + * 将 JSON 字符串解析为指定类型的对象。 + * + * @param T 目标对象类型 + * @param json 待解析的 JSON 字符串 + * @param clazz 目标对象的 [Class] 类型 + * @return 解析后的对象实例 + */ + @JvmStatic + fun parse(json: String, clazz: Class): T = jsonApi.parse(json, clazz) - /** - * 将字节数组形式的JSON解析为指定泛型类型对象 - * - * @param json 待解析的JSON字节数组 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - @JvmStatic - inline fun parse(json: ByteArray): T = getJsonApi().parse(json, object : JsonTypeReference() {}) + /** + * 将 JSON 字符串解析为指定泛型类型的对象。 + * + * @param T 目标对象类型,由调用方通过 reified 推断 + * @param json 待解析的 JSON 字符串 + * @return 解析后的对象实例 + */ + @JvmStatic + inline fun parse(json: String): T { + return jsonApi.parse(json, (object : JsonTypeReference() {})) + } - /** - * 将JSON字符串解析为指定泛型类型对象 - * - * @param json 待解析的JSON字符串 - * @param type 目标对象的Type类型(支持泛型) - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - @JvmStatic - fun parse(json: String, type: JsonTypeReference): T = getJsonApi().parse(json, type) + /** + * 将字节数组形式的 JSON 解析为指定泛型类型的对象。 + * + * @param T 目标对象类型,由调用方通过 reified 推断 + * @param json 待解析的 JSON 字节数组 + * @return 解析后的对象实例 + */ + @JvmStatic + inline fun parse(json: ByteArray): T = jsonApi.parse(json, object : JsonTypeReference() {}) - /** - * 将对象格式化为JSON字符串 - * - * @param obj 待格式化的对象 - * @return 格式化后的JSON字符串 - */ - @JvmStatic - fun format(obj: Any): String = getJsonApi().format(obj) + /** + * 将 JSON 字符串解析为指定泛型类型的对象。 + * + * @param T 目标对象类型 + * @param json 待解析的 JSON 字符串 + * @param type 目标对象的 [JsonTypeReference] 类型引用(支持泛型) + * @return 解析后的对象实例 + */ + @JvmStatic + fun parse(json: String, type: JsonTypeReference): T = jsonApi.parse(json, type) + /** + * 将对象格式化为 JSON 字符串。 + * + * @param obj 待格式化的对象 + * @return 格式化后的 JSON 字符串 + */ + @JvmStatic + fun format(obj: Any): String = jsonApi.format(obj) - /** - * 从文件路径解析JSON为指定类型的对象 - * - * @param path 文件路径 - * @param clazz 目标对象的Class类型 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - @JvmStatic - fun parseFrom(path: String, clazz: Class): T = getJsonApi().parseFrom(path, clazz) + /** + * 从文件路径解析 JSON 为指定类型的对象。 + * + * @param T 目标对象类型 + * @param path 文件路径 + * @param clazz 目标对象的 [Class] 类型 + * @return 解析后的对象实例 + */ + @JvmStatic + fun parseFrom(path: String, clazz: Class): T = jsonApi.parseFrom(path, clazz) - /** - * 从Path对象解析JSON为指定类型的对象 - * - * @param path Path对象 - * @param clazz 目标对象的Class类型 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - @JvmStatic - fun parseFrom(path: Path, clazz: Class): T = getJsonApi().parseFrom(path, clazz) + /** + * 从 [Path] 对象解析 JSON 为指定类型的对象。 + * + * @param T 目标对象类型 + * @param path [Path] 对象 + * @param clazz 目标对象的 [Class] 类型 + * @return 解析后的对象实例 + */ + @JvmStatic + fun parseFrom(path: Path, clazz: Class): T = jsonApi.parseFrom(path, clazz) - /** - * 从File对象解析JSON为指定类型的对象 - * - * @param file File对象 - * @param clazz 目标对象的Class类型 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - @JvmStatic - fun parseFrom(file: File, clazz: Class): T = getJsonApi().parseFrom(file, clazz) + /** + * 从 [File] 对象解析 JSON 为指定类型的对象。 + * + * @param T 目标对象类型 + * @param file [File] 对象 + * @param clazz 目标对象的 [Class] 类型 + * @return 解析后的对象实例 + */ + @JvmStatic + fun parseFrom(file: File, clazz: Class): T = jsonApi.parseFrom(file, clazz) - /** - * 从InputStream解析JSON为指定类型的对象 - * - * @param inputStream InputStream对象 - * @param clazz 目标对象的Class类型 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - @JvmStatic - fun parseFrom(inputStream: InputStream, clazz: Class): T = getJsonApi().parseFrom(inputStream, clazz) + /** + * 从 [InputStream] 解析 JSON 为指定类型的对象。 + * + * @param T 目标对象类型 + * @param inputStream [InputStream] 对象 + * @param clazz 目标对象的 [Class] 类型 + * @return 解析后的对象实例 + */ + @JvmStatic + fun parseFrom(inputStream: InputStream, clazz: Class): T = jsonApi.parseFrom(inputStream, clazz) - /** - * 从文件路径解析JSON为指定泛型类型对象 - * - * @param path 文件路径 - * @param type 目标对象的Type类型(支持泛型) - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - @JvmStatic - fun parseFrom(path: String, type: JsonTypeReference): T = getJsonApi().parseFrom(path, type) + /** + * 从文件路径解析 JSON 为指定泛型类型的对象。 + * + * @param T 目标对象类型 + * @param path 文件路径 + * @param type 目标对象的 [JsonTypeReference] 类型引用(支持泛型) + * @return 解析后的对象实例 + */ + @JvmStatic + fun parseFrom(path: String, type: JsonTypeReference): T = jsonApi.parseFrom(path, type) - /** - * 从Path对象解析JSON为指定泛型类型对象 - * - * @param path Path对象 - * @param type 目标对象的Type类型(支持泛型) - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - @JvmStatic - fun parseFrom(path: Path, type: JsonTypeReference): T = getJsonApi().parseFrom(path, type) + /** + * 从 [Path] 对象解析 JSON 为指定泛型类型的对象。 + * + * @param T 目标对象类型 + * @param path [Path] 对象 + * @param type 目标对象的 [JsonTypeReference] 类型引用(支持泛型) + * @return 解析后的对象实例 + */ + @JvmStatic + fun parseFrom(path: Path, type: JsonTypeReference): T = jsonApi.parseFrom(path, type) - /** - * 从File对象解析JSON为指定泛型类型对象 - * - * @param file File对象 - * @param type 目标对象的Type类型(支持泛型) - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - @JvmStatic - fun parseFrom(file: File, type: JsonTypeReference): T = getJsonApi().parseFrom(file, type) + /** + * 从 [File] 对象解析 JSON 为指定泛型类型的对象。 + * + * @param T 目标对象类型 + * @param file [File] 对象 + * @param type 目标对象的 [JsonTypeReference] 类型引用(支持泛型) + * @return 解析后的对象实例 + */ + @JvmStatic + fun parseFrom(file: File, type: JsonTypeReference): T = jsonApi.parseFrom(file, type) - /** - * 从InputStream解析JSON为指定泛型类型对象 - * - * @param inputStream InputStream对象 - * @param type 目标对象的Type类型(支持泛型) - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - @JvmStatic - fun parseFrom(inputStream: InputStream, type: JsonTypeReference): T = - getJsonApi().parseFrom(inputStream, type) + /** + * 从 [InputStream] 解析 JSON 为指定泛型类型的对象。 + * + * @param T 目标对象类型 + * @param inputStream [InputStream] 对象 + * @param type 目标对象的 [JsonTypeReference] 类型引用(支持泛型) + * @return 解析后的对象实例 + */ + @JvmStatic + fun parseFrom(inputStream: InputStream, type: JsonTypeReference): T = + jsonApi.parseFrom(inputStream, type) - /** - * 将字节数组形式的JSON解析为指定类型的对象 - * - * @param json 待解析的JSON字节数组 - * @param clazz 目标对象的Class类型 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - @JvmStatic - fun parse(json: ByteArray, clazz: Class): T = getJsonApi().parse(json, clazz) + /** + * 将字节数组形式的 JSON 解析为指定类型的对象。 + * + * @param T 目标对象类型 + * @param json 待解析的 JSON 字节数组 + * @param clazz 目标对象的 [Class] 类型 + * @return 解析后的对象实例 + */ + @JvmStatic + fun parse(json: ByteArray, clazz: Class): T = jsonApi.parse(json, clazz) - /** - * 将字节数组形式的JSON解析为指定泛型类型对象 - * - * @param json 待解析的JSON字节数组 - * @param type 目标对象的Type类型(支持泛型) - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - @JvmStatic - fun parse(json: ByteArray, type: JsonTypeReference): T = getJsonApi().parse(json, type) + /** + * 将字节数组形式的 JSON 解析为指定泛型类型的对象。 + * + * @param T 目标对象类型 + * @param json 待解析的 JSON 字节数组 + * @param type 目标对象的 [JsonTypeReference] 类型引用(支持泛型) + * @return 解析后的对象实例 + */ + @JvmStatic + fun parse(json: ByteArray, type: JsonTypeReference): T = jsonApi.parse(json, type) - /** - * 将JSON字符串解析为指定类型的对象,解析失败时返回默认值 - * - * @param json 待解析的JSON字符串 - * @param clazz 目标对象的Class类型 - * @param defaultValue 解析失败时返回的默认值 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例或默认值 - */ - @JvmStatic - fun parse(json: String, clazz: Class, defaultValue: T): T = getJsonApi().parse(json, clazz, defaultValue) + /** + * 将 JSON 字符串解析为指定类型的对象,解析失败时返回默认值。 + * + * @param T 目标对象类型 + * @param json 待解析的 JSON 字符串 + * @param clazz 目标对象的 [Class] 类型 + * @param defaultValue 解析失败时返回的默认值 + * @return 解析后的对象实例或默认值 + */ + @JvmStatic + fun parse(json: String, clazz: Class, defaultValue: T): T = jsonApi.parse(json, clazz, defaultValue) - /** - * 将JSON字符串解析为指定泛型类型对象,解析失败时返回默认值 - * - * @param json 待解析的JSON字符串 - * @param type 目标对象的Type类型(支持泛型) - * @param defaultValue 解析失败时返回的默认值 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例或默认值 - */ - @JvmStatic - fun parse( - json: String, type: JsonTypeReference, defaultValue: T, - ): T = getJsonApi().parse(json, type, defaultValue) + /** + * 将 JSON 字符串解析为指定泛型类型的对象,解析失败时返回默认值。 + * + * @param T 目标对象类型 + * @param json 待解析的 JSON 字符串 + * @param type 目标对象的 [JsonTypeReference] 类型引用(支持泛型) + * @param defaultValue 解析失败时返回的默认值 + * @return 解析后的对象实例或默认值 + */ + @JvmStatic + fun parse( + json: String, type: JsonTypeReference, defaultValue: T, + ): T = jsonApi.parse(json, type, defaultValue) - /** - * 将对象格式化为美化格式的JSON字符串(带缩进和换行) - * - * @param obj 待格式化的对象 - * @return 格式化后的美化JSON字符串 - */ - @JvmStatic - fun formatPretty(obj: Any): String = getJsonApi().formatPretty(obj) + /** + * 将对象格式化为美化格式的 JSON 字符串(带缩进和换行)。 + * + * @param obj 待格式化的对象 + * @return 格式化后的美化 JSON 字符串 + */ + @JvmStatic + fun formatPretty(obj: Any): String = jsonApi.formatPretty(obj) - /** - * 将对象格式化为美化格式的JSON字节数组 - * - * @param obj 待格式化的对象 - * @return 格式化后的美化JSON字节数组 - */ - @JvmStatic - fun formatPrettyBytes(obj: Any): ByteArray = getJsonApi().formatPrettyBytes(obj) + /** + * 将对象格式化为美化格式的 JSON 字节数组。 + * + * @param obj 待格式化的对象 + * @return 格式化后的美化 JSON 字节数组 + */ + @JvmStatic + fun formatPrettyBytes(obj: Any): ByteArray = jsonApi.formatPrettyBytes(obj) - /** - * 将对象格式化为美化格式的JSON字符串并写入文件 - * - * @param obj 待格式化的对象 - * @param file 文件路径 - */ - @JvmStatic - fun formatPretty(obj: Any, file: String) = getJsonApi().formatPretty(obj, file) + /** + * 将对象格式化为美化格式的 JSON 字符串并写入文件。 + * + * @param obj 待格式化的对象 + * @param file 文件路径 + */ + @JvmStatic + fun formatPretty(obj: Any, file: String) = jsonApi.formatPretty(obj, file) - /** - * 将对象格式化为美化格式的JSON字符串并写入文件 - * - * @param obj 待格式化的对象 - * @param file Path对象 - */ - @JvmStatic - fun formatPretty(obj: Any, file: Path) = getJsonApi().formatPretty(obj, file) + /** + * 将对象格式化为美化格式的 JSON 字符串并写入文件。 + * + * @param obj 待格式化的对象 + * @param file [Path] 对象 + */ + @JvmStatic + fun formatPretty(obj: Any, file: Path) = jsonApi.formatPretty(obj, file) - /** - * 将对象格式化为美化格式的JSON字符串并写入文件 - * - * @param obj 待格式化的对象 - * @param file File对象 - */ - @JvmStatic - fun formatPretty(obj: Any, file: File) = getJsonApi().formatPretty(obj, file) + /** + * 将对象格式化为美化格式的 JSON 字符串并写入文件。 + * + * @param obj 待格式化的对象 + * @param file [File] 对象 + */ + @JvmStatic + fun formatPretty(obj: Any, file: File) = jsonApi.formatPretty(obj, file) - /** - * 将对象格式化为美化格式的JSON字符串并写入输出流 - * - * @param obj 待格式化的对象 - * @param stream OutputStream对象 - */ - @JvmStatic - fun formatPretty(obj: Any, stream: OutputStream) = getJsonApi().formatPretty(obj, stream) + /** + * 将对象格式化为美化格式的 JSON 字符串并写入输出流。 + * + * @param obj 待格式化的对象 + * @param stream [OutputStream] 对象 + */ + @JvmStatic + fun formatPretty(obj: Any, stream: OutputStream) = jsonApi.formatPretty(obj, stream) + /** + * 将对象格式化为 JSON 字节数组。 + * + * @param obj 待格式化的对象 + * @return 格式化后的 JSON 字节数组 + */ + @JvmStatic + fun formatBytes(obj: Any): ByteArray = jsonApi.formatBytes(obj) - /** - * 将对象格式化为JSON字节数组 - * - * @param obj 待格式化的对象 - * @return 格式化后的JSON字节数组 - */ - @JvmStatic - fun formatBytes(obj: Any): ByteArray = getJsonApi().formatBytes(obj) + /** + * 将对象格式化为 JSON 字符串并写入文件。 + * + * @param obj 待格式化的对象 + * @param file 文件路径 + */ + @JvmStatic + fun format(obj: Any, file: String) = jsonApi.format(obj, file) + /** + * 将对象格式化为 JSON 字符串并写入文件。 + * + * @param obj 待格式化的对象 + * @param file [Path] 对象 + */ + @JvmStatic + fun format(obj: Any, file: Path) = jsonApi.format(obj, file) - /** - * 将对象格式化为JSON字符串并写入文件 - * - * @param obj 待格式化的对象 - * @param file 文件路径 - */ - @JvmStatic - fun format(obj: Any, file: String) = getJsonApi().format(obj, file) + /** + * 将对象格式化为 JSON 字符串并写入文件。 + * + * @param obj 待格式化的对象 + * @param file [File] 对象 + */ + @JvmStatic + fun format(obj: Any, file: File) = jsonApi.format(obj, file) - /** - * 将对象格式化为JSON字符串并写入文件 - * - * @param obj 待格式化的对象 - * @param file Path对象 - */ - @JvmStatic - fun format(obj: Any, file: Path) = getJsonApi().format(obj, file) + /** + * 将对象格式化为 JSON 字符串并写入输出流。 + * + * @param obj 待格式化的对象 + * @param stream [OutputStream] 对象 + */ + @JvmStatic + fun format(obj: Any, stream: OutputStream) = jsonApi.format(obj, stream) - /** - * 将对象格式化为JSON字符串并写入文件 - * - * @param obj 待格式化的对象 - * @param file File对象 - */ - @JvmStatic - fun format(obj: Any, file: File) = getJsonApi().format(obj, file) + /** + * 将 JSON 字符串解析为指定元素类型的 [List] 集合。 + * + * @param T [List] 中元素的类型 + * @param json 待解析的 JSON 字符串 + * @param elementType [List] 中元素的 [Class] 类型 + * @return 解析后的 [List] 集合 + */ + @JvmStatic + fun parseList(json: String, elementType: Class): List = parse(json, listType(elementType)) - /** - * 将对象格式化为JSON字符串并写入输出流 - * - * @param obj 待格式化的对象 - * @param stream OutputStream对象 - */ - @JvmStatic - fun format(obj: Any, stream: OutputStream) = getJsonApi().format(obj, stream) + /** + * 将 JSON 字符串解析为指定元素类型的 [List] 集合。 + * + * @param T [List] 中元素的类型,由调用方通过 reified 推断 + * @param json 待解析的 JSON 字符串 + * @return 解析后的 [List] 集合 + */ + @JvmStatic + inline fun parseList(json: String): List = parse(json, listType(T::class.java)) + /** + * 将 JSON 字符串解析为指定键值类型的 [MutableMap] 集合。 + * + * @param K [Map] 中键的类型 + * @param V [Map] 中值的类型 + * @param json 待解析的 JSON 字符串 + * @param keyType [Map] 中键的 [Class] 类型 + * @param valueType [Map] 中值的 [Class] 类型 + * @return 解析后的 [MutableMap] 集合 + */ + @JvmStatic + fun parseMap( + json: String, keyType: Class, valueType: Class, + ): MutableMap = jsonApi.parseMap(json, keyType, valueType) - /** - * 将JSON字符串解析为指定元素类型的List集合 - * - * @param json 待解析的JSON字符串 - * @param elementType List中元素的类型 - * @param 泛型参数,表示List中元素的类型 - * @return 解析后的List集合 - */ - @JvmStatic - fun parseList(json: String, elementType: Class): List = parse(json, listType(elementType)) + /** + * 将 JSON 字符串解析为指定键值类型的 [MutableMap] 集合。 + * + * @param K [Map] 中键的类型,由调用方通过 reified 推断 + * @param V [Map] 中值的类型,由调用方通过 reified 推断 + * @param json 待解析的 JSON 字符串 + * @return 解析后的 [MutableMap] 集合 + */ + @JvmStatic + inline fun parseMap( + json: String, + ): MutableMap = jsonApi.parseMap(json, K::class.java, V::class.java) - /** - * 将JSON字符串解析为指定元素类型的List集合 - * - * @param json 待解析的JSON字符串 - * @param 泛型参数,表示List中元素的类型 - * @return 解析后的List集合 - */ - @JvmStatic - inline fun parseList(json: String): List = parse(json, listType(T::class.java)) + /** + * 验证字符串是否为有效的 JSON 格式。 + * + * @param json 待验证的字符串 + * @return 如果是有效的 JSON 格式返回 `true`,否则返回 `false` + */ + @JvmStatic + fun isValidJson(json: String): Boolean = jsonApi.isValidJson(json) - /** - * 将JSON字符串解析为指定键值类型的Map集合 - * - * @param json 待解析的JSON字符串 - * @param keyType Map中键的类型 - * @param valueType Map中值的类型 - * @param 泛型参数,表示Map中键的类型 - * @param 泛型参数,表示Map中值的类型 - * @return 解析后的Map集合 - */ - @JvmStatic - fun parseMap( - json: String, keyType: Class, valueType: Class, - ): MutableMap = getJsonApi().parseMap(json, keyType, valueType) + /** + * 将对象转换为 JSON 字节数组。 + * + * @param obj 待转换的对象 + * @return 转换后的 JSON 字节数组 + */ + @JvmStatic + fun toBytes(obj: Any): ByteArray = jsonApi.toBytes(obj) - /** - * 将JSON字符串解析为指定键值类型的Map集合 - * - * @param json 待解析的JSON字符串 - * @param 泛型参数,表示Map中键的类型 - * @param 泛型参数,表示Map中值的类型 - * @return 解析后的Map集合 - */ - @JvmStatic - inline fun parseMap( - json: String, - ): MutableMap = getJsonApi().parseMap(json, K::class.java, V::class.java) + /** + * 将对象转换为美化格式的 JSON 字节数组。 + * + * @param obj 待转换的对象 + * @return 转换后的美化格式 JSON 字节数组 + */ + @JvmStatic + fun toBytesPretty(obj: Any): ByteArray = jsonApi.toBytesPretty(obj) - /** - * 验证字符串是否为有效的JSON格式 - * - * @param json 待验证的字符串 - * @return 如果是有效的JSON格式返回true,否则返回false - */ - @JvmStatic - fun isValidJson(json: String): Boolean = getJsonApi().isValidJson(json) + /** + * 合并多个 JSON 字符串为一个 JSON 对象。 + * + * @param jsons 待合并的 JSON 字符串数组 + * @return 合并后的 JSON 字符串 + */ + @JvmStatic + fun merge(vararg jsons: String): String = jsonApi.merge(*jsons) - /** - * 将对象转换为JSON字节数组 - * - * @return 转换后的JSON字节数组 - */ - @JvmStatic - fun toBytes(obj: Any): ByteArray = getJsonApi().toBytes(obj) + /** + * 获取 JSON 字符串中指定路径节点的值。 + * + * @param json JSON 字符串 + * @param path 节点路径(如 `"user.name"`) + * @return 节点值的字符串表示;节点不存在时返回 `null` + */ + @JvmStatic + fun getNodeValue(json: String, path: String): String? = jsonApi.getNodeValue(json, path) - /** - * 将对象转换为美化格式的JSON字节数组 - * - * @return 转换后的美化格式JSON字节数组 - */ - @JvmStatic - fun toBytesPretty(obj: Any): ByteArray = getJsonApi().toBytesPretty(obj) + /** + * 更新 JSON 字符串中指定路径节点的值。 + * + * @param json 原始 JSON 字符串 + * @param path 节点路径(如 `"user.name"`) + * @param newValue 新的节点值 + * @return 更新后的 JSON 字符串 + */ + @JvmStatic + fun updateNodeValue(json: String, path: String, newValue: Any): String = + jsonApi.updateNodeValue(json, path, newValue) - /** - * 合并多个JSON字符串为一个JSON对象 - * - * @param jsons 待合并的JSON字符串数组 - * @return 合并后的JSON字符串 - */ - @JvmStatic - fun merge(vararg jsons: String): String = getJsonApi().merge(*jsons) + /** + * 将源对象转换为目标类型的对象。 + * + * @param D 目标对象类型 + * @param source 需要转换的源对象 + * @param destinationClass 目标对象的 [Class] 类型 + * @return 转换后的目标类型对象 + */ + @JvmStatic + fun convert(source: Any, destinationClass: Class): D = jsonApi.convert(source, destinationClass) - /** - * 获取JSON字符串中指定路径节点的值 - * - * @param json JSON字符串 - * @param path 节点路径(如:"user.name") - * @return 节点值的字符串表示 - */ - @JvmStatic - fun getNodeValue(json: String, path: String): String? = getJsonApi().getNodeValue(json, path) + /** + * 将源对象转换为目标类型的对象,目标类型通过 reified 推断。 + * + * @param D 目标对象类型,由调用方通过 reified 推断 + * @param source 需要转换的源对象 + * @return 转换后的目标类型对象 + */ + @JvmStatic + inline fun convert(source: Any): D = jsonApi.convert(source, object : JsonTypeReference() {}) - /** - * 更新JSON字符串中指定路径节点的值 - * - * @param json 原始JSON字符串 - * @param path 节点路径(如:"user.name") - * @param newValue 新的节点值 - * @return 更新后的JSON字符串 - */ - @JvmStatic - fun updateNodeValue(json: String, path: String, newValue: Any): String = - getJsonApi().updateNodeValue(json, path, newValue) + /** + * 将源对象转换为目标类型的对象,使用 [JsonTypeReference] 指定目标类型。 + * + * @param D 目标对象类型 + * @param source 需要转换的源对象 + * @param destinationType 目标对象的 [JsonTypeReference] 类型引用 + * @return 转换后的目标类型对象 + */ + @JvmStatic + fun convert(source: Any, destinationType: JsonTypeReference): D = + jsonApi.convert(source, destinationType) - /** - * 将源对象转换为目标类型的对象 - * - * @param D 目标对象的类型 - * @param source 需要转换的源对象 - * @param destinationClass 目标对象的Class类型 - * @return 转换后的目标类型对象 - */ - @JvmStatic - fun convert(source: Any, destinationClass: Class): D = getJsonApi().convert(source, destinationClass) + /** + * 添加 JSON 转换器到 API 中。 + * + * @param c 需要添加的 [BaseJsonConverter] 实例 + */ + @JvmStatic + fun addJsonConverter(c: BaseJsonConverter<*, *>) = jsonApi.addJsonConverter(c) - /** - * 使用内联函数和reified类型参数将源对象转换为目标类型的对象 - * - * @param D 目标对象的类型(通过reified类型参数推断) - * @param source 需要转换的源对象 - * @return 转换后的目标类型对象 - */ - @JvmStatic - inline fun convert(source: Any): D = getJsonApi().convert(source, object : JsonTypeReference() {}) + /** + * 使用反射创建并添加指定类型的 JSON 转换器到 API 中。 + * + * @param T 继承自 [BaseJsonConverter] 的具体实现类 + */ + inline fun > addJsonConverter() = addJsonConverter(getJsonConverter()) - /** - * 将源对象转换为目标类型的对象,使用JsonTypeReference指定目标类型 - * - * @param D 目标对象的类型 - * @param source 需要转换的源对象 - * @param destinationType 目标对象的JsonTypeReference类型引用 - * @return 转换后的目标类型对象 - */ - @JvmStatic - fun convert(source: Any, destinationType: JsonTypeReference): D = - getJsonApi().convert(source, destinationType) + /** + * 将当前字符串解析为指定泛型类型的对象。 + * + * @param T 目标对象类型,由调用方通过 reified 推断 + * @return 解析后的对象实例 + */ + inline fun String.parseJson() = parse(this) - /** - * 添加JSON转换器到API中 - * - * @param c 需要添加的JSON转换器实例 - */ - @JvmStatic - fun addJsonConverter(c: BaseJsonConverter<*, *>) = getJsonApi().addJsonConverter(c) + /** + * 将当前字节数组解析为指定泛型类型的对象。 + * + * @param T 目标对象类型,由调用方通过 reified 推断 + * @return 解析后的对象实例 + */ + inline fun ByteArray.parseJson() = parse(this) - /** - * 使用反射创建并添加指定类型的JSON转换器到API中 - * - * @param T 继承自BaseJsonConverter的具体实现类 - */ - inline fun > addJsonConverter() = addJsonConverter(getJsonConverter()) + /** + * 将当前 [InputStream] 的内容解析为指定泛型类型的对象,并自动关闭流。 + * + * @param T 目标对象类型,由调用方通过 reified 推断 + * @return 解析后的对象实例 + */ + inline fun InputStream.parseJson() = this.use { parse(readBytes()) } + /** + * 将当前 [File] 的内容解析为指定泛型类型的对象。 + * + * @param T 目标对象类型,由调用方通过 reified 推断 + * @return 解析后的对象实例 + */ + inline fun File.parseJson() = this.inputStream().parseJson() - inline fun String.parseJson() = parse(this) - inline fun ByteArray.parseJson() = parse(this) - inline fun InputStream.parseJson() = this.use { parse(readBytes()) } - inline fun File.parseJson() = this.inputStream().parseJson() - inline fun Path.parseJson() = this.toFile().inputStream().parseJson() + /** + * 将当前 [Path] 的内容解析为指定泛型类型的对象。 + * + * @param T 目标对象类型,由调用方通过 reified 推断 + * @return 解析后的对象实例 + */ + inline fun Path.parseJson() = this.toFile().inputStream().parseJson() - fun Any.toJson() = format(this) + /** + * 将当前对象格式化为 JSON 字符串。 + * + * @return 格式化后的 JSON 字符串 + */ + fun Any.toJson() = format(this) - @JvmStatic - fun jacksonKotlinObjectMapper(): ObjectMapper = ObjectMapper().jacksonKotlinObjectMapper() + /** + * 创建并返回一个注册了 Kotlin 模块的 Jackson [ObjectMapper]。 + * + * @return 注册了 Kotlin 模块的 [ObjectMapper] + */ + @JvmStatic + fun jacksonKotlinObjectMapper(): ObjectMapper = ObjectMapper().jacksonKotlinObjectMapper() - @JvmStatic - fun ObjectMapper.jacksonKotlinObjectMapper(): ObjectMapper = this.registerModule(kotlinModule()) + /** + * 为当前 [ObjectMapper] 注册 Kotlin 模块并返回自身。 + * + * @return 注册了 Kotlin 模块的 [ObjectMapper](即当前实例) + */ + @JvmStatic + fun ObjectMapper.jacksonKotlinObjectMapper(): ObjectMapper = this.registerModule(kotlinModule()) + /** + * 将 JSON 字符串解析为 [JsonItem] 对象。 + * + * @param json JSON 格式的字符串 + * @return 解析后的 [JsonItem] 对象,可能是 `JsonObject`、`JsonArray` 或 `JsonValue` + */ + @JvmStatic + fun parseJsonItem(json: String): JsonItem = jsonApi.parseJsonItem(json) - /** - * 将 JSON 字符串解析为 JsonItem 对象 - * - * @param json JSON 格式的字符串 - * @return 解析后的 JsonItem 对象,可以是 JsonObject、JsonArray 或 JsonValue - */ - @JvmStatic - fun parseJsonItem(json: String): JsonItem = getJsonApi().parseJsonItem(json) + /** + * 将字节数组解析为 [JsonItem] 对象。 + * + * 字节数组会被转换为字符串后再解析。 + * + * @param byte JSON 格式的字节数组(通常是 UTF-8 编码) + * @return 解析后的 [JsonItem] 对象 + */ + @JvmStatic + fun parseJsonItem(byte: ByteArray): JsonItem { + return parseJsonItem(String(byte)) + } - /** - * 将字节数组解析为 JsonItem 对象 - * 字节数组会被转换为字符串后再解析 - * - * @param byte JSON 格式的字节数组(通常是 UTF-8 编码) - * @return 解析后的 JsonItem 对象 - */ - @JvmStatic - fun parseJsonItem(byte: ByteArray): JsonItem { - return parseJsonItem(String(byte)) - } + /** + * 将输入流解析为 [JsonItem] 对象,并自动关闭输入流。 + * + * @param inputStream JSON 数据的输入流 + * @return 解析后的 [JsonItem] 对象 + * @throws IOException 当读取输入流失败时抛出 + * + * 使用示例: + * ``` + * val inputStream = FileInputStream("data.json") + * val jsonItem = JSONA.parseJsonItem(inputStream) + * ``` + */ + @JvmStatic + @Throws(IOException::class) + fun parseJsonItem(inputStream: InputStream): JsonItem { + inputStream.use { + return parseJsonItem(it.readAllBytes()) + } + } - /** - * 将输入流解析为 JsonItem 对象 - * 会自动关闭输入流 - * - * @param inputStream JSON 数据的输入流 - * @return 解析后的 JsonItem 对象 - * @throws IOException 当读取输入流失败时抛出 - * - * 使用示例: - * ``` - * val inputStream = FileInputStream("data.json") - * val jsonItem = converter.parseJsonItem(inputStream) - * ``` - */ - @JvmStatic - @Throws(IOException::class) - fun parseJsonItem(inputStream: InputStream): JsonItem { - inputStream.use { - return parseJsonItem(it.readAllBytes()) - } - } + /** + * 将文件解析为 [JsonItem] 对象。 + * + * @param file 包含 JSON 数据的文件 + * @return 解析后的 [JsonItem] 对象 + * @throws IOException 当读取文件失败时抛出 + * + * 使用示例: + * ``` + * val file = File("config.json") + * val jsonItem = JSONA.parseJsonItem(file) + * ``` + */ + @JvmStatic + @Throws(IOException::class) + fun parseJsonItem(file: File): JsonItem { + return parseJsonItem(file.readBytes()) + } - /** - * 将文件解析为 JsonItem 对象 - * - * @param file 包含 JSON 数据的文件 - * @return 解析后的 JsonItem 对象 - * @throws IOException 当读取文件失败时抛出 - * - * 使用示例: - * ``` - * val file = File("config.json") - * val jsonItem = converter.parseJsonItem(file) - * ``` - */ - @JvmStatic - @Throws(IOException::class) - fun parseJsonItem(file: File): JsonItem { - return parseJsonItem(file.readBytes()) - } - - /** - * 将文件路径解析为 JsonItem 对象 - * - * @param path 包含 JSON 数据的文件路径 - * @return 解析后的 JsonItem 对象 - * @throws IOException 当读取文件失败时抛出 - * - * 使用示例: - * ``` - * val path = Paths.get("data/user.json") - * val jsonItem = converter.parseJsonItem(path) - * ``` - */ - @JvmStatic - @Throws(IOException::class) - fun parseJsonItem(path: Path): JsonItem { - return parseJsonItem(path.readBytes()) - } + /** + * 将文件路径解析为 [JsonItem] 对象。 + * + * @param path 包含 JSON 数据的文件路径 + * @return 解析后的 [JsonItem] 对象 + * @throws IOException 当读取文件失败时抛出 + * + * 使用示例: + * ``` + * val path = Paths.get("data/user.json") + * val jsonItem = JSONA.parseJsonItem(path) + * ``` + */ + @JvmStatic + @Throws(IOException::class) + fun parseJsonItem(path: Path): JsonItem { + return parseJsonItem(path.readBytes()) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/api/Jackson3JsonApi.kt b/src/main/kotlin/com/mingliqiye/utils/json/api/Jackson3JsonApi.kt index 3982dc5..9c7ac9a 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/api/Jackson3JsonApi.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/api/Jackson3JsonApi.kt @@ -38,211 +38,211 @@ import java.lang.reflect.Type class Jackson3JsonApi : JsonApi { - var get: () -> ObjectMapper = { _prObjectMapper!! } - var set: (ObjectMapper) -> Unit = { _prObjectMapper = it } + var get: () -> ObjectMapper = { _prObjectMapper!! } + var set: (ObjectMapper) -> Unit = { _prObjectMapper = it } - private var _prObjectMapper: ObjectMapper? = null + private var _prObjectMapper: ObjectMapper? = null - var objectMapper: ObjectMapper - get() = get() - private set(value) = set(value) + var objectMapper: ObjectMapper + get() = get() + private set(value) = set(value) - constructor(objectMapper: ObjectMapper) { - _prObjectMapper = objectMapper - } + constructor(objectMapper: ObjectMapper) { + _prObjectMapper = objectMapper + } - constructor( - get: () -> ObjectMapper, - set: (ObjectMapper) -> Unit, - ) { - this.get = get - this.set = set - } + constructor( + get: () -> ObjectMapper, + set: (ObjectMapper) -> Unit, + ) { + this.get = get + this.set = set + } - constructor() { - _prObjectMapper = ObjectMapper() - } + constructor() { + _prObjectMapper = ObjectMapper() + } - override fun parse(json: String, clazz: Class): T { - try { - return objectMapper.readValue(json, clazz) - } catch (e: Exception) { - throw JsonException("Failed to parse JSON to ${clazz.simpleName}", e) - } - } + override fun parse(json: String, clazz: Class): T { + try { + return objectMapper.readValue(json, clazz) + } catch (e: Exception) { + throw JsonException("Failed to parse JSON to ${clazz.simpleName}", e) + } + } - override fun parse(json: String, type: JsonTypeReference): T { - try { - return objectMapper.readValue(json, object : TypeReference() { - override fun getType(): Type = type.type - }) - } catch (e: Exception) { - throw JsonException("Failed to parse JSON to type: $type", e) - } - } + override fun parse(json: String, type: JsonTypeReference): T { + try { + return objectMapper.readValue(json, object : TypeReference() { + override fun getType(): Type = type.type + }) + } catch (e: Exception) { + throw JsonException("Failed to parse JSON to type: $type", e) + } + } - override fun format(obj: Any): String { - try { - return objectMapper.writeValueAsString(obj) - } catch (e: Exception) { - throw JsonException("Failed to format object to JSON: ${obj.javaClass.simpleName}", e) - } - } + override fun format(obj: Any): String { + try { + return objectMapper.writeValueAsString(obj) + } catch (e: Exception) { + throw JsonException("Failed to format object to JSON: ${obj.javaClass.simpleName}", e) + } + } - override fun formatPretty(obj: Any): String { - try { - return objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(obj) - } catch (e: Exception) { - throw JsonException("Failed to format object to pretty JSON: ${obj.javaClass.simpleName}", e) - } - } + override fun formatPretty(obj: Any): String { + try { + return objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(obj) + } catch (e: Exception) { + throw JsonException("Failed to format object to pretty JSON: ${obj.javaClass.simpleName}", e) + } + } - override fun isValidJson(json: String): Boolean { - return try { - objectMapper.readTree(json) - true - } catch (_: Exception) { - false - } - } + override fun isValidJson(json: String): Boolean { + return try { + objectMapper.readTree(json) + true + } catch (_: Exception) { + false + } + } - override fun merge(vararg jsons: String): String { - try { - if (jsons.isEmpty()) return "{}" + override fun merge(vararg jsons: String): String { + try { + if (jsons.isEmpty()) return "{}" - val resultNode = objectMapper.createObjectNode() + val resultNode = objectMapper.createObjectNode() - for (json in jsons) { - val node = objectMapper.readTree(json) - if (node is ObjectNode) { - resultNode.setAll(node) - } else { - throw JsonException("Cannot merge non-object JSON: $json") - } - } + for (json in jsons) { + val node = objectMapper.readTree(json) + if (node is ObjectNode) { + resultNode.setAll(node) + } else { + throw JsonException("Cannot merge non-object JSON: $json") + } + } - return objectMapper.writeValueAsString(resultNode) - } catch (e: Exception) { - throw JsonException("Failed to merge JSON objects", e) - } - } + return objectMapper.writeValueAsString(resultNode) + } catch (e: Exception) { + throw JsonException("Failed to merge JSON objects", e) + } + } - override fun getNodeValue(json: String, path: String): String? { - try { - val rootNode = objectMapper.readTree(json) - val node = rootNode.at(path) + override fun getNodeValue(json: String, path: String): String? { + try { + val rootNode = objectMapper.readTree(json) + val node = rootNode.at(path) - return if (node.isMissingNode || node.isNull) { - null - } else { - node.asString() - } - } catch (e: Exception) { - throw JsonException("Failed to get node value at path: $path", e) - } - } + return if (node.isMissingNode || node.isNull) { + null + } else { + node.asString() + } + } catch (e: Exception) { + throw JsonException("Failed to get node value at path: $path", e) + } + } - override fun updateNodeValue(json: String, path: String, newValue: Any): String { - try { - val rootNode = objectMapper.readTree(json) + override fun updateNodeValue(json: String, path: String, newValue: Any): String { + try { + val rootNode = objectMapper.readTree(json) - // 处理 JSON Pointer 路径 - val pathParts = path.split("/").filter { it.isNotEmpty() } + // 处理 JSON Pointer 路径 + val pathParts = path.split("/").filter { it.isNotEmpty() } - if (pathParts.isEmpty()) { - // 替换整个根节点 - return objectMapper.writeValueAsString(newValue) - } + if (pathParts.isEmpty()) { + // 替换整个根节点 + return objectMapper.writeValueAsString(newValue) + } - when (val parentNode = findParentNode(rootNode, pathParts)) { - is ObjectNode -> { - val fieldName = pathParts.last() - val valueNode = objectMapper.valueToTree(newValue) - parentNode.replace(fieldName, valueNode) - } + when (val parentNode = findParentNode(rootNode, pathParts)) { + is ObjectNode -> { + val fieldName = pathParts.last() + val valueNode = objectMapper.valueToTree(newValue) + parentNode.replace(fieldName, valueNode) + } - else -> { - throw JsonException("Cannot update node: parent is not an object node at path: $path") - } - } + else -> { + throw JsonException("Cannot update node: parent is not an object node at path: $path") + } + } - return objectMapper.writeValueAsString(rootNode) - } catch (e: Exception) { - throw JsonException("Failed to update node value at path: $path", e) - } - } + return objectMapper.writeValueAsString(rootNode) + } catch (e: Exception) { + throw JsonException("Failed to update node value at path: $path", e) + } + } - override fun convert(source: Any, destinationClass: Class): D { - try { - return objectMapper.convertValue(source, destinationClass) - } catch (e: Exception) { - throw JsonException( - "Failed to convert from ${source.javaClass.simpleName} to ${destinationClass.simpleName}", e - ) - } - } + override fun convert(source: Any, destinationClass: Class): D { + try { + return objectMapper.convertValue(source, destinationClass) + } catch (e: Exception) { + throw JsonException( + "Failed to convert from ${source.javaClass.simpleName} to ${destinationClass.simpleName}", e + ) + } + } - override fun convert( - source: Any, - destinationType: JsonTypeReference, - ): D { - try { - return objectMapper.convertValue(source, object : TypeReference() { - override fun getType(): Type = destinationType.type - }) - } catch (e: Exception) { - throw JsonException("Failed to convert from ${source.javaClass.simpleName} to type: $destinationType", e) - } - } + override fun convert( + source: Any, + destinationType: JsonTypeReference, + ): D { + try { + return objectMapper.convertValue(source, object : TypeReference() { + override fun getType(): Type = destinationType.type + }) + } catch (e: Exception) { + throw JsonException("Failed to convert from ${source.javaClass.simpleName} to type: $destinationType", e) + } + } - // 辅助方法:查找父节点 - private fun findParentNode(root: JsonNode, pathParts: List): JsonNode { - var current: JsonNode = root + // 辅助方法:查找父节点 + private fun findParentNode(root: JsonNode, pathParts: List): JsonNode { + var current: JsonNode = root - // 遍历到最后一个元素之前(即找到父节点) - for (i in 0 until pathParts.size - 1) { - val part = pathParts[i] - current = when { - part.matches(Regex("\\d+")) -> current.get(part.toInt()) - else -> current.get(part) - } ?: throw JsonException("Path not found: ${pathParts.subList(0, i + 1).joinToString("/")}") - } + // 遍历到最后一个元素之前(即找到父节点) + for (i in 0 until pathParts.size - 1) { + val part = pathParts[i] + current = when { + part.matches(Regex("\\d+")) -> current.get(part.toInt()) + else -> current.get(part) + } ?: throw JsonException("Path not found: ${pathParts.subList(0, i + 1).joinToString("/")}") + } - return current - } + return current + } - override fun addJsonConverter(c: BaseJsonConverter<*, *>) { - val mapperBuilder = Jackson3ApiJavaHelper.rebuild(objectMapper) - mapperBuilder.addModule(c.getJackson3Module()) - this.objectMapper = mapperBuilder.build() - } + override fun addJsonConverter(c: BaseJsonConverter<*, *>) { + val mapperBuilder = Jackson3ApiJavaHelper.rebuild(objectMapper) + mapperBuilder.addModule(c.getJackson3Module()) + this.objectMapper = mapperBuilder.build() + } - override fun parseJsonItem(json: String): JsonItem { - try { - return getJsonItem(objectMapper.readTree(json)) - } catch (e: Exception) { - throw JsonException("Failed to parseJsonItem", e) - } - } + override fun parseJsonItem(json: String): JsonItem { + try { + return getJsonItem(objectMapper.readTree(json)) + } catch (e: Exception) { + throw JsonException("Failed to parseJsonItem", e) + } + } } class JackSon3JsonItem : JsonItem { - companion object { - fun getJsonItem(node: JsonNode): JsonItem { - return when (node.nodeType) { - JsonNodeType.OBJECT -> JackSon3JsonObject(node) - JsonNodeType.ARRAY -> JackSon3JsonArray(node) - JsonNodeType.BOOLEAN -> JackSon3JsonBoolean(node) - JsonNodeType.NULL -> JsonNull() - JsonNodeType.NUMBER -> JackSon3JsonNumber(node) - JsonNodeType.STRING -> JackSon3JsonString(node) - else -> throw IllegalStateException("unknown type ${node.nodeType}") - } - } - } + companion object { + fun getJsonItem(node: JsonNode): JsonItem { + return when (node.nodeType) { + JsonNodeType.OBJECT -> JackSon3JsonObject(node) + JsonNodeType.ARRAY -> JackSon3JsonArray(node) + JsonNodeType.BOOLEAN -> JackSon3JsonBoolean(node) + JsonNodeType.NULL -> JsonNull() + JsonNodeType.NUMBER -> JackSon3JsonNumber(node) + JsonNodeType.STRING -> JackSon3JsonString(node) + else -> throw IllegalStateException("unknown type ${node.nodeType}") + } + } + } } class JackSon3JsonNumber(node: JsonNode) : JsonNumber(node.asString()) @@ -251,47 +251,47 @@ class JackSon3JsonString(node: JsonNode) : JsonString(node.asString()) class JackSon3JsonArray(val node: JsonNode) : JsonArray() { - override fun getIndex(index: Int): JsonItem { - return JackSon3JsonItem.getJsonItem(node.get(index)) - } + override fun getIndex(index: Int): JsonItem { + return JackSon3JsonItem.getJsonItem(node.get(index)) + } - override fun iteratorArray(): Iterator> { - val iteet = node.iterator().withIndex() - return object : Iterator> { - override fun next(): IndexedValue { - val it = iteet.next() - return IndexedValue(it.index, JackSon3JsonItem.getJsonItem(it.value)) - } + override fun iteratorArray(): Iterator> { + val iteet = node.iterator().withIndex() + return object : Iterator> { + override fun next(): IndexedValue { + val it = iteet.next() + return IndexedValue(it.index, JackSon3JsonItem.getJsonItem(it.value)) + } - override fun hasNext(): Boolean { - return iteet.hasNext() - } + override fun hasNext(): Boolean { + return iteet.hasNext() + } - } - } + } + } } class JackSon3JsonObject(val node: JsonNode) : JsonObject() { - override fun getField(name: String): JsonItem { - return JackSon3JsonItem.getJsonItem(node.get(name)) - } + override fun getField(name: String): JsonItem { + return JackSon3JsonItem.getJsonItem(node.get(name)) + } - override fun iteratorObject(): Iterator> { - return object : Iterator> { - val it = node.properties().iterator() - override fun next(): Map.Entry { - val utem = it.next() - return object : Map.Entry { - override val key: String - get() = utem.key - override val value: JsonItem - get() = JackSon3JsonItem.getJsonItem(utem.value) - } - } + override fun iteratorObject(): Iterator> { + return object : Iterator> { + val it = node.properties().iterator() + override fun next(): Map.Entry { + val utem = it.next() + return object : Map.Entry { + override val key: String + get() = utem.key + override val value: JsonItem + get() = JackSon3JsonItem.getJsonItem(utem.value) + } + } - override fun hasNext(): Boolean { - return it.hasNext() - } - } - } + override fun hasNext(): Boolean { + return it.hasNext() + } + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/api/JacksonJsonApi.kt b/src/main/kotlin/com/mingliqiye/utils/json/api/JacksonJsonApi.kt index 34f64a2..29b1742 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/api/JacksonJsonApi.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/api/JacksonJsonApi.kt @@ -42,284 +42,284 @@ import com.mingliqiye.utils.json.objects.base.* */ class JacksonJsonApi : JsonApi { - private val objectMapper: ObjectMapper + private val objectMapper: ObjectMapper - /** - * 使用默认的ObjectMapper构造实例 - */ - constructor() { - this.objectMapper = ObjectMapper() - } + /** + * 使用默认的ObjectMapper构造实例 + */ + constructor() { + this.objectMapper = ObjectMapper() + } - fun getObjectMapper() = objectMapper + fun getObjectMapper() = objectMapper - /** - * 使用指定的ObjectMapper构造实例 - * - * @param objectMapper 自定义的ObjectMapper实例 - */ - constructor(objectMapper: ObjectMapper) { - this.objectMapper = objectMapper - } + /** + * 使用指定的ObjectMapper构造实例 + * + * @param objectMapper 自定义的ObjectMapper实例 + */ + constructor(objectMapper: ObjectMapper) { + this.objectMapper = objectMapper + } - /** - * 将JSON字符串解析为指定类型的对象 - * - * @param json 待解析的JSON字符串 - * @param clazz 目标对象类型 - * @param 泛型参数,表示目标对象类型 - * @return 解析后的对象 - * @throws JsonException 当解析失败时抛出异常 - */ - override fun parse(json: String, clazz: Class): T { - return try { - objectMapper.readValue(json, clazz) - } catch (e: Exception) { - throw JsonException("Failed to parse JSON string", e) - } - } + /** + * 将JSON字符串解析为指定类型的对象 + * + * @param json 待解析的JSON字符串 + * @param clazz 目标对象类型 + * @param 泛型参数,表示目标对象类型 + * @return 解析后的对象 + * @throws JsonException 当解析失败时抛出异常 + */ + override fun parse(json: String, clazz: Class): T { + return try { + objectMapper.readValue(json, clazz) + } catch (e: Exception) { + throw JsonException("Failed to parse JSON string", e) + } + } - /** - * 将JSON字符串解析为复杂泛型结构的对象(如List、Map等) - * - * @param json JSON字符串 - * @param type 泛型类型引用 - * @param 泛型参数,表示目标对象类型 - * @return 解析后的对象 - * @throws JsonException 当解析失败时抛出异常 - */ - override fun parse(json: String, type: JsonTypeReference): T { - return try { - val reader: ObjectReader = objectMapper.readerFor( - objectMapper.constructType(type.type) - ) - reader.readValue(json) - } catch (e: Exception) { - throw JsonException("Failed to parse JSON string", e) - } - } + /** + * 将JSON字符串解析为复杂泛型结构的对象(如List、Map等) + * + * @param json JSON字符串 + * @param type 泛型类型引用 + * @param 泛型参数,表示目标对象类型 + * @return 解析后的对象 + * @throws JsonException 当解析失败时抛出异常 + */ + override fun parse(json: String, type: JsonTypeReference): T { + return try { + val reader: ObjectReader = objectMapper.readerFor( + objectMapper.constructType(type.type) + ) + reader.readValue(json) + } catch (e: Exception) { + throw JsonException("Failed to parse JSON string", e) + } + } - /** - * 将对象格式化为JSON字符串 - * - * @return 格式化后的JSON字符串 - * @throws JsonException 当格式化失败时抛出异常 - */ - override fun format(obj: Any): String { - return try { - objectMapper.writeValueAsString(obj) - } catch (e: Exception) { - throw JsonException( - "Failed to format object to JSON string", e - ) - } - } + /** + * 将对象格式化为JSON字符串 + * + * @return 格式化后的JSON字符串 + * @throws JsonException 当格式化失败时抛出异常 + */ + override fun format(obj: Any): String { + return try { + objectMapper.writeValueAsString(obj) + } catch (e: Exception) { + throw JsonException( + "Failed to format object to JSON string", e + ) + } + } - fun formatUnicode(obj: Any): String { - return try { - objectMapper.writer().with(JsonGenerator.Feature.ESCAPE_NON_ASCII).writeValueAsString(obj) - } catch (e: Exception) { - throw JsonException(throwable = e) - } - } + fun formatUnicode(obj: Any): String { + return try { + objectMapper.writer().with(JsonGenerator.Feature.ESCAPE_NON_ASCII).writeValueAsString(obj) + } catch (e: Exception) { + throw JsonException(throwable = e) + } + } - /** - * 将对象格式化为美化(带缩进)的JSON字符串 - * - * @return 美化后的JSON字符串 - * @throws JsonException 当格式化失败时抛出异常 - */ - override fun formatPretty(obj: Any): String { - return try { - objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(obj) - } catch (e: Exception) { - throw JsonException( - "Failed to format object to pretty JSON string", e - ) - } - } + /** + * 将对象格式化为美化(带缩进)的JSON字符串 + * + * @return 美化后的JSON字符串 + * @throws JsonException 当格式化失败时抛出异常 + */ + override fun formatPretty(obj: Any): String { + return try { + objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(obj) + } catch (e: Exception) { + throw JsonException( + "Failed to format object to pretty JSON string", e + ) + } + } - fun formatPrettyUnicode(obj: Any): String { - return try { - objectMapper.writerWithDefaultPrettyPrinter().with(JsonGenerator.Feature.ESCAPE_NON_ASCII) - .writeValueAsString(obj) - } catch (e: Exception) { - throw JsonException( - "Failed to format object to pretty JSON string", e - ) - } - } + fun formatPrettyUnicode(obj: Any): String { + return try { + objectMapper.writerWithDefaultPrettyPrinter().with(JsonGenerator.Feature.ESCAPE_NON_ASCII) + .writeValueAsString(obj) + } catch (e: Exception) { + throw JsonException( + "Failed to format object to pretty JSON string", e + ) + } + } - /** - * 判断给定字符串是否是有效的JSON格式 - * - * @param json 待验证的字符串 - * @return 如果是有效JSON返回true,否则返回false - */ - override fun isValidJson(json: String): Boolean { - return try { - objectMapper.readTree(json) - true - } catch (_: Exception) { - false - } - } + /** + * 判断给定字符串是否是有效的JSON格式 + * + * @param json 待验证的字符串 + * @return 如果是有效JSON返回true,否则返回false + */ + override fun isValidJson(json: String): Boolean { + return try { + objectMapper.readTree(json) + true + } catch (_: Exception) { + false + } + } - /** - * 合并多个JSON字符串为一个JSON对象 - * - * @param jsons 多个JSON字符串 - * @return 合并后的JSON字符串 - * @throws JsonException 当合并失败时抛出异常 - */ - override fun merge(vararg jsons: String): String { - val result: ObjectNode = objectMapper.createObjectNode() - for (json in jsons) { - try { - val node: JsonNode = objectMapper.readTree(json) - if (node.isObject) { - result.setAll(node as ObjectNode) - } - } catch (_: Exception) { - } - } - return try { - objectMapper.writeValueAsString(result) - } catch (e: JsonProcessingException) { - throw JsonException("Failed to merge JSON strings", e) - } - } + /** + * 合并多个JSON字符串为一个JSON对象 + * + * @param jsons 多个JSON字符串 + * @return 合并后的JSON字符串 + * @throws JsonException 当合并失败时抛出异常 + */ + override fun merge(vararg jsons: String): String { + val result: ObjectNode = objectMapper.createObjectNode() + for (json in jsons) { + try { + val node: JsonNode = objectMapper.readTree(json) + if (node.isObject) { + result.setAll(node as ObjectNode) + } + } catch (_: Exception) { + } + } + return try { + objectMapper.writeValueAsString(result) + } catch (e: JsonProcessingException) { + throw JsonException("Failed to merge JSON strings", e) + } + } - /** - * 获取JSON字符串中指定路径的节点值 - * - * @param json JSON字符串 - * @param path 节点路径,使用"."分隔 - * @return 节点值的文本表示,如果路径不存在则返回null - * @throws JsonException 当获取节点值失败时抛出异常 - */ - override fun getNodeValue(json: String, path: String): String? { - return try { - var node: JsonNode = objectMapper.readTree(json) - val paths: Array = path.split("\\.".toRegex()).toTypedArray() - for (p in paths) { - node = node.get(p) - } - node.asText() - } catch (e: Exception) { - throw JsonException("Failed to get node value", e) - } - } + /** + * 获取JSON字符串中指定路径的节点值 + * + * @param json JSON字符串 + * @param path 节点路径,使用"."分隔 + * @return 节点值的文本表示,如果路径不存在则返回null + * @throws JsonException 当获取节点值失败时抛出异常 + */ + override fun getNodeValue(json: String, path: String): String? { + return try { + var node: JsonNode = objectMapper.readTree(json) + val paths: Array = path.split("\\.".toRegex()).toTypedArray() + for (p in paths) { + node = node.get(p) + } + node.asText() + } catch (e: Exception) { + throw JsonException("Failed to get node value", e) + } + } - /** - * 更新JSON字符串中指定路径的节点值 - * - * @param json JSON字符串 - * @param path 节点路径,使用"."分隔 - * @param newValue 新的节点值 - * @return 更新后的JSON字符串 - * @throws JsonException 当更新节点值失败时抛出异常 - */ - override fun updateNodeValue(json: String, path: String, newValue: Any): String { - return try { - val node: JsonNode = objectMapper.readTree(json) - if (node is ObjectNode) { - val objectNode: ObjectNode = node - val paths: Array = path.split("\\.".toRegex()).toTypedArray() - var current: JsonNode = objectNode + /** + * 更新JSON字符串中指定路径的节点值 + * + * @param json JSON字符串 + * @param path 节点路径,使用"."分隔 + * @param newValue 新的节点值 + * @return 更新后的JSON字符串 + * @throws JsonException 当更新节点值失败时抛出异常 + */ + override fun updateNodeValue(json: String, path: String, newValue: Any): String { + return try { + val node: JsonNode = objectMapper.readTree(json) + if (node is ObjectNode) { + val objectNode: ObjectNode = node + val paths: Array = path.split("\\.".toRegex()).toTypedArray() + var current: JsonNode = objectNode - // 导航到目标节点的父节点 - for (i in 0 until paths.size - 1) { - current = current.get(paths[i]) - if (current !is ObjectNode) { - return json // 路径不存在或无效 - } - } + // 导航到目标节点的父节点 + for (i in 0 until paths.size - 1) { + current = current.get(paths[i]) + if (current !is ObjectNode) { + return json // 路径不存在或无效 + } + } - // 更新值 - if (current is ObjectNode) { - val parent: ObjectNode = current - parent.set( - paths[paths.size - 1], objectMapper.valueToTree(newValue) - ) - } + // 更新值 + if (current is ObjectNode) { + val parent: ObjectNode = current + parent.set( + paths[paths.size - 1], objectMapper.valueToTree(newValue) + ) + } - objectMapper.writeValueAsString(objectNode) - } - json - } catch (e: Exception) { - throw JsonException("Failed to update node value", e) - } - } + objectMapper.writeValueAsString(objectNode) + } + json + } catch (e: Exception) { + throw JsonException("Failed to update node value", e) + } + } - /** - * 在不同对象类型之间进行转换 - * - * @param source 源对象 - * @param destinationClass 目标对象类型 - * @param 源对象类型 - * @param 目标对象类型 - * @return 转换后的对象 - */ - override fun convert(source: Any, destinationClass: Class): D { - try { - return objectMapper.convertValue(source, destinationClass) - } catch (e: Exception) { - throw JsonException("Failed to update node value", e) - } - } + /** + * 在不同对象类型之间进行转换 + * + * @param source 源对象 + * @param destinationClass 目标对象类型 + * @param 源对象类型 + * @param 目标对象类型 + * @return 转换后的对象 + */ + override fun convert(source: Any, destinationClass: Class): D { + try { + return objectMapper.convertValue(source, destinationClass) + } catch (e: Exception) { + throw JsonException("Failed to update node value", e) + } + } - /** - * 在不同泛型对象类型之间进行转换 - * - * @param source 源对象 - * @param destinationType 目标对象的泛型类型引用 - * @param 源对象类型 - * @param 目标对象类型 - * @return 转换后的对象 - */ - override fun convert(source: Any, destinationType: JsonTypeReference): D { - try { - return objectMapper.convertValue( - source, objectMapper.constructType(destinationType.type) - ) - } catch (e: Exception) { - throw JsonException("Failed to update node value", e) - } - } + /** + * 在不同泛型对象类型之间进行转换 + * + * @param source 源对象 + * @param destinationType 目标对象的泛型类型引用 + * @param 源对象类型 + * @param 目标对象类型 + * @return 转换后的对象 + */ + override fun convert(source: Any, destinationType: JsonTypeReference): D { + try { + return objectMapper.convertValue( + source, objectMapper.constructType(destinationType.type) + ) + } catch (e: Exception) { + throw JsonException("Failed to update node value", e) + } + } - override fun addJsonConverter(c: BaseJsonConverter<*, *>) { - try { - objectMapper.registerModule(c.getJacksonModule()) - } catch (e: Exception) { - throw JsonException("Failed to update node value", e) - } - } + override fun addJsonConverter(c: BaseJsonConverter<*, *>) { + try { + objectMapper.registerModule(c.getJacksonModule()) + } catch (e: Exception) { + throw JsonException("Failed to update node value", e) + } + } - override fun parseJsonItem(json: String): JsonItem { - try { - return getJsonItem(objectMapper.readTree(json)) - } catch (e: Exception) { - throw JsonException("Failed to parseJsonItem", e) - } - } + override fun parseJsonItem(json: String): JsonItem { + try { + return getJsonItem(objectMapper.readTree(json)) + } catch (e: Exception) { + throw JsonException("Failed to parseJsonItem", e) + } + } } class JackSonJsonItem : JsonItem { - companion object { - fun getJsonItem(node: JsonNode): JsonItem { - return when (node.nodeType) { - JsonNodeType.OBJECT -> JackSonJsonObject(node) - JsonNodeType.ARRAY -> JackSonJsonArray(node) - JsonNodeType.BOOLEAN -> JackSonJsonBoolean(node) - JsonNodeType.NULL -> JsonNull() - JsonNodeType.NUMBER -> JackSonJsonNumber(node) - JsonNodeType.STRING -> JackSonJsonString(node) - else -> throw IllegalStateException("unknown type ${node.nodeType}") - } - } - } + companion object { + fun getJsonItem(node: JsonNode): JsonItem { + return when (node.nodeType) { + JsonNodeType.OBJECT -> JackSonJsonObject(node) + JsonNodeType.ARRAY -> JackSonJsonArray(node) + JsonNodeType.BOOLEAN -> JackSonJsonBoolean(node) + JsonNodeType.NULL -> JsonNull() + JsonNodeType.NUMBER -> JackSonJsonNumber(node) + JsonNodeType.STRING -> JackSonJsonString(node) + else -> throw IllegalStateException("unknown type ${node.nodeType}") + } + } + } } class JackSonJsonNumber(node: JsonNode) : JsonNumber(node.asText()) @@ -328,47 +328,47 @@ class JackSonJsonString(node: JsonNode) : JsonString(node.asText()) class JackSonJsonArray(val node: JsonNode) : JsonArray() { - override fun getIndex(index: Int): JsonItem { - return getJsonItem(node.get(index)) - } + override fun getIndex(index: Int): JsonItem { + return getJsonItem(node.get(index)) + } - override fun iteratorArray(): Iterator> { - val iteet = node.iterator().withIndex() - return object : Iterator> { - override fun next(): IndexedValue { - val it = iteet.next() - return IndexedValue(it.index, getJsonItem(it.value)) - } + override fun iteratorArray(): Iterator> { + val iteet = node.iterator().withIndex() + return object : Iterator> { + override fun next(): IndexedValue { + val it = iteet.next() + return IndexedValue(it.index, getJsonItem(it.value)) + } - override fun hasNext(): Boolean { - return iteet.hasNext() - } + override fun hasNext(): Boolean { + return iteet.hasNext() + } - } - } + } + } } class JackSonJsonObject(val node: JsonNode) : JsonObject() { - override fun getField(name: String): JsonItem { - return getJsonItem(node.get(name)) - } + override fun getField(name: String): JsonItem { + return getJsonItem(node.get(name)) + } - override fun iteratorObject(): Iterator> { - return object : Iterator> { - val it = node.properties().iterator() - override fun next(): Map.Entry { - val utem = it.next() - return object : Map.Entry { - override val key: String - get() = utem.key - override val value: JsonItem - get() = getJsonItem(utem.value) - } - } + override fun iteratorObject(): Iterator> { + return object : Iterator> { + val it = node.properties().iterator() + override fun next(): Map.Entry { + val utem = it.next() + return object : Map.Entry { + override val key: String + get() = utem.key + override val value: JsonItem + get() = getJsonItem(utem.value) + } + } - override fun hasNext(): Boolean { - return it.hasNext() - } - } - } + override fun hasNext(): Boolean { + return it.hasNext() + } + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/api/base/JsonApi.kt b/src/main/kotlin/com/mingliqiye/utils/json/api/base/JsonApi.kt index b5dc86e..a80d3eb 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/api/base/JsonApi.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/api/base/JsonApi.kt @@ -40,567 +40,567 @@ import kotlin.io.path.readBytes */ interface JsonApi { - companion object { - /** - * 将JSON字符串解析为指定泛型类型对象 - * - * @param json 待解析的JSON字符串 - * @param T 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - inline fun JsonApi.parse(json: String): T = parse(json, object : JsonTypeReference() {}) + companion object { + /** + * 将JSON字符串解析为指定泛型类型对象 + * + * @param json 待解析的JSON字符串 + * @param T 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + inline fun JsonApi.parse(json: String): T = parse(json, object : JsonTypeReference() {}) - /** - * 将JSON字节数组解析为指定泛型类型对象 - * - * @param json 待解析的JSON字节数组 - * @param T 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - inline fun JsonApi.parse(json: ByteArray): T = parse(json, object : JsonTypeReference() {}) + /** + * 将JSON字节数组解析为指定泛型类型对象 + * + * @param json 待解析的JSON字节数组 + * @param T 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + inline fun JsonApi.parse(json: ByteArray): T = parse(json, object : JsonTypeReference() {}) - /** - * 将JSON字符串解析为指定泛型类型对象,解析失败时返回默认值 - * - * @param json 待解析的JSON字符串 - * @param defect 解析失败时返回的默认值 - * @param T 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例或默认值 - */ - inline fun JsonApi.parse(json: String, defect: T): T = - parse(json, object : JsonTypeReference() {}, defect) + /** + * 将JSON字符串解析为指定泛型类型对象,解析失败时返回默认值 + * + * @param json 待解析的JSON字符串 + * @param defect 解析失败时返回的默认值 + * @param T 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例或默认值 + */ + inline fun JsonApi.parse(json: String, defect: T): T = + parse(json, object : JsonTypeReference() {}, defect) - /** - * 从文件路径读取JSON并解析为指定泛型类型对象 - * - * @param path 文件路径 - * @param T 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - inline fun JsonApi.parseFrom(path: String): T = parseFrom(path, object : JsonTypeReference() {}) + /** + * 从文件路径读取JSON并解析为指定泛型类型对象 + * + * @param path 文件路径 + * @param T 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + inline fun JsonApi.parseFrom(path: String): T = parseFrom(path, object : JsonTypeReference() {}) - /** - * 从文件读取JSON并解析为指定泛型类型对象 - * - * @param path 文件对象 - * @param T 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - inline fun JsonApi.parseFrom(path: File): T = parseFrom(path, object : JsonTypeReference() {}) + /** + * 从文件读取JSON并解析为指定泛型类型对象 + * + * @param path 文件对象 + * @param T 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + inline fun JsonApi.parseFrom(path: File): T = parseFrom(path, object : JsonTypeReference() {}) - /** - * 从输入流读取JSON并解析为指定泛型类型对象 - * - * @param path 输入流 - * @param T 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - inline fun JsonApi.parseFrom(path: InputStream): T = - parseFrom(path, object : JsonTypeReference() {}) + /** + * 从输入流读取JSON并解析为指定泛型类型对象 + * + * @param path 输入流 + * @param T 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + inline fun JsonApi.parseFrom(path: InputStream): T = + parseFrom(path, object : JsonTypeReference() {}) - /** - * 从路径读取JSON并解析为指定泛型类型对象 - * - * @param path 路径对象 - * @param T 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - inline fun JsonApi.parseFrom(path: Path): T = parseFrom(path, object : JsonTypeReference() {}) + /** + * 从路径读取JSON并解析为指定泛型类型对象 + * + * @param path 路径对象 + * @param T 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + inline fun JsonApi.parseFrom(path: Path): T = parseFrom(path, object : JsonTypeReference() {}) - /** - * 将JSON字符串解析为指定键值类型的Map集合 - * - * @param json 待解析的JSON字符串 - * @param K 泛型参数,表示Map中键的类型 - * @param V 泛型参数,表示Map中值的类型 - * @return 解析后的Map集合 - */ - inline fun JsonApi.parseMap( - json: String, - ): MutableMap = parseMap(json, K::class.java, V::class.java) + /** + * 将JSON字符串解析为指定键值类型的Map集合 + * + * @param json 待解析的JSON字符串 + * @param K 泛型参数,表示Map中键的类型 + * @param V 泛型参数,表示Map中值的类型 + * @return 解析后的Map集合 + */ + inline fun JsonApi.parseMap( + json: String, + ): MutableMap = parseMap(json, K::class.java, V::class.java) - /** - * 使用内联函数和reified类型参数将源对象转换为目标类型的对象 - * - * @param T 源对象的类型 - * @param D 目标对象的类型(通过reified类型参数推断) - * @param source 需要转换的源对象 - * @return 转换后的目标类型对象 - */ - @JvmStatic - inline fun JsonApi.convert(source: Any): D = convert(source, object : JsonTypeReference() {}) + /** + * 使用内联函数和reified类型参数将源对象转换为目标类型的对象 + * + * @param T 源对象的类型 + * @param D 目标对象的类型(通过reified类型参数推断) + * @param source 需要转换的源对象 + * @return 转换后的目标类型对象 + */ + @JvmStatic + inline fun JsonApi.convert(source: Any): D = convert(source, object : JsonTypeReference() {}) - /** - * 添加JSON转换器到API中 - * - * @param T 需要添加的JSON转换器类 - */ - @JvmStatic - inline fun > JsonApi.addJsonConverter() { - addJsonConverter(getJsonConverter()) - } + /** + * 添加JSON转换器到API中 + * + * @param T 需要添加的JSON转换器类 + */ + @JvmStatic + inline fun > JsonApi.addJsonConverter() { + addJsonConverter(getJsonConverter()) + } - } + } - /** - * 将JSON字符串解析为指定类型的对象 - * - * @param json 待解析的JSON字符串 - * @param clazz 目标对象的Class类型 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - fun parse(json: String, clazz: Class): T + /** + * 将JSON字符串解析为指定类型的对象 + * + * @param json 待解析的JSON字符串 + * @param clazz 目标对象的Class类型 + * @param 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + fun parse(json: String, clazz: Class): T - /** - * 将JSON字符串解析为指定泛型类型对象 - * - * @param json 待解析的JSON字符串 - * @param type 目标对象的Type类型(支持泛型) - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - fun parse(json: String, type: JsonTypeReference): T + /** + * 将JSON字符串解析为指定泛型类型对象 + * + * @param json 待解析的JSON字符串 + * @param type 目标对象的Type类型(支持泛型) + * @param 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + fun parse(json: String, type: JsonTypeReference): T - /** - * 将对象格式化为JSON字符串 - * - * @param obj 待格式化的对象 - * @return 格式化后的JSON字符串 - */ - fun format(obj: Any): String + /** + * 将对象格式化为JSON字符串 + * + * @param obj 待格式化的对象 + * @return 格式化后的JSON字符串 + */ + fun format(obj: Any): String - /** - * 从文件路径读取JSON并解析为指定类型对象 - * - * @param path 文件路径 - * @param clazz 目标对象的Class类型 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - fun parseFrom(path: String, clazz: Class): T { - return parseFrom(Paths.get(path), clazz) - } + /** + * 从文件路径读取JSON并解析为指定类型对象 + * + * @param path 文件路径 + * @param clazz 目标对象的Class类型 + * @param 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + fun parseFrom(path: String, clazz: Class): T { + return parseFrom(Paths.get(path), clazz) + } - /** - * 从路径读取JSON并解析为指定类型对象 - * - * @param path 路径对象 - * @param clazz 目标对象的Class类型 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - fun parseFrom(path: Path, clazz: Class): T { - return parseFrom(path.toFile(), clazz) - } + /** + * 从路径读取JSON并解析为指定类型对象 + * + * @param path 路径对象 + * @param clazz 目标对象的Class类型 + * @param 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + fun parseFrom(path: Path, clazz: Class): T { + return parseFrom(path.toFile(), clazz) + } - /** - * 从文件读取JSON并解析为指定类型对象 - * - * @param file 文件对象 - * @param clazz 目标对象的Class类型 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - fun parseFrom(file: File, clazz: Class): T { - Files.newInputStream(file.toPath()).use { inputStream -> - return parseFrom(inputStream, clazz) - } - } + /** + * 从文件读取JSON并解析为指定类型对象 + * + * @param file 文件对象 + * @param clazz 目标对象的Class类型 + * @param 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + fun parseFrom(file: File, clazz: Class): T { + Files.newInputStream(file.toPath()).use { inputStream -> + return parseFrom(inputStream, clazz) + } + } - /** - * 从输入流读取JSON并解析为指定类型对象 - * - * @param inputStream 输入流 - * @param clazz 目标对象的Class类型 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - fun parseFrom(inputStream: InputStream, clazz: Class): T { - val bytes = ByteArray(1024) - ByteArrayOutputStream().use { bos -> - var readlength: Int - while ((inputStream.read(bytes).also { readlength = it }) != -1) { - bos.write(bytes, 0, readlength) - } - return parse(bos.toByteArray(), clazz) - } - } + /** + * 从输入流读取JSON并解析为指定类型对象 + * + * @param inputStream 输入流 + * @param clazz 目标对象的Class类型 + * @param 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + fun parseFrom(inputStream: InputStream, clazz: Class): T { + val bytes = ByteArray(1024) + ByteArrayOutputStream().use { bos -> + var readlength: Int + while ((inputStream.read(bytes).also { readlength = it }) != -1) { + bos.write(bytes, 0, readlength) + } + return parse(bos.toByteArray(), clazz) + } + } - /** - * 从文件路径读取JSON并解析为指定泛型类型对象 - * - * @param path 文件路径 - * @param type 目标对象的Type类型(支持泛型) - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - fun parseFrom(path: String, type: JsonTypeReference): T { - return parseFrom(Paths.get(path), type) - } + /** + * 从文件路径读取JSON并解析为指定泛型类型对象 + * + * @param path 文件路径 + * @param type 目标对象的Type类型(支持泛型) + * @param 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + fun parseFrom(path: String, type: JsonTypeReference): T { + return parseFrom(Paths.get(path), type) + } - /** - * 从路径读取JSON并解析为指定泛型类型对象 - * - * @param path 路径对象 - * @param type 目标对象的Type类型(支持泛型) - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - fun parseFrom(path: Path, type: JsonTypeReference): T { - return parseFrom(path.toFile(), type) - } + /** + * 从路径读取JSON并解析为指定泛型类型对象 + * + * @param path 路径对象 + * @param type 目标对象的Type类型(支持泛型) + * @param 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + fun parseFrom(path: Path, type: JsonTypeReference): T { + return parseFrom(path.toFile(), type) + } - /** - * 从文件读取JSON并解析为指定泛型类型对象 - * - * @param file 文件对象 - * @param type 目标对象的Type类型(支持泛型) - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - fun parseFrom(file: File, type: JsonTypeReference): T { - Files.newInputStream(file.toPath()).use { inputStream -> - return parseFrom(inputStream, type) - } - } + /** + * 从文件读取JSON并解析为指定泛型类型对象 + * + * @param file 文件对象 + * @param type 目标对象的Type类型(支持泛型) + * @param 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + fun parseFrom(file: File, type: JsonTypeReference): T { + Files.newInputStream(file.toPath()).use { inputStream -> + return parseFrom(inputStream, type) + } + } - /** - * 从输入流读取JSON并解析为指定泛型类型对象 - * - * @param inputStream 输入流 - * @param type 目标对象的Type类型(支持泛型) - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - fun parseFrom(inputStream: InputStream, type: JsonTypeReference): T { - val bytes = ByteArray(1024) - ByteArrayOutputStream().use { bos -> - var readlength: Int - while ((inputStream.read(bytes).also { readlength = it }) != -1) { - bos.write(bytes, 0, readlength) - } - return parse(bos.toByteArray(), type) - } - } + /** + * 从输入流读取JSON并解析为指定泛型类型对象 + * + * @param inputStream 输入流 + * @param type 目标对象的Type类型(支持泛型) + * @param 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + fun parseFrom(inputStream: InputStream, type: JsonTypeReference): T { + val bytes = ByteArray(1024) + ByteArrayOutputStream().use { bos -> + var readlength: Int + while ((inputStream.read(bytes).also { readlength = it }) != -1) { + bos.write(bytes, 0, readlength) + } + return parse(bos.toByteArray(), type) + } + } - /** - * 将字节数组形式的JSON解析为指定类型的对象 - * - * @param json 待解析的JSON字节数组 - * @param clazz 目标对象的Class类型 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - fun parse(json: ByteArray, clazz: Class): T { - return parse(String(json), clazz) - } + /** + * 将字节数组形式的JSON解析为指定类型的对象 + * + * @param json 待解析的JSON字节数组 + * @param clazz 目标对象的Class类型 + * @param 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + fun parse(json: ByteArray, clazz: Class): T { + return parse(String(json), clazz) + } - /** - * 将字节数组形式的JSON解析为指定泛型类型对象 - * - * @param json 待解析的JSON字节数组 - * @param type 目标对象的Type类型(支持泛型) - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例 - */ - fun parse(json: ByteArray, type: JsonTypeReference): T { - return parse(String(json), type) - } + /** + * 将字节数组形式的JSON解析为指定泛型类型对象 + * + * @param json 待解析的JSON字节数组 + * @param type 目标对象的Type类型(支持泛型) + * @param 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例 + */ + fun parse(json: ByteArray, type: JsonTypeReference): T { + return parse(String(json), type) + } - /** - * 将JSON字符串解析为指定类型的对象,解析失败时返回默认值 - * - * @param json 待解析的JSON字符串 - * @param clazz 目标对象的Class类型 - * @param defaultValue 解析失败时返回的默认值 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例或默认值 - */ - fun parse(json: String, clazz: Class, defaultValue: T): T { - return try { - parse(json, clazz) - } catch (e: Exception) { - defaultValue - } - } + /** + * 将JSON字符串解析为指定类型的对象,解析失败时返回默认值 + * + * @param json 待解析的JSON字符串 + * @param clazz 目标对象的Class类型 + * @param defaultValue 解析失败时返回的默认值 + * @param 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例或默认值 + */ + fun parse(json: String, clazz: Class, defaultValue: T): T { + return try { + parse(json, clazz) + } catch (e: Exception) { + defaultValue + } + } - /** - * 将JSON字符串解析为指定泛型类型对象,解析失败时返回默认值 - * - * @param json 待解析的JSON字符串 - * @param type 目标对象的Type类型(支持泛型) - * @param defaultValue 解析失败时返回的默认值 - * @param 泛型参数,表示目标对象的类型 - * @return 解析后的对象实例或默认值 - **/ - fun parse( - json: String, type: JsonTypeReference, defaultValue: T, - ): T { - return try { - parse(json, type) - } catch (e: Exception) { - defaultValue - } - } + /** + * 将JSON字符串解析为指定泛型类型对象,解析失败时返回默认值 + * + * @param json 待解析的JSON字符串 + * @param type 目标对象的Type类型(支持泛型) + * @param defaultValue 解析失败时返回的默认值 + * @param 泛型参数,表示目标对象的类型 + * @return 解析后的对象实例或默认值 + **/ + fun parse( + json: String, type: JsonTypeReference, defaultValue: T, + ): T { + return try { + parse(json, type) + } catch (e: Exception) { + defaultValue + } + } - /** - * 将对象格式化为美化格式的JSON字符串(带缩进和换行) - * - * @param object 待格式化的对象 - * @return 格式化后的美化JSON字符串 - */ - fun formatPretty(obj: Any): String + /** + * 将对象格式化为美化格式的JSON字符串(带缩进和换行) + * + * @param object 待格式化的对象 + * @return 格式化后的美化JSON字符串 + */ + fun formatPretty(obj: Any): String - fun formatPrettyBytes(obj: Any): ByteArray { - return formatPretty(obj)!!.toByteArray() - } + fun formatPrettyBytes(obj: Any): ByteArray { + return formatPretty(obj)!!.toByteArray() + } - fun formatPretty(obj: Any, file: String) { - formatPretty(obj, Paths.get(file)) - } + fun formatPretty(obj: Any, file: String) { + formatPretty(obj, Paths.get(file)) + } - fun formatPretty(obj: Any, file: Path) { - formatPretty(obj, file.toFile()) - } + fun formatPretty(obj: Any, file: Path) { + formatPretty(obj, file.toFile()) + } - fun formatPretty(obj: Any, file: File) { - FileOutputStream(file).use { fos -> - formatPretty(obj, fos) - } - } + fun formatPretty(obj: Any, file: File) { + FileOutputStream(file).use { fos -> + formatPretty(obj, fos) + } + } - fun formatPretty(obj: Any, stream: OutputStream) { - stream.write(formatPrettyBytes(obj)) - } + fun formatPretty(obj: Any, stream: OutputStream) { + stream.write(formatPrettyBytes(obj)) + } - fun formatBytes(obj: Any): ByteArray { - return format(obj).toByteArray() - } + fun formatBytes(obj: Any): ByteArray { + return format(obj).toByteArray() + } - fun format(obj: Any, file: String) { - format(obj, Paths.get(file)) - } + fun format(obj: Any, file: String) { + format(obj, Paths.get(file)) + } - fun format(obj: Any, file: Path) { - format(obj, file.toFile()) - } + fun format(obj: Any, file: Path) { + format(obj, file.toFile()) + } - fun format(obj: Any, file: File) { - FileOutputStream(file).use { fos -> - format(obj, fos) - } - } + fun format(obj: Any, file: File) { + FileOutputStream(file).use { fos -> + format(obj, fos) + } + } - fun format(obj: Any, stream: OutputStream) { - stream.write(formatPrettyBytes(obj)) - } + fun format(obj: Any, stream: OutputStream) { + stream.write(formatPrettyBytes(obj)) + } - /** - * 将JSON字符串解析为指定元素类型的List集合 - * - * @param json 待解析的JSON字符串 - * @param elementType List中元素的类型 - * @param 泛型参数,表示List中元素的类型 - * @return 解析后的List集合 - */ - fun parseList(json: String, elementType: Class): List { - return parse(json, type = listType(elementType)) - } + /** + * 将JSON字符串解析为指定元素类型的List集合 + * + * @param json 待解析的JSON字符串 + * @param elementType List中元素的类型 + * @param 泛型参数,表示List中元素的类型 + * @return 解析后的List集合 + */ + fun parseList(json: String, elementType: Class): List { + return parse(json, type = listType(elementType)) + } - /** - * 将JSON字符串解析为指定键值类型的Map集合 - * - * @param json 待解析的JSON字符串 - * @param keyType Map中键的类型 - * @param valueType Map中值的类型 - * @param 泛型参数,表示Map中键的类型 - * @param 泛型参数,表示Map中值的类型 - * @return 解析后的Map集合 - */ - fun parseMap( - json: String, keyType: Class, valueType: Class, - ): MutableMap { - val mapType: JsonTypeReference> = object : JsonTypeReference>() {} - return parse>(json, mapType) - } + /** + * 将JSON字符串解析为指定键值类型的Map集合 + * + * @param json 待解析的JSON字符串 + * @param keyType Map中键的类型 + * @param valueType Map中值的类型 + * @param 泛型参数,表示Map中键的类型 + * @param 泛型参数,表示Map中值的类型 + * @return 解析后的Map集合 + */ + fun parseMap( + json: String, keyType: Class, valueType: Class, + ): MutableMap { + val mapType: JsonTypeReference> = object : JsonTypeReference>() {} + return parse>(json, mapType) + } - /** - * 验证字符串是否为有效的JSON格式 - * - * @param json 待验证的字符串 - * @return 如果是有效的JSON格式返回true,否则返回false - */ - fun isValidJson(json: String): Boolean + /** + * 验证字符串是否为有效的JSON格式 + * + * @param json 待验证的字符串 + * @return 如果是有效的JSON格式返回true,否则返回false + */ + fun isValidJson(json: String): Boolean - /** - * 将对象转换为JSON字节数组 - * - * @param object 待转换的对象 - * @return 转换后的JSON字节数组 - */ - fun toBytes(obj: Any): ByteArray { - return format(obj)!!.toByteArray() - } + /** + * 将对象转换为JSON字节数组 + * + * @param object 待转换的对象 + * @return 转换后的JSON字节数组 + */ + fun toBytes(obj: Any): ByteArray { + return format(obj)!!.toByteArray() + } - /** - * 将对象转换为美化格式的JSON字节数组 - * - * @param object 待转换的对象 - * @return 转换后的美化格式JSON字节数组 - */ - fun toBytesPretty(obj: Any): ByteArray { - return formatPretty(obj)!!.toByteArray() - } + /** + * 将对象转换为美化格式的JSON字节数组 + * + * @param object 待转换的对象 + * @return 转换后的美化格式JSON字节数组 + */ + fun toBytesPretty(obj: Any): ByteArray { + return formatPretty(obj)!!.toByteArray() + } - /** - * 合并多个JSON字符串为一个JSON对象 - * - * @param jsons 待合并的JSON字符串数组 - * @return 合并后的JSON字符串 - */ - fun merge(vararg jsons: String): String + /** + * 合并多个JSON字符串为一个JSON对象 + * + * @param jsons 待合并的JSON字符串数组 + * @return 合并后的JSON字符串 + */ + fun merge(vararg jsons: String): String - /** - * 获取JSON字符串中指定路径节点的值 - * - * @param json JSON字符串 - * @param path 节点路径(如:"user.name") - * @return 节点值的字符串表示 - */ - fun getNodeValue(json: String, path: String): String? + /** + * 获取JSON字符串中指定路径节点的值 + * + * @param json JSON字符串 + * @param path 节点路径(如:"user.name") + * @return 节点值的字符串表示 + */ + fun getNodeValue(json: String, path: String): String? - /** - * 更新JSON字符串中指定路径节点的值 - * - * @param json 原始JSON字符串 - * @param path 节点路径(如:"user.name") - * @param newValue 新的节点值 - * @return 更新后的JSON字符串 - */ - fun updateNodeValue(json: String, path: String, newValue: Any): String + /** + * 更新JSON字符串中指定路径节点的值 + * + * @param json 原始JSON字符串 + * @param path 节点路径(如:"user.name") + * @param newValue 新的节点值 + * @return 更新后的JSON字符串 + */ + fun updateNodeValue(json: String, path: String, newValue: Any): String - /** - * 将任意对象转换为指定类型的对象 - * - * @param source 源对象,可以是 JSON 字符串、JsonItem 或其他对象 - * @param destinationClass 目标类型的 Class 对象 - * @return 转换后的目标类型对象 - * - * @param 目标类型泛型参数 - */ - fun convert(source: Any, destinationClass: Class): D + /** + * 将任意对象转换为指定类型的对象 + * + * @param source 源对象,可以是 JSON 字符串、JsonItem 或其他对象 + * @param destinationClass 目标类型的 Class 对象 + * @return 转换后的目标类型对象 + * + * @param 目标类型泛型参数 + */ + fun convert(source: Any, destinationClass: Class): D - /** - * 将任意对象转换为指定泛型类型的对象 - * 用于处理带泛型的复杂类型,如 List、Map 等 - * - * @param source 源对象,可以是 JSON 字符串、JsonItem 或其他对象 - * @param destinationType 目标类型的类型引用,包含泛型信息 - * @return 转换后的目标类型对象 - * - * @param 目标类型泛型参数 - * - * 使用示例: - * ``` - * val typeRef = object : JsonTypeReference>() {} - * val userList = converter.convert(jsonString, typeRef) - * ``` - */ - fun convert(source: Any, destinationType: JsonTypeReference): D + /** + * 将任意对象转换为指定泛型类型的对象 + * 用于处理带泛型的复杂类型,如 List、Map 等 + * + * @param source 源对象,可以是 JSON 字符串、JsonItem 或其他对象 + * @param destinationType 目标类型的类型引用,包含泛型信息 + * @return 转换后的目标类型对象 + * + * @param 目标类型泛型参数 + * + * 使用示例: + * ``` + * val typeRef = object : JsonTypeReference>() {} + * val userList = converter.convert(jsonString, typeRef) + * ``` + */ + fun convert(source: Any, destinationType: JsonTypeReference): D - /** - * 注册自定义的 JSON 转换器 - * 用于处理特定类型的自定义序列化和反序列化逻辑 - * - * @param c 自定义的 JSON 转换器实例 - * - * 使用示例: - * ``` - * converter.addJsonConverter(DateJsonConverter()) - * converter.addJsonConverter(LocalDateTimeJsonConverter()) - * ``` - */ - fun addJsonConverter(c: BaseJsonConverter<*, *>) + /** + * 注册自定义的 JSON 转换器 + * 用于处理特定类型的自定义序列化和反序列化逻辑 + * + * @param c 自定义的 JSON 转换器实例 + * + * 使用示例: + * ``` + * converter.addJsonConverter(DateJsonConverter()) + * converter.addJsonConverter(LocalDateTimeJsonConverter()) + * ``` + */ + fun addJsonConverter(c: BaseJsonConverter<*, *>) - /** - * 将 JSON 字符串解析为 JsonItem 对象 - * - * @param json JSON 格式的字符串 - * @return 解析后的 JsonItem 对象,可以是 JsonObject、JsonArray 或 JsonValue - * @throws JsonParserException 当 JSON 格式错误时抛出 - */ - fun parseJsonItem(json: String): JsonItem + /** + * 将 JSON 字符串解析为 JsonItem 对象 + * + * @param json JSON 格式的字符串 + * @return 解析后的 JsonItem 对象,可以是 JsonObject、JsonArray 或 JsonValue + * @throws JsonParserException 当 JSON 格式错误时抛出 + */ + fun parseJsonItem(json: String): JsonItem - /** - * 将字节数组解析为 JsonItem 对象 - * 字节数组会被转换为字符串后再解析 - * - * @param byte JSON 格式的字节数组(通常是 UTF-8 编码) - * @return 解析后的 JsonItem 对象 - * @throws JsonParserException 当 JSON 格式错误时抛出 - */ - fun parseJsonItem(byte: ByteArray): JsonItem { - return parseJsonItem(String(byte)) - } + /** + * 将字节数组解析为 JsonItem 对象 + * 字节数组会被转换为字符串后再解析 + * + * @param byte JSON 格式的字节数组(通常是 UTF-8 编码) + * @return 解析后的 JsonItem 对象 + * @throws JsonParserException 当 JSON 格式错误时抛出 + */ + fun parseJsonItem(byte: ByteArray): JsonItem { + return parseJsonItem(String(byte)) + } - /** - * 将输入流解析为 JsonItem 对象 - * 会自动关闭输入流 - * - * @param inputStream JSON 数据的输入流 - * @return 解析后的 JsonItem 对象 - * @throws JsonParserException 当 JSON 格式错误时抛出 - * @throws IOException 当读取输入流失败时抛出 - * - * 使用示例: - * ``` - * val inputStream = FileInputStream("data.json") - * val jsonItem = converter.parseJsonItem(inputStream) - * ``` - */ - fun parseJsonItem(inputStream: InputStream): JsonItem { - inputStream.use { - return parseJsonItem(it.readAllBytes()) - } - } + /** + * 将输入流解析为 JsonItem 对象 + * 会自动关闭输入流 + * + * @param inputStream JSON 数据的输入流 + * @return 解析后的 JsonItem 对象 + * @throws JsonParserException 当 JSON 格式错误时抛出 + * @throws IOException 当读取输入流失败时抛出 + * + * 使用示例: + * ``` + * val inputStream = FileInputStream("data.json") + * val jsonItem = converter.parseJsonItem(inputStream) + * ``` + */ + fun parseJsonItem(inputStream: InputStream): JsonItem { + inputStream.use { + return parseJsonItem(it.readAllBytes()) + } + } - /** - * 将文件解析为 JsonItem 对象 - * - * @param file 包含 JSON 数据的文件 - * @return 解析后的 JsonItem 对象 - * @throws IOException 当读取文件失败时抛出 - * - * 使用示例: - * ``` - * val file = File("config.json") - * val jsonItem = converter.parseJsonItem(file) - * ``` - */ - @Throws(IOException::class) - fun parseJsonItem(file: File): JsonItem { - return parseJsonItem(file.readBytes()) - } + /** + * 将文件解析为 JsonItem 对象 + * + * @param file 包含 JSON 数据的文件 + * @return 解析后的 JsonItem 对象 + * @throws IOException 当读取文件失败时抛出 + * + * 使用示例: + * ``` + * val file = File("config.json") + * val jsonItem = converter.parseJsonItem(file) + * ``` + */ + @Throws(IOException::class) + fun parseJsonItem(file: File): JsonItem { + return parseJsonItem(file.readBytes()) + } - /** - * 将文件路径解析为 JsonItem 对象 - * - * @param path 包含 JSON 数据的文件路径 - * @return 解析后的 JsonItem 对象 - * @throws IOException 当读取文件失败时抛出 - * - * 使用示例: - * ``` - * val path = Paths.get("data/user.json") - * val jsonItem = converter.parseJsonItem(path) - * ``` - */ - fun parseJsonItem(path: Path): JsonItem { - return parseJsonItem(path.readBytes()) - } + /** + * 将文件路径解析为 JsonItem 对象 + * + * @param path 包含 JSON 数据的文件路径 + * @return 解析后的 JsonItem 对象 + * @throws IOException 当读取文件失败时抛出 + * + * 使用示例: + * ``` + * val path = Paths.get("data/user.json") + * val jsonItem = converter.parseJsonItem(path) + * ``` + */ + fun parseJsonItem(path: Path): JsonItem { + return parseJsonItem(path.readBytes()) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/api/type/JsonTypeReference.kt b/src/main/kotlin/com/mingliqiye/utils/json/api/type/JsonTypeReference.kt index d824f55..5c8c3d3 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/api/type/JsonTypeReference.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/api/type/JsonTypeReference.kt @@ -34,148 +34,148 @@ import java.util.* */ abstract class JsonTypeReference : Comparable> { - open var type: Type = Any::class.java + open var type: Type = Any::class.java - /** - * 构造函数,通过反射获取泛型类型信息 - * 仅供内部匿名子类使用 - */ - protected constructor() { - val superClass: Type = this.javaClass.genericSuperclass + /** + * 构造函数,通过反射获取泛型类型信息 + * 仅供内部匿名子类使用 + */ + protected constructor() { + val superClass: Type = this.javaClass.genericSuperclass - // 检查是否为匿名子类,防止直接实例化导致无法获取泛型信息 - if (superClass is Class<*>) { - throw IllegalArgumentException( - "必须使用匿名子类方式创建 JsonTypeReference," + - "例如: new JsonTypeReference>() {}" - ) - } + // 检查是否为匿名子类,防止直接实例化导致无法获取泛型信息 + if (superClass is Class<*>) { + throw IllegalArgumentException( + "必须使用匿名子类方式创建 JsonTypeReference," + + "例如: new JsonTypeReference>() {}" + ) + } - this.type = (superClass as ParameterizedType).actualTypeArguments[0] - } + this.type = (superClass as ParameterizedType).actualTypeArguments[0] + } - /** - * 构造函数,直接指定类型 - * @param type 具体的类型信息 - */ - protected constructor(type: Type) { - this.type = Objects.requireNonNull(type, "Type cannot be null") - } + /** + * 构造函数,直接指定类型 + * @param type 具体的类型信息 + */ + protected constructor(type: Type) { + this.type = Objects.requireNonNull(type, "Type cannot be null") + } - /** - * 创建类型引用实例 - * @param 目标类型 - * @return 类型引用实例 - */ - companion object { - inline fun of(): JsonTypeReference { - return object : JsonTypeReference() {} - } + /** + * 创建类型引用实例 + * @param 目标类型 + * @return 类型引用实例 + */ + companion object { + inline fun of(): JsonTypeReference { + return object : JsonTypeReference() {} + } - /** - * 根据 Class 创建类型引用 - * @param clazz 目标类 - * @param 目标类型 - * @return 类型引用实例 - */ - @JvmStatic - fun of(clazz: Class): JsonTypeReference { - return object : JsonTypeReference(clazz) {} - } + /** + * 根据 Class 创建类型引用 + * @param clazz 目标类 + * @param 目标类型 + * @return 类型引用实例 + */ + @JvmStatic + fun of(clazz: Class): JsonTypeReference { + return object : JsonTypeReference(clazz) {} + } - /** - * 根据 Type 创建类型引用 - * @param type 目标类型 - * @param 目标类型 - * @return 类型引用实例 - */ - @JvmStatic - fun of(type: Type): JsonTypeReference { - return object : JsonTypeReference(type) {} - } - } + /** + * 根据 Type 创建类型引用 + * @param type 目标类型 + * @param 目标类型 + * @return 类型引用实例 + */ + @JvmStatic + fun of(type: Type): JsonTypeReference { + return object : JsonTypeReference(type) {} + } + } - /** - * 获取原始类型(去掉泛型参数的类型) - * @return 原始类型 Class - */ - @Suppress("UNCHECKED_CAST") - fun getRawType(): Class { - var rawType: Type = type + /** + * 获取原始类型(去掉泛型参数的类型) + * @return 原始类型 Class + */ + @Suppress("UNCHECKED_CAST") + fun getRawType(): Class { + var rawType: Type = type - // 如果是参数化类型,则提取原始类型部分 - if (type is ParameterizedType) { - rawType = (type as ParameterizedType).rawType - } + // 如果是参数化类型,则提取原始类型部分 + if (type is ParameterizedType) { + rawType = (type as ParameterizedType).rawType + } - if (rawType is Class<*>) { - return rawType as Class - } + if (rawType is Class<*>) { + return rawType as Class + } - throw IllegalStateException("无法获取原始类型: $type") - } + throw IllegalStateException("无法获取原始类型: $type") + } - /** - * 判断两个 JsonTypeReference 实例是否相等 - * @param other 另一个对象 - * @return 是否相等 - */ - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (other == null || this.javaClass != other.javaClass) return false - val that = other as JsonTypeReference<*> + /** + * 判断两个 JsonTypeReference 实例是否相等 + * @param other 另一个对象 + * @return 是否相等 + */ + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other == null || this.javaClass != other.javaClass) return false + val that = other as JsonTypeReference<*> - // 对于 ParameterizedType,需要更完整的比较 - if (this.type is ParameterizedType && that.type is ParameterizedType) { - val thisParamType = this.type as ParameterizedType - val thatParamType = that.type as ParameterizedType + // 对于 ParameterizedType,需要更完整的比较 + if (this.type is ParameterizedType && that.type is ParameterizedType) { + val thisParamType = this.type as ParameterizedType + val thatParamType = that.type as ParameterizedType - return ( - Objects.equals( - thisParamType.rawType, - thatParamType.rawType - ) && - thisParamType.actualTypeArguments.contentEquals(thatParamType.actualTypeArguments) && - Objects.equals( - thisParamType.ownerType, - thatParamType.ownerType - ) - ) - } + return ( + Objects.equals( + thisParamType.rawType, + thatParamType.rawType + ) && + thisParamType.actualTypeArguments.contentEquals(thatParamType.actualTypeArguments) && + Objects.equals( + thisParamType.ownerType, + thatParamType.ownerType + ) + ) + } - return Objects.equals(type, that.type) - } + return Objects.equals(type, that.type) + } - /** - * 计算当前实例的哈希码 - * @return 哈希码值 - */ - override fun hashCode(): Int { - if (type is ParameterizedType) { - val paramType = type as ParameterizedType - return Objects.hash( - paramType.rawType, - paramType.actualTypeArguments.contentHashCode(), - paramType.ownerType - ) - } - return Objects.hash(type) - } + /** + * 计算当前实例的哈希码 + * @return 哈希码值 + */ + override fun hashCode(): Int { + if (type is ParameterizedType) { + val paramType = type as ParameterizedType + return Objects.hash( + paramType.rawType, + paramType.actualTypeArguments.contentHashCode(), + paramType.ownerType + ) + } + return Objects.hash(type) + } - /** - * 返回当前实例的字符串表示形式 - * @return 字符串描述 - */ - override fun toString(): String { - return "com.mingliqiye.utils.json.JsonTypeReference<${TypeReference.getRawString(type)}>" - } + /** + * 返回当前实例的字符串表示形式 + * @return 字符串描述 + */ + override fun toString(): String { + return "com.mingliqiye.utils.json.JsonTypeReference<${TypeReference.getRawString(type)}>" + } - /** - * 比较当前实例与另一个实例的大小关系 - * @param other 另一个 JsonTypeReference 实例 - * @return 比较结果 - */ - override fun compareTo(other: JsonTypeReference): Int { - return this.type.toString().compareTo(other.type.toString()) - } + /** + * 比较当前实例与另一个实例的大小关系 + * @param other 另一个 JsonTypeReference 实例 + * @return 比较结果 + */ + override fun compareTo(other: JsonTypeReference): Int { + return this.type.toString().compareTo(other.type.toString()) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/api/type/JsonTypeUtils.kt b/src/main/kotlin/com/mingliqiye/utils/json/api/type/JsonTypeUtils.kt index 87e8b05..9934b59 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/api/type/JsonTypeUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/api/type/JsonTypeUtils.kt @@ -36,11 +36,11 @@ import java.util.* * @return 如果类型匹配则返回 true,否则返回 false */ fun isTypeOf(type: Type, expectedClass: Class<*>): Boolean { - return when (type) { - is Class<*> -> expectedClass.isAssignableFrom(type) - is ParameterizedType -> isTypeOf(type.rawType, expectedClass) - else -> false - } + return when (type) { + is Class<*> -> expectedClass.isAssignableFrom(type) + is ParameterizedType -> isTypeOf(type.rawType, expectedClass) + else -> false + } } /** @@ -52,15 +52,15 @@ fun isTypeOf(type: Type, expectedClass: Class<*>): Boolean { * @throws IllegalArgumentException 当无法获取指定索引的泛型参数时抛出异常 */ fun getGenericParameter(type: Type, index: Int): Type { - if (type is ParameterizedType) { - val typeArgs = type.actualTypeArguments - if (index >= 0 && index < typeArgs.size) { - return typeArgs[index] - } - } - throw IllegalArgumentException( - "无法获取泛型参数: $type at index $index" - ) + if (type is ParameterizedType) { + val typeArgs = type.actualTypeArguments + if (index >= 0 && index < typeArgs.size) { + return typeArgs[index] + } + } + throw IllegalArgumentException( + "无法获取泛型参数: $type at index $index" + ) } /** @@ -70,24 +70,24 @@ fun getGenericParameter(type: Type, index: Int): Type { * @return 类型名称字符串 */ fun getTypeName(type: Type): String { - return when (type) { - is Class<*> -> type.simpleName - is ParameterizedType -> { - val rawType = type.rawType as Class<*> - val typeArgs = type.actualTypeArguments + return when (type) { + is Class<*> -> type.simpleName + is ParameterizedType -> { + val rawType = type.rawType as Class<*> + val typeArgs = type.actualTypeArguments - val sb = StringBuilder(rawType.simpleName) - sb.append("<") - for (i in typeArgs.indices) { - if (i > 0) sb.append(", ") - sb.append(getTypeName(typeArgs[i])) - } - sb.append(">") - sb.toString() - } + val sb = StringBuilder(rawType.simpleName) + sb.append("<") + for (i in typeArgs.indices) { + if (i > 0) sb.append(", ") + sb.append(getTypeName(typeArgs[i])) + } + sb.append(">") + sb.toString() + } - else -> type.typeName - } + else -> type.typeName + } } /** @@ -98,28 +98,28 @@ fun getTypeName(type: Type): String { * @return 表示数组类型的 JsonTypeReference 对象 */ fun arrayType(componentType: Class): JsonTypeReference> { - return object : JsonTypeReference>() { - private val arrayType: Type = java.lang.reflect.Array.newInstance( - componentType, 0 - ).javaClass + return object : JsonTypeReference>() { + private val arrayType: Type = java.lang.reflect.Array.newInstance( + componentType, 0 + ).javaClass - override var type: Type = Any::class.java - get() = object : ParameterizedType { - private val actualTypeArguments = arrayOf(componentType) + override var type: Type = Any::class.java + get() = object : ParameterizedType { + private val actualTypeArguments = arrayOf(componentType) - override fun getActualTypeArguments(): Array { - return actualTypeArguments - } + override fun getActualTypeArguments(): Array { + return actualTypeArguments + } - override fun getRawType(): Type { - return arrayType - } + override fun getRawType(): Type { + return arrayType + } - override fun getOwnerType(): Type? { - return null - } - } - } + override fun getOwnerType(): Type? { + return null + } + } + } } /** @@ -132,22 +132,22 @@ fun arrayType(componentType: Class): JsonTypeReference> { */ fun listType(componentType: Class): JsonTypeReference> { - return object : JsonTypeReference>() { - override var type: Type = Any::class.java - get() = object : ParameterizedType { - override fun getActualTypeArguments(): Array { - return arrayOf(componentType) - } + return object : JsonTypeReference>() { + override var type: Type = Any::class.java + get() = object : ParameterizedType { + override fun getActualTypeArguments(): Array { + return arrayOf(componentType) + } - override fun getRawType(): Type { - return List::class.java - } + override fun getRawType(): Type { + return List::class.java + } - override fun getOwnerType(): Type? { - return null - } - } - } + override fun getOwnerType(): Type? { + return null + } + } + } } /** @@ -162,40 +162,40 @@ fun listType(componentType: Class): JsonTypeReference> { */ fun MapType(keyType: Class, valueType: Class): JsonTypeReference> { - return object : JsonTypeReference>() { - override var type: Type = Any::class.java - get() = object : ParameterizedType { - override fun getActualTypeArguments(): Array { - return arrayOf(keyType, valueType) - } + return object : JsonTypeReference>() { + override var type: Type = Any::class.java + get() = object : ParameterizedType { + override fun getActualTypeArguments(): Array { + return arrayOf(keyType, valueType) + } - override fun getRawType(): Type { - return Map::class.java - } + override fun getRawType(): Type { + return Map::class.java + } - override fun getOwnerType(): Type? { - return null - } + override fun getOwnerType(): Type? { + return null + } - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (other !is ParameterizedType) return false + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other !is ParameterizedType) return false - val that = other - return (Objects.equals( - rawType, - that.rawType - ) && actualTypeArguments.contentEquals(that.actualTypeArguments) && Objects.equals( - ownerType, - that.ownerType - )) - } + val that = other + return (Objects.equals( + rawType, + that.rawType + ) && actualTypeArguments.contentEquals(that.actualTypeArguments) && Objects.equals( + ownerType, + that.ownerType + )) + } - override fun hashCode(): Int { - return (actualTypeArguments.contentHashCode() xor Objects.hashCode(rawType) xor Objects.hashCode( - ownerType - )) - } - } - } + override fun hashCode(): Int { + return (actualTypeArguments.contentHashCode() xor Objects.hashCode(rawType) xor Objects.hashCode( + ownerType + )) + } + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/api/type/TypeReference.kt b/src/main/kotlin/com/mingliqiye/utils/json/api/type/TypeReference.kt index 2bfa600..53205fd 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/api/type/TypeReference.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/api/type/TypeReference.kt @@ -28,67 +28,67 @@ import java.lang.reflect.Type import java.lang.reflect.WildcardType class TypeReference( - val rawClass: Type, - vararg paramType: Type + val rawClass: Type, + vararg paramType: Type, ) : ParameterizedType { - private val typeArguments: Array = paramType - override fun getActualTypeArguments(): Array = typeArguments + private val typeArguments: Array = paramType + override fun getActualTypeArguments(): Array = typeArguments - override fun getRawType(): Type = rawClass + override fun getRawType(): Type = rawClass - override fun getOwnerType(): Type? = null + override fun getOwnerType(): Type? = null - override fun toString(): String = "${getRawString(rawClass)}<${ - ",".join(typeArguments) { getRawString(it) } - }>" + override fun toString(): String = "${getRawString(rawClass)}<${ + ",".join(typeArguments) { getRawString(it) } + }>" - companion object { + companion object { - fun getRawString(type: Type): String { - return when (type) { - is Class<*> -> type.name - is WildcardType -> { - val upperBounds = type.upperBounds - val lowerBounds = type.lowerBounds - when { - upperBounds.isNotEmpty() && upperBounds[0] != Any::class.java -> { - "? extends ${getRawString(upperBounds[0])}" - } + fun getRawString(type: Type): String { + return when (type) { + is Class<*> -> type.name + is WildcardType -> { + val upperBounds = type.upperBounds + val lowerBounds = type.lowerBounds + when { + upperBounds.isNotEmpty() && upperBounds[0] != Any::class.java -> { + "? extends ${getRawString(upperBounds[0])}" + } - lowerBounds.isNotEmpty() -> { - "? super ${getRawString(lowerBounds[0])}" - } + lowerBounds.isNotEmpty() -> { + "? super ${getRawString(lowerBounds[0])}" + } - else -> "?" - } - } + else -> "?" + } + } - is ParameterizedType -> { - of(type).toString() - } + is ParameterizedType -> { + of(type).toString() + } - else -> type.typeName - } - } + else -> type.typeName + } + } - inline fun of(): TypeReference { - return of((object : JsonTypeReference() {}).type) - } + inline fun of(): TypeReference { + return of((object : JsonTypeReference() {}).type) + } - fun of(type: Type): TypeReference { - return when (type) { - is Class<*> -> TypeReference(type) - is ParameterizedType -> TypeReference(type.rawType, *type.actualTypeArguments) - is WildcardType -> { - // 处理通配符类型,返回上界类型 - val upperBound = type.upperBounds.firstOrNull() ?: Any::class.java - TypeReference(upperBound) - } + fun of(type: Type): TypeReference { + return when (type) { + is Class<*> -> TypeReference(type) + is ParameterizedType -> TypeReference(type.rawType, *type.actualTypeArguments) + is WildcardType -> { + // 处理通配符类型,返回上界类型 + val upperBound = type.upperBounds.firstOrNull() ?: Any::class.java + TypeReference(upperBound) + } - else -> throw IllegalStateException("无法获取类型: $type") - } - } - } + else -> throw IllegalStateException("无法获取类型: $type") + } + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/DateTimeJsonConverter.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/DateTimeJsonConverter.kt index 53e7319..f50d09c 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/DateTimeJsonConverter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/DateTimeJsonConverter.kt @@ -40,73 +40,73 @@ import com.mingliqiye.utils.time.Formatter class DateTimeJsonConverter private constructor() : BaseJsonStringConverter { - companion object { - private val dateTimeJsonConverter by lazy { - DateTimeJsonConverter() - } + companion object { + private val dateTimeJsonConverter by lazy { + DateTimeJsonConverter() + } - @JvmStatic - fun getJsonConverter(): DateTimeJsonConverter = dateTimeJsonConverter - } + @JvmStatic + fun getJsonConverter(): DateTimeJsonConverter = dateTimeJsonConverter + } - /** - * 将 DateTime 对象转换为 JSON 字符串。 - * - * @param obj 需要转换的 DateTime 对象,可能为 null。 - * @param annotationGetter 用于获取注解信息的对象,用于决定格式化方式。 - * @return 转换后的字符串,如果输入为 null 则返回 null。 - * @throws Exception 如果在转换过程中发生异常。 - */ - @Throws(Exception::class) - override fun convert(obj: DateTime?, annotationGetter: AnnotationGetter): String? { - // 如果输入对象为 null,直接返回 null - if (obj.isNull()) return null + /** + * 将 DateTime 对象转换为 JSON 字符串。 + * + * @param obj 需要转换的 DateTime 对象,可能为 null。 + * @param annotationGetter 用于获取注解信息的对象,用于决定格式化方式。 + * @return 转换后的字符串,如果输入为 null 则返回 null。 + * @throws Exception 如果在转换过程中发生异常。 + */ + @Throws(Exception::class) + override fun convert(obj: DateTime?, annotationGetter: AnnotationGetter): String? { + // 如果输入对象为 null,直接返回 null + if (obj.isNull()) return null - // 获取 DateTimeJsonFormat 注解信息 - val dateTimeJsonFormat: DateTimeJsonFormat? = annotationGetter.get() + // 获取 DateTimeJsonFormat 注解信息 + val dateTimeJsonFormat: DateTimeJsonFormat? = annotationGetter.get() - // 根据注解中的格式化规则进行转换 - return if (Formatter.NONE != dateTimeJsonFormat?.value && dateTimeJsonFormat != null) { - obj.format(dateTimeJsonFormat.value, dateTimeJsonFormat.repcZero) - } else if (dateTimeJsonFormat?.formatter?.isEmpty() == false) { - obj.format(dateTimeJsonFormat.formatter, dateTimeJsonFormat.repcZero) - } else { - obj.format() - } - } + // 根据注解中的格式化规则进行转换 + return if (Formatter.NONE != dateTimeJsonFormat?.value && dateTimeJsonFormat != null) { + obj.format(dateTimeJsonFormat.value, dateTimeJsonFormat.repcZero) + } else if (dateTimeJsonFormat?.formatter?.isEmpty() == false) { + obj.format(dateTimeJsonFormat.formatter, dateTimeJsonFormat.repcZero) + } else { + obj.format() + } + } - /** - * 将 JSON 字符串转换为 DateTime 对象。 - * - * @param obj 需要转换的字符串,可能为 null 或空。 - * @param annotationGetter 用于获取注解信息的对象,用于决定解析方式。 - * @return 解析后的 DateTime 对象,如果输入为 null 或空则返回 null。 - * @throws Exception 如果在解析过程中发生异常。 - */ - @Throws(Exception::class) - override fun deConvert(obj: String?, annotationGetter: AnnotationGetter): DateTime? { - // 如果输入字符串为 null 或空,直接返回 null - if (obj.isNullish()) return null + /** + * 将 JSON 字符串转换为 DateTime 对象。 + * + * @param obj 需要转换的字符串,可能为 null 或空。 + * @param annotationGetter 用于获取注解信息的对象,用于决定解析方式。 + * @return 解析后的 DateTime 对象,如果输入为 null 或空则返回 null。 + * @throws Exception 如果在解析过程中发生异常。 + */ + @Throws(Exception::class) + override fun deConvert(obj: String?, annotationGetter: AnnotationGetter): DateTime? { + // 如果输入字符串为 null 或空,直接返回 null + if (obj.isNullish()) return null - // 获取 DateTimeJsonFormat 注解信息 - val dateTimeJsonFormat: DateTimeJsonFormat? = annotationGetter.get() + // 获取 DateTimeJsonFormat 注解信息 + val dateTimeJsonFormat: DateTimeJsonFormat? = annotationGetter.get() - // 根据注解中的解析规则进行转换 - return if (Formatter.NONE != dateTimeJsonFormat?.value && dateTimeJsonFormat != null) { - DateTime.parse(obj, dateTimeJsonFormat.value, dateTimeJsonFormat.repcZero) - } else if (dateTimeJsonFormat?.formatter?.isEmpty() == false) { - DateTime.parse(obj, dateTimeJsonFormat.formatter, dateTimeJsonFormat.repcZero) - } else { - DateTime.parse(obj) - } - } + // 根据注解中的解析规则进行转换 + return if (Formatter.NONE != dateTimeJsonFormat?.value && dateTimeJsonFormat != null) { + DateTime.parse(obj, dateTimeJsonFormat.value, dateTimeJsonFormat.repcZero) + } else if (dateTimeJsonFormat?.formatter?.isEmpty() == false) { + DateTime.parse(obj, dateTimeJsonFormat.formatter, dateTimeJsonFormat.repcZero) + } else { + DateTime.parse(obj) + } + } - /** - * 获取当前转换器支持的目标类型引用。 - * - * @return 返回 DateTime 类型的 JsonTypeReference。 - * @throws Exception 如果在获取类型引用时发生异常。 - */ - @Throws(Exception::class) - override fun getFromType(): JsonTypeReference = JsonTypeReference.of() + /** + * 获取当前转换器支持的目标类型引用。 + * + * @return 返回 DateTime 类型的 JsonTypeReference。 + * @throws Exception 如果在获取类型引用时发生异常。 + */ + @Throws(Exception::class) + override fun getFromType(): JsonTypeReference = JsonTypeReference.of() } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/UUIDJsonConverter.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/UUIDJsonConverter.kt index 1a20a80..28de21f 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/UUIDJsonConverter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/UUIDJsonConverter.kt @@ -40,71 +40,71 @@ import com.mingliqiye.utils.uuid.UUIDFormatType */ class UUIDJsonConverter private constructor() : BaseJsonStringConverter { - companion object { - private val uuidJsonConverter by lazy { - UUIDJsonConverter() - } + companion object { + private val uuidJsonConverter by lazy { + UUIDJsonConverter() + } - @JvmStatic - fun getJsonConverter(): UUIDJsonConverter = uuidJsonConverter - } + @JvmStatic + fun getJsonConverter(): UUIDJsonConverter = uuidJsonConverter + } - /** - * 将 UUID 对象转换为字符串形式。 - * - * @param obj 需要转换的 UUID 对象,可能为 null。 - * @param annotationGetter 用于获取注解信息的对象。 - * @return 转换后的字符串,如果输入为 null 则返回 null。 - */ - override fun convert( - obj: UUID?, - annotationGetter: AnnotationGetter - ): String? { - // 如果输入对象为 null,直接返回 null - if (obj.isNull()) return null + /** + * 将 UUID 对象转换为字符串形式。 + * + * @param obj 需要转换的 UUID 对象,可能为 null。 + * @param annotationGetter 用于获取注解信息的对象。 + * @return 转换后的字符串,如果输入为 null 则返回 null。 + */ + override fun convert( + obj: UUID?, + annotationGetter: AnnotationGetter, + ): String? { + // 如果输入对象为 null,直接返回 null + if (obj.isNull()) return null - // 获取 UUIDJsonFormat 注解信息,若未找到则使用默认格式 - val dateTimeJsonFormat: UUIDJsonFormat = annotationGetter.get() ?: return obj.getString() + // 获取 UUIDJsonFormat 注解信息,若未找到则使用默认格式 + val dateTimeJsonFormat: UUIDJsonFormat = annotationGetter.get() ?: return obj.getString() - // 根据注解中的 base 和 value 属性选择合适的字符串表示方式 - return if (BaseType.BASE16 != dateTimeJsonFormat.base) { - obj.getString(dateTimeJsonFormat.base) - } else if (UUIDFormatType.NO_UPPER_SPACE != dateTimeJsonFormat.value) { - obj.getString(dateTimeJsonFormat.value) - } else { - obj.getString() - } - } + // 根据注解中的 base 和 value 属性选择合适的字符串表示方式 + return if (BaseType.BASE16 != dateTimeJsonFormat.base) { + obj.getString(dateTimeJsonFormat.base) + } else if (UUIDFormatType.NO_UPPER_SPACE != dateTimeJsonFormat.value) { + obj.getString(dateTimeJsonFormat.value) + } else { + obj.getString() + } + } - /** - * 将字符串反序列化为 UUID 对象。 - * - * @param obj 需要反序列化的字符串,可能为 null 或空。 - * @param annotationGetter 用于获取注解信息的对象。 - * @return 反序列化后的 UUID 对象,如果输入无效则返回 null。 - */ - override fun deConvert( - obj: String?, - annotationGetter: AnnotationGetter - ): UUID? { - // 如果输入字符串为 null 或空,直接返回 null - if (obj.isNullish()) return null + /** + * 将字符串反序列化为 UUID 对象。 + * + * @param obj 需要反序列化的字符串,可能为 null 或空。 + * @param annotationGetter 用于获取注解信息的对象。 + * @return 反序列化后的 UUID 对象,如果输入无效则返回 null。 + */ + override fun deConvert( + obj: String?, + annotationGetter: AnnotationGetter, + ): UUID? { + // 如果输入字符串为 null 或空,直接返回 null + if (obj.isNullish()) return null - // 获取 UUIDJsonFormat 注解信息,若未找到则使用默认解析方式 - val dateTimeJsonFormat: UUIDJsonFormat = annotationGetter.get() ?: return UUID.of(obj) + // 获取 UUIDJsonFormat 注解信息,若未找到则使用默认解析方式 + val dateTimeJsonFormat: UUIDJsonFormat = annotationGetter.get() ?: return UUID.of(obj) - // 根据注解中的 base 属性选择合适的解析方式 - return if (BaseType.BASE16 != dateTimeJsonFormat.base) { - UUID.of(obj, dateTimeJsonFormat.base) - } else { - UUID.of(obj) - } - } + // 根据注解中的 base 属性选择合适的解析方式 + return if (BaseType.BASE16 != dateTimeJsonFormat.base) { + UUID.of(obj, dateTimeJsonFormat.base) + } else { + UUID.of(obj) + } + } - /** - * 返回当前转换器支持的目标类型引用。 - * - * @return 表示 UUID 类型的 JsonTypeReference 对象。 - */ - override fun getFromType() = JsonTypeReference.of() + /** + * 返回当前转换器支持的目标类型引用。 + * + * @return 表示 UUID 类型的 JsonTypeReference 对象。 + */ + override fun getFromType() = JsonTypeReference.of() } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/AnnotationGetter.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/AnnotationGetter.kt index 504d562..2087426 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/AnnotationGetter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/AnnotationGetter.kt @@ -27,56 +27,56 @@ package com.mingliqiye.utils.json.converters.base * 提供了一个通用方法来根据注解类型获取对应的注解实例。 */ interface AnnotationGetter { - /** - * 根据指定的注解类型获取该类型的注解实例。 - * - * @param clazz 注解的Class对象,表示要获取的注解类型。 - * @return 返回对应类型的注解实例,如果未找到则返回null。 - */ - fun get(clazz: Class): T? + /** + * 根据指定的注解类型获取该类型的注解实例。 + * + * @param clazz 注解的Class对象,表示要获取的注解类型。 + * @return 返回对应类型的注解实例,如果未找到则返回null。 + */ + fun get(clazz: Class): T? - companion object { - /** - * 使用内联函数和重ified类型参数简化注解获取操作。 - * 通过传入泛型参数自动推断注解类型,避免手动传递Class对象。 - * - * @param T 注解类型,必须继承自Annotation。 - * @return 返回对应类型的注解实例,如果未找到则返回null。 - */ - inline fun AnnotationGetter.get(): T? = this.get(T::class.java) + companion object { + /** + * 使用内联函数和重ified类型参数简化注解获取操作。 + * 通过传入泛型参数自动推断注解类型,避免手动传递Class对象。 + * + * @param T 注解类型,必须继承自Annotation。 + * @return 返回对应类型的注解实例,如果未找到则返回null。 + */ + inline fun AnnotationGetter.get(): T? = this.get(T::class.java) - /** - * 提供一个默认实现,始终返回null。 - * 可用于需要空注解获取器的场景。 - */ - val nullGetter = object : AnnotationGetter { - /** - * 始终返回null,不执行任何实际逻辑。 - * - * @param clazz 注解的Class对象(未使用)。 - * @return 始终返回null。 - */ - override fun get(clazz: Class): T? = null - } + /** + * 提供一个默认实现,始终返回null。 + * 可用于需要空注解获取器的场景。 + */ + val nullGetter = object : AnnotationGetter { + /** + * 始终返回null,不执行任何实际逻辑。 + * + * @param clazz 注解的Class对象(未使用)。 + * @return 始终返回null。 + */ + override fun get(clazz: Class): T? = null + } - /** - * 创建一个AnnotationGetter对象,用于根据指定的注解类型获取对应的注解实例。 - * - * @param annotation 要包装的注解实例,作为内部逻辑的来源。 - * @return 返回一个实现了AnnotationGetter接口的匿名对象。 - */ - fun oneGetter(annotation: Annotation) = object : AnnotationGetter { - /** - * 根据传入的注解类型clazz,尝试返回与annotation匹配的注解实例。 - * - * @param clazz 目标注解类型的Class对象。 - * @return 如果annotation的类型与clazz一致,则返回annotation转换为T类型的实例;否则返回null。 - */ - @Suppress("UNCHECKED_CAST") - override fun get(clazz: Class): T? = - if (annotation.javaClass == clazz) annotation as T else null - } + /** + * 创建一个AnnotationGetter对象,用于根据指定的注解类型获取对应的注解实例。 + * + * @param annotation 要包装的注解实例,作为内部逻辑的来源。 + * @return 返回一个实现了AnnotationGetter接口的匿名对象。 + */ + fun oneGetter(annotation: Annotation) = object : AnnotationGetter { + /** + * 根据传入的注解类型clazz,尝试返回与annotation匹配的注解实例。 + * + * @param clazz 目标注解类型的Class对象。 + * @return 如果annotation的类型与clazz一致,则返回annotation转换为T类型的实例;否则返回null。 + */ + @Suppress("UNCHECKED_CAST") + override fun get(clazz: Class): T? = + if (annotation.javaClass == clazz) annotation as T else null + } - } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonBigDecimalConverter.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonBigDecimalConverter.kt index fc12e1d..00f58db 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonBigDecimalConverter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonBigDecimalConverter.kt @@ -35,15 +35,15 @@ import java.math.BigDecimal */ interface BaseJsonBigDecimalConverter : BaseJsonConverter { - /** - * 获取目标类型的引用信息。 - * - * 该方法返回一个 [JsonTypeReference] 对象,表示目标类型为 [BigDecimal]。 - * 通过调用 [JsonTypeReference.Companion.of] 方法创建类型引用。 - * - * @return 目标类型 [BigDecimal] 的类型引用。 - * @throws Exception 如果在获取类型引用时发生异常。 - */ - @Throws(Exception::class) - override fun getToType() = JsonTypeReference.of() + /** + * 获取目标类型的引用信息。 + * + * 该方法返回一个 [JsonTypeReference] 对象,表示目标类型为 [BigDecimal]。 + * 通过调用 [JsonTypeReference.Companion.of] 方法创建类型引用。 + * + * @return 目标类型 [BigDecimal] 的类型引用。 + * @throws Exception 如果在获取类型引用时发生异常。 + */ + @Throws(Exception::class) + override fun getToType() = JsonTypeReference.of() } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonBigIntegerConverter.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonBigIntegerConverter.kt index 2019ea6..265099f 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonBigIntegerConverter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonBigIntegerConverter.kt @@ -33,13 +33,13 @@ import java.math.BigInteger */ interface BaseJsonBigIntegerConverter : BaseJsonConverter { - /** - * 获取目标类型的引用,用于 JSON 反序列化时确定目标类型。 - * 该方法重写了父接口中的 [getToType] 方法,并返回 `BigInteger` 类型的引用。 - * - * @return 返回 [JsonTypeReference] 对象,表示 `BigInteger` 类型的引用。 - * @throws Exception 如果在获取类型引用过程中发生异常,则抛出该异常。 - */ - @Throws(Exception::class) - override fun getToType() = JsonTypeReference.of() + /** + * 获取目标类型的引用,用于 JSON 反序列化时确定目标类型。 + * 该方法重写了父接口中的 [getToType] 方法,并返回 `BigInteger` 类型的引用。 + * + * @return 返回 [JsonTypeReference] 对象,表示 `BigInteger` 类型的引用。 + * @throws Exception 如果在获取类型引用过程中发生异常,则抛出该异常。 + */ + @Throws(Exception::class) + override fun getToType() = JsonTypeReference.of() } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonBooleanConverter.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonBooleanConverter.kt index 182c371..37efe87 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonBooleanConverter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonBooleanConverter.kt @@ -32,15 +32,15 @@ import com.mingliqiye.utils.json.api.type.JsonTypeReference */ interface BaseJsonBooleanConverter : BaseJsonConverter { - /** - * 获取目标类型的引用信息。 - * - * 该方法返回一个 [JsonTypeReference] 对象,表示目标类型为 [Boolean]。 - * 此方法重写了父接口中的定义,并通过 [JsonTypeReference.Companion.of] 方法获取布尔类型的引用。 - * - * @return [JsonTypeReference] 表示布尔类型的引用。 - * @throws Exception 如果在获取类型引用时发生异常,则抛出此异常。 - */ - @Throws(Exception::class) - override fun getToType() = JsonTypeReference.of() + /** + * 获取目标类型的引用信息。 + * + * 该方法返回一个 [JsonTypeReference] 对象,表示目标类型为 [Boolean]。 + * 此方法重写了父接口中的定义,并通过 [JsonTypeReference.Companion.of] 方法获取布尔类型的引用。 + * + * @return [JsonTypeReference] 表示布尔类型的引用。 + * @throws Exception 如果在获取类型引用时发生异常,则抛出此异常。 + */ + @Throws(Exception::class) + override fun getToType() = JsonTypeReference.of() } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonByteConverter.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonByteConverter.kt index 4a5274a..e268740 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonByteConverter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonByteConverter.kt @@ -32,12 +32,12 @@ import com.mingliqiye.utils.json.api.type.JsonTypeReference * @param E 泛型参数,表示需要转换的目标对象类型。 */ interface BaseJsonByteConverter : BaseJsonConverter { - /** - * 获取目标类型的引用,用于标识转换的目标类型为 Byte。 - * - * @return 返回 JsonTypeReference 类型的实例,表示目标类型为 Byte。 - * @throws Exception 如果在获取类型引用过程中发生异常,则抛出该异常。 - */ - @Throws(Exception::class) - override fun getToType() = JsonTypeReference.of() + /** + * 获取目标类型的引用,用于标识转换的目标类型为 Byte。 + * + * @return 返回 JsonTypeReference 类型的实例,表示目标类型为 Byte。 + * @throws Exception 如果在获取类型引用过程中发生异常,则抛出该异常。 + */ + @Throws(Exception::class) + override fun getToType() = JsonTypeReference.of() } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonDoubleConverter.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonDoubleConverter.kt index 1ea472c..ab47938 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonDoubleConverter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonDoubleConverter.kt @@ -31,12 +31,12 @@ import com.mingliqiye.utils.json.api.type.JsonTypeReference */ interface BaseJsonDoubleConverter : BaseJsonConverter { - /** - * 获取目标类型的引用,用于标识转换的目标类型为 Double。 - * - * @return 返回 JsonTypeReference 类型的实例,表示目标类型为 Double。 - * @throws Exception 如果在获取类型引用时发生异常,则抛出该异常。 - */ - @Throws(Exception::class) - override fun getToType() = JsonTypeReference.of() + /** + * 获取目标类型的引用,用于标识转换的目标类型为 Double。 + * + * @return 返回 JsonTypeReference 类型的实例,表示目标类型为 Double。 + * @throws Exception 如果在获取类型引用时发生异常,则抛出该异常。 + */ + @Throws(Exception::class) + override fun getToType() = JsonTypeReference.of() } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonFloatConverter.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonFloatConverter.kt index dbca332..6eb0d10 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonFloatConverter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonFloatConverter.kt @@ -32,15 +32,15 @@ import com.mingliqiye.utils.json.api.type.JsonTypeReference */ interface BaseJsonFloatConverter : BaseJsonConverter { - /** - * 获取目标类型的引用信息。 - * - * 该方法重写了父接口中的 [getToType] 方法,返回 [Float] 类型的 [JsonTypeReference] 实例。 - * 用于标识当前转换器的目标类型为 [Float]。 - * - * @return [JsonTypeReference] 表示 [Float] 类型的引用信息。 - * @throws Exception 如果在获取类型引用时发生异常,则抛出此异常。 - */ - @Throws(Exception::class) - override fun getToType() = JsonTypeReference.of() + /** + * 获取目标类型的引用信息。 + * + * 该方法重写了父接口中的 [getToType] 方法,返回 [Float] 类型的 [JsonTypeReference] 实例。 + * 用于标识当前转换器的目标类型为 [Float]。 + * + * @return [JsonTypeReference] 表示 [Float] 类型的引用信息。 + * @throws Exception 如果在获取类型引用时发生异常,则抛出此异常。 + */ + @Throws(Exception::class) + override fun getToType() = JsonTypeReference.of() } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonIntConverter.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonIntConverter.kt index 2a2354a..a5eeabb 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonIntConverter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonIntConverter.kt @@ -32,15 +32,15 @@ import com.mingliqiye.utils.json.api.type.JsonTypeReference */ interface BaseJsonIntConverter : BaseJsonConverter { - /** - * 获取目标类型的引用信息。 - * - * 该方法重写了父接口中的 [getToType] 方法,返回 [Int] 类型的 [JsonTypeReference] 实例。 - * 用于标识当前转换器的目标类型为 [Int]。 - * - * @return 返回 [JsonTypeReference] 的实例,表示目标类型为 [Int]。 - * @throws Exception 如果在获取类型引用时发生异常,则抛出该异常。 - */ - @Throws(Exception::class) - override fun getToType() = JsonTypeReference.of() + /** + * 获取目标类型的引用信息。 + * + * 该方法重写了父接口中的 [getToType] 方法,返回 [Int] 类型的 [JsonTypeReference] 实例。 + * 用于标识当前转换器的目标类型为 [Int]。 + * + * @return 返回 [JsonTypeReference] 的实例,表示目标类型为 [Int]。 + * @throws Exception 如果在获取类型引用时发生异常,则抛出该异常。 + */ + @Throws(Exception::class) + override fun getToType() = JsonTypeReference.of() } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonLongConverter.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonLongConverter.kt index de1873b..aac37cf 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonLongConverter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonLongConverter.kt @@ -32,12 +32,12 @@ import com.mingliqiye.utils.json.api.type.JsonTypeReference */ interface BaseJsonLongConverter : BaseJsonConverter { - /** - * 获取目标类型的引用,用于标识此转换器的目标类型为 [Long]。 - * - * @return 返回 [JsonTypeReference] 的实例,表示目标类型为 [Long]。 - * @throws Exception 如果在获取类型引用时发生异常,则抛出此异常。 - */ - @Throws(Exception::class) - override fun getToType() = JsonTypeReference.of() + /** + * 获取目标类型的引用,用于标识此转换器的目标类型为 [Long]。 + * + * @return 返回 [JsonTypeReference] 的实例,表示目标类型为 [Long]。 + * @throws Exception 如果在获取类型引用时发生异常,则抛出此异常。 + */ + @Throws(Exception::class) + override fun getToType() = JsonTypeReference.of() } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonShortConverter.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonShortConverter.kt index 4f13d70..843e694 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonShortConverter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonShortConverter.kt @@ -32,15 +32,15 @@ import com.mingliqiye.utils.json.api.type.JsonTypeReference */ interface BaseJsonShortConverter : BaseJsonConverter { - /** - * 获取目标类型的引用信息。 - * - * 该方法重写了父接口中的 [getToType] 方法,返回 [Short] 类型的 [JsonTypeReference] 实例。 - * 通过 [JsonTypeReference.Companion.of] 方法创建类型引用。 - * - * @return [JsonTypeReference] 表示 [Short] 类型的引用。 - * @throws Exception 如果在获取类型引用过程中发生异常,则抛出该异常。 - */ - @Throws(Exception::class) - override fun getToType() = JsonTypeReference.of() + /** + * 获取目标类型的引用信息。 + * + * 该方法重写了父接口中的 [getToType] 方法,返回 [Short] 类型的 [JsonTypeReference] 实例。 + * 通过 [JsonTypeReference.Companion.of] 方法创建类型引用。 + * + * @return [JsonTypeReference] 表示 [Short] 类型的引用。 + * @throws Exception 如果在获取类型引用过程中发生异常,则抛出该异常。 + */ + @Throws(Exception::class) + override fun getToType() = JsonTypeReference.of() } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonStringConverter.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonStringConverter.kt index eeaff15..a22ac6a 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonStringConverter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/BaseJsonStringConverter.kt @@ -32,15 +32,15 @@ import com.mingliqiye.utils.json.api.type.JsonTypeReference */ interface BaseJsonStringConverter : BaseJsonConverter { - /** - * 获取目标类型的引用信息。 - * - * 该方法重写了父接口中的 [getToType] 方法,返回一个表示 [String] 类型的 [JsonTypeReference] 实例。 - * 此方法可能抛出异常,因此使用 [@Throws(Exception::class)] 注解标记。 - * - * @return 返回一个 [JsonTypeReference] 实例,表示目标类型为 [String]。 - * @throws Exception 如果在获取类型引用时发生错误,则抛出此异常。 - */ - @Throws(Exception::class) - override fun getToType() = JsonTypeReference.of() + /** + * 获取目标类型的引用信息。 + * + * 该方法重写了父接口中的 [getToType] 方法,返回一个表示 [String] 类型的 [JsonTypeReference] 实例。 + * 此方法可能抛出异常,因此使用 [@Throws(Exception::class)] 注解标记。 + * + * @return 返回一个 [JsonTypeReference] 实例,表示目标类型为 [String]。 + * @throws Exception 如果在获取类型引用时发生错误,则抛出此异常。 + */ + @Throws(Exception::class) + override fun getToType() = JsonTypeReference.of() } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JackJson3Deserializer.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JackJson3Deserializer.kt index 955d926..d5f065d 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JackJson3Deserializer.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JackJson3Deserializer.kt @@ -30,33 +30,33 @@ import tools.jackson.databind.ValueDeserializer class JackJson3Deserializer( - val property: BeanProperty? = null, - val jsonConverter: JsonConverter + val property: BeanProperty? = null, + val jsonConverter: JsonConverter, ) : ValueDeserializer() { - override fun deserialize( - p: JsonParser, - ctxt: DeserializationContext? - ): F? { - if (p.currentToken() == JsonToken.VALUE_NULL) return null - return jsonConverter.deConvert(p.readValueAs(jsonConverter.getToClass()), object : AnnotationGetter { - override fun get(clazz: Class): T? = property?.getAnnotation(clazz) - }) - } + override fun deserialize( + p: JsonParser, + ctxt: DeserializationContext?, + ): F? { + if (p.currentToken() == JsonToken.VALUE_NULL) return null + return jsonConverter.deConvert(p.readValueAs(jsonConverter.getToClass()), object : AnnotationGetter { + override fun get(clazz: Class): T? = property?.getAnnotation(clazz) + }) + } - /** - * 上下文感知方法:设置当前属性信息。 - * - * @param ctxt 反序列化上下文,可选参数。 - * @param property 当前属性信息。 - * @return 返回当前反序列化器实例。 - */ - override fun createContextual( - ctxt: DeserializationContext?, - property: BeanProperty? - ): JackJson3Deserializer { - return JackJson3Deserializer(property, jsonConverter) - } + /** + * 上下文感知方法:设置当前属性信息。 + * + * @param ctxt 反序列化上下文,可选参数。 + * @param property 当前属性信息。 + * @return 返回当前反序列化器实例。 + */ + override fun createContextual( + ctxt: DeserializationContext?, + property: BeanProperty?, + ): JackJson3Deserializer { + return JackJson3Deserializer(property, jsonConverter) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JackJson3Serializer.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JackJson3Serializer.kt index bbc969c..242bf68 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JackJson3Serializer.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JackJson3Serializer.kt @@ -29,38 +29,38 @@ import java.math.BigDecimal import java.math.BigInteger class JackJson3Serializer( - val property: BeanProperty? = null, - val jsonConverter: JsonConverter + val property: BeanProperty? = null, + val jsonConverter: JsonConverter, ) : ValueSerializer() { - /** - * 序列化方法:将源对象转换为目标对象,并根据目标对象的类型写入 JSON。 - * - * @param value 源对象,可能为 null。 - * @param gen JSON 生成器,用于写入 JSON 数据。 - * @param provider 序列化提供者,可选参数。 - */ - override fun serialize(value: F, gen: tools.jackson.core.JsonGenerator, ctxt: SerializationContext) { - val data: T? = jsonConverter.convert(value, object : AnnotationGetter { - override fun get(clazz: Class): T? = property?.getAnnotation(clazz) - }) - when (data) { - null -> gen.writeNull() - is String -> gen.writeString(data) - is Long -> gen.writeNumber(data) - is Short -> gen.writeNumber(data) - is Byte -> gen.writeNumber(data.toShort()) - is Int -> gen.writeNumber(data) - is BigDecimal -> gen.writeNumber(data) - is BigInteger -> gen.writeNumber(data) - is Float -> gen.writeNumber(data) - is Double -> gen.writeNumber(data) - is Boolean -> gen.writeBoolean(data) - else -> throw IllegalArgumentException("not sport data type ${data.javaClass} $data") - } - } + /** + * 序列化方法:将源对象转换为目标对象,并根据目标对象的类型写入 JSON。 + * + * @param value 源对象,可能为 null。 + * @param gen JSON 生成器,用于写入 JSON 数据。 + * @param provider 序列化提供者,可选参数。 + */ + override fun serialize(value: F, gen: tools.jackson.core.JsonGenerator, ctxt: SerializationContext) { + val data: T? = jsonConverter.convert(value, object : AnnotationGetter { + override fun get(clazz: Class): T? = property?.getAnnotation(clazz) + }) + when (data) { + null -> gen.writeNull() + is String -> gen.writeString(data) + is Long -> gen.writeNumber(data) + is Short -> gen.writeNumber(data) + is Byte -> gen.writeNumber(data.toShort()) + is Int -> gen.writeNumber(data) + is BigDecimal -> gen.writeNumber(data) + is BigInteger -> gen.writeNumber(data) + is Float -> gen.writeNumber(data) + is Double -> gen.writeNumber(data) + is Boolean -> gen.writeBoolean(data) + else -> throw IllegalArgumentException("not sport data type ${data.javaClass} $data") + } + } - override fun createContextual(ctxt: SerializationContext?, property: BeanProperty?): ValueSerializer<*> { - return JackJson3Serializer(property, jsonConverter) - } + override fun createContextual(ctxt: SerializationContext?, property: BeanProperty?): ValueSerializer<*> { + return JackJson3Serializer(property, jsonConverter) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JackJsonDeserializer.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JackJsonDeserializer.kt index 854bf6f..f03db7d 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JackJsonDeserializer.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JackJsonDeserializer.kt @@ -30,30 +30,30 @@ import com.fasterxml.jackson.databind.JsonDeserializer import com.fasterxml.jackson.databind.deser.ContextualDeserializer class JackJsonDeserializer( - val property: BeanProperty? = null, - val jsonConverter: JsonConverter + val property: BeanProperty? = null, + val jsonConverter: JsonConverter, ) : JsonDeserializer(), ContextualDeserializer { - override fun deserialize( - p: JsonParser, - ctxt: DeserializationContext? - ): F? { - if (p.currentToken == JsonToken.VALUE_NULL) return null - return jsonConverter.deConvert(p.readValueAs(jsonConverter.getToClass()), object : AnnotationGetter { - override fun get(clazz: Class): T? = property?.getAnnotation(clazz) - }) - } + override fun deserialize( + p: JsonParser, + ctxt: DeserializationContext?, + ): F? { + if (p.currentToken == JsonToken.VALUE_NULL) return null + return jsonConverter.deConvert(p.readValueAs(jsonConverter.getToClass()), object : AnnotationGetter { + override fun get(clazz: Class): T? = property?.getAnnotation(clazz) + }) + } - /** - * 上下文感知方法:设置当前属性信息。 - * - * @param ctxt 反序列化上下文,可选参数。 - * @param property 当前属性信息。 - * @return 返回当前反序列化器实例。 - */ - override fun createContextual( - ctxt: DeserializationContext?, - property: BeanProperty? - ): JackJsonDeserializer { - return JackJsonDeserializer(property, jsonConverter) - } + /** + * 上下文感知方法:设置当前属性信息。 + * + * @param ctxt 反序列化上下文,可选参数。 + * @param property 当前属性信息。 + * @return 返回当前反序列化器实例。 + */ + override fun createContextual( + ctxt: DeserializationContext?, + property: BeanProperty?, + ): JackJsonDeserializer { + return JackJsonDeserializer(property, jsonConverter) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JackJsonSerializer.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JackJsonSerializer.kt index 63c964c..9df85dc 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JackJsonSerializer.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JackJsonSerializer.kt @@ -31,55 +31,55 @@ import java.math.BigDecimal import java.math.BigInteger class JackJsonSerializer( - val property: BeanProperty?, - val jsonConverter: JsonConverter + val property: BeanProperty?, + val jsonConverter: JsonConverter, ) : JsonSerializer(), ContextualSerializer { - /** - * 序列化方法:将源对象转换为目标对象,并根据目标对象的类型写入 JSON。 - * - * @param value 源对象,可能为 null。 - * @param gen JSON 生成器,用于写入 JSON 数据。 - * @param provider 序列化提供者,可选参数。 - */ - override fun serialize( - value: F?, - gen: JsonGenerator, - provider: SerializerProvider? - ) { - // 执行转换逻辑 - val data: T? = jsonConverter.convert(value, object : AnnotationGetter { - override fun get(clazz: Class): T? = property?.getAnnotation(clazz) - }) + /** + * 序列化方法:将源对象转换为目标对象,并根据目标对象的类型写入 JSON。 + * + * @param value 源对象,可能为 null。 + * @param gen JSON 生成器,用于写入 JSON 数据。 + * @param provider 序列化提供者,可选参数。 + */ + override fun serialize( + value: F?, + gen: JsonGenerator, + provider: SerializerProvider?, + ) { + // 执行转换逻辑 + val data: T? = jsonConverter.convert(value, object : AnnotationGetter { + override fun get(clazz: Class): T? = property?.getAnnotation(clazz) + }) - // 根据目标对象的类型写入对应的 JSON 值 - when (data) { - null -> gen.writeNull() - is String -> gen.writeString(data) - is Long -> gen.writeNumber(data) - is Short -> gen.writeNumber(data) - is Byte -> gen.writeNumber(data.toShort()) - is Int -> gen.writeNumber(data) - is BigDecimal -> gen.writeNumber(data) - is BigInteger -> gen.writeNumber(data) - is Float -> gen.writeNumber(data) - is Double -> gen.writeNumber(data) - is Boolean -> gen.writeBoolean(data) - else -> throw IllegalArgumentException("not sport data type ${data.javaClass} $data") - } - } + // 根据目标对象的类型写入对应的 JSON 值 + when (data) { + null -> gen.writeNull() + is String -> gen.writeString(data) + is Long -> gen.writeNumber(data) + is Short -> gen.writeNumber(data) + is Byte -> gen.writeNumber(data.toShort()) + is Int -> gen.writeNumber(data) + is BigDecimal -> gen.writeNumber(data) + is BigInteger -> gen.writeNumber(data) + is Float -> gen.writeNumber(data) + is Double -> gen.writeNumber(data) + is Boolean -> gen.writeBoolean(data) + else -> throw IllegalArgumentException("not sport data type ${data.javaClass} $data") + } + } - /** - * 上下文感知方法:设置当前属性信息。 - * - * @param prov 序列化提供者,可选参数。 - * @param property 当前属性信息。 - * @return 返回当前序列化器实例。 - */ - override fun createContextual( - prov: SerializerProvider?, - property: BeanProperty? - ): JsonSerializer { - return JackJsonSerializer(property, jsonConverter) - } + /** + * 上下文感知方法:设置当前属性信息。 + * + * @param prov 序列化提供者,可选参数。 + * @param property 当前属性信息。 + * @return 返回当前序列化器实例。 + */ + override fun createContextual( + prov: SerializerProvider?, + property: BeanProperty?, + ): JsonSerializer { + return JackJsonSerializer(property, jsonConverter) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JsonConverter.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JsonConverter.kt index d14ed29..ad13ea9 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JsonConverter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JsonConverter.kt @@ -31,61 +31,61 @@ import com.mingliqiye.utils.json.api.type.JsonTypeReference * @param T 目标类型,表示转换后的对象类型。 */ interface JsonConverter { - /** - * 将源对象转换为目标对象。 - * - * @param obj 源对象,可能为 null。 - * @param annotationGetter 注解获取器,用于获取字段上的注解信息。 - * @return 转换后的目标对象,可能为 null。 - * @throws Exception 转换过程中可能抛出的异常。 - */ - @Throws(Exception::class) - fun convert(obj: F?, annotationGetter: AnnotationGetter): T? + /** + * 将源对象转换为目标对象。 + * + * @param obj 源对象,可能为 null。 + * @param annotationGetter 注解获取器,用于获取字段上的注解信息。 + * @return 转换后的目标对象,可能为 null。 + * @throws Exception 转换过程中可能抛出的异常。 + */ + @Throws(Exception::class) + fun convert(obj: F?, annotationGetter: AnnotationGetter): T? - /** - * 将目标对象反向转换为源对象。 - * - * @param obj 目标对象,可能为 null。 - * @param annotationGetter 注解获取器,用于获取字段上的注解信息。 - * @return 反向转换后的源对象,可能为 null。 - * @throws Exception 转换过程中可能抛出的异常。 - */ - @Throws(Exception::class) - fun deConvert(obj: T?, annotationGetter: AnnotationGetter): F? + /** + * 将目标对象反向转换为源对象。 + * + * @param obj 目标对象,可能为 null。 + * @param annotationGetter 注解获取器,用于获取字段上的注解信息。 + * @return 反向转换后的源对象,可能为 null。 + * @throws Exception 转换过程中可能抛出的异常。 + */ + @Throws(Exception::class) + fun deConvert(obj: T?, annotationGetter: AnnotationGetter): F? - /** - * 获取源类型的类型引用。 - * - * @return 源类型的 JsonTypeReference 对象。 - * @throws Exception 获取过程中可能抛出的异常。 - */ - @Throws(Exception::class) - fun getFromType(): JsonTypeReference + /** + * 获取源类型的类型引用。 + * + * @return 源类型的 JsonTypeReference 对象。 + * @throws Exception 获取过程中可能抛出的异常。 + */ + @Throws(Exception::class) + fun getFromType(): JsonTypeReference - /** - * 获取目标类型的类型引用。 - * - * @return 目标类型的 JsonTypeReference 对象。 - * @throws Exception 获取过程中可能抛出的异常。 - */ - @Throws(Exception::class) - fun getToType(): JsonTypeReference + /** + * 获取目标类型的类型引用。 + * + * @return 目标类型的 JsonTypeReference 对象。 + * @throws Exception 获取过程中可能抛出的异常。 + */ + @Throws(Exception::class) + fun getToType(): JsonTypeReference - /** - * 获取源类型的原始类。 - * - * @return 源类型的 Class 对象。 - * @throws Exception 获取过程中可能抛出的异常。 - */ - @Throws(Exception::class) - fun getFromClass() = getFromType().getRawType() + /** + * 获取源类型的原始类。 + * + * @return 源类型的 Class 对象。 + * @throws Exception 获取过程中可能抛出的异常。 + */ + @Throws(Exception::class) + fun getFromClass() = getFromType().getRawType() - /** - * 获取目标类型的原始类。 - * - * @return 目标类型的 Class 对象。 - * @throws Exception 获取过程中可能抛出的异常。 - */ - @Throws(Exception::class) - fun getToClass() = getToType().getRawType() + /** + * 获取目标类型的原始类。 + * + * @return 目标类型的 Class 对象。 + * @throws Exception 获取过程中可能抛出的异常。 + */ + @Throws(Exception::class) + fun getToClass() = getToType().getRawType() } diff --git a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JsonConverterUtils.kt b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JsonConverterUtils.kt index ccf0ab5..63485fe 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JsonConverterUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/converters/base/JsonConverterUtils.kt @@ -37,36 +37,36 @@ val log = MingLiLoggerFactory.getLogger("com.mingliqiye.utils.json.converters.ba * @return 返回与给定类型对应的Class对象;如果无法解析,则返回null。 */ fun getClass(type: Type?): Class<*>? { - // 尝试将type直接转换为Class类型,如果失败则检查是否为ParameterizedType - val clazz: Class<*>? = type as? Class<*> ?: if (type is ParameterizedType) { - // 如果是ParameterizedType,则递归获取其原始类型 - getClass(type.rawType) - } else { - null - } - return clazz + // 尝试将type直接转换为Class类型,如果失败则检查是否为ParameterizedType + val clazz: Class<*>? = type as? Class<*> ?: if (type is ParameterizedType) { + // 如果是ParameterizedType,则递归获取其原始类型 + getClass(type.rawType) + } else { + null + } + return clazz } inline fun > getJsonConverter(): T = getJsonConverter(T::class.java) @Suppress("UNCHECKED_CAST") fun > getJsonConverter(clazz: Class): T { - try { - return clazz.getDeclaredMethod( - "getJsonConverter" - ).invoke(null) as T - } catch (e: Exception) { - log.error("实现于 JsonConverter<*, *> 的类 必须实现静态方法 JsonConverter<*, *> getJsonConverter()", e) - throw e - } + try { + return clazz.getDeclaredMethod( + "getJsonConverter" + ).invoke(null) as T + } catch (e: Exception) { + log.error("实现于 JsonConverter<*, *> 的类 必须实现静态方法 JsonConverter<*, *> getJsonConverter()", e) + throw e + } } fun > com.fasterxml.jackson.databind.ObjectMapper.addJsonConverter(clazz: Class): com.fasterxml.jackson.databind.ObjectMapper = - this.registerModule(getJsonConverter(clazz).getJacksonModule()) + this.registerModule(getJsonConverter(clazz).getJacksonModule()) @JvmName("inline_addJsonConverter") inline fun > com.fasterxml.jackson.databind.ObjectMapper.addJsonConverter(): com.fasterxml.jackson.databind.ObjectMapper = - this.registerModule(getJsonConverter(T::class.java).getJacksonModule()) + this.registerModule(getJsonConverter(T::class.java).getJacksonModule()) /** * 创建并返回一个 Jackson 模块,该模块包含自定义的序列化器和反序列化器。 @@ -74,11 +74,11 @@ inline fun > com.fasterxml.jackson.databind. * @return 配置了自定义序列化器和反序列化器的 SimpleModule 对象。 */ fun JsonConverter.getJacksonModule(): com.fasterxml.jackson.databind.module.SimpleModule = - com.fasterxml.jackson.databind.module.SimpleModule("(${getFromClass().name})-(${getToClass().name})") - .addSerializer(getFromClass(), JackJsonSerializer(null, this)) - .addDeserializer(getFromClass(), JackJsonDeserializer(null, this)) + com.fasterxml.jackson.databind.module.SimpleModule("(${getFromClass().name})-(${getToClass().name})") + .addSerializer(getFromClass(), JackJsonSerializer(null, this)) + .addDeserializer(getFromClass(), JackJsonDeserializer(null, this)) fun JsonConverter.getJackson3Module(): tools.jackson.databind.module.SimpleModule = - tools.jackson.databind.module.SimpleModule("(${getFromClass().name})-(${getToClass().name})") - .addSerializer(getFromClass(), JackJson3Serializer(null, this)) - .addDeserializer(getFromClass(), JackJson3Deserializer(null, this)) + tools.jackson.databind.module.SimpleModule("(${getFromClass().name})-(${getToClass().name})") + .addSerializer(getFromClass(), JackJson3Serializer(null, this)) + .addDeserializer(getFromClass(), JackJson3Deserializer(null, this)) diff --git a/src/main/kotlin/com/mingliqiye/utils/json/objects/base/JsonObject.kt b/src/main/kotlin/com/mingliqiye/utils/json/objects/base/JsonObject.kt index 369e5bc..1140d60 100644 --- a/src/main/kotlin/com/mingliqiye/utils/json/objects/base/JsonObject.kt +++ b/src/main/kotlin/com/mingliqiye/utils/json/objects/base/JsonObject.kt @@ -30,146 +30,146 @@ import java.util.* * JSON 元素接口,定义所有 JSON 数据类型的通用操作 */ interface JsonItem { - /** - * 作为 JSON 对象返回 - * @throws IllegalStateException 如果不是对象类型 - */ - fun asObject(): JsonObject { - throw IllegalStateException("Current JSON element is ${name()} not a Object") - } + /** + * 作为 JSON 对象返回 + * @throws IllegalStateException 如果不是对象类型 + */ + fun asObject(): JsonObject { + throw IllegalStateException("Current JSON element is ${name()} not a Object") + } - /** - * 作为 JSON 数组返回 - * @throws IllegalStateException 如果不是数组类型 - */ - fun asArray(): JsonArray { - throw IllegalStateException("Current JSON element is ${name()} not a Array") - } + /** + * 作为 JSON 数组返回 + * @throws IllegalStateException 如果不是数组类型 + */ + fun asArray(): JsonArray { + throw IllegalStateException("Current JSON element is ${name()} not a Array") + } - /** - * 作为字符串返回 - * @throws IllegalStateException 如果不是字符串类型 - */ - fun asString(): String { - throw IllegalStateException("Current JSON element is ${name()} not a String") - } + /** + * 作为字符串返回 + * @throws IllegalStateException 如果不是字符串类型 + */ + fun asString(): String { + throw IllegalStateException("Current JSON element is ${name()} not a String") + } - /** - * 作为布尔值返回 - * @throws IllegalStateException 如果不是布尔类型 - */ - fun asBoolean(): Boolean { - throw IllegalStateException("Current JSON element is ${name()} not a Boolean") - } + /** + * 作为布尔值返回 + * @throws IllegalStateException 如果不是布尔类型 + */ + fun asBoolean(): Boolean { + throw IllegalStateException("Current JSON element is ${name()} not a Boolean") + } - /** - * 作为数字返回 - * @throws IllegalStateException 如果不是数字类型 - */ - fun asNumber(): JsonNumber { - throw IllegalStateException("Current JSON element is ${name()} not a Number") - } + /** + * 作为数字返回 + * @throws IllegalStateException 如果不是数字类型 + */ + fun asNumber(): JsonNumber { + throw IllegalStateException("Current JSON element is ${name()} not a Number") + } - /** - * 转换为 List 集合 - * @throws IllegalStateException 如果不是数组类型 - */ - fun toList(): List { - val it = asArray().iteratorArray() - val list = LinkedList() - it.forEach { item -> list.add(item.value) } - return list - } + /** + * 转换为 List 集合 + * @throws IllegalStateException 如果不是数组类型 + */ + fun toList(): List { + val it = asArray().iteratorArray() + val list = LinkedList() + it.forEach { item -> list.add(item.value) } + return list + } - /** - * 转换为 Map 集合 - * @throws IllegalStateException 如果不是对象类型 - */ - fun toMap(): Map { - val it = asObject().iteratorObject() - val map = LinkedHashMap() - it.forEach { item -> map[item.key] = item.value } - return map - } + /** + * 转换为 Map 集合 + * @throws IllegalStateException 如果不是对象类型 + */ + fun toMap(): Map { + val it = asObject().iteratorObject() + val map = LinkedHashMap() + it.forEach { item -> map[item.key] = item.value } + return map + } - /** 是否为 null */ - fun isNull(): Boolean = false + /** 是否为 null */ + fun isNull(): Boolean = false - /** 是否为布尔值 */ - fun isBoolean(): Boolean = false + /** 是否为布尔值 */ + fun isBoolean(): Boolean = false - /** 是否为数字 */ - fun isNumber(): Boolean = false + /** 是否为数字 */ + fun isNumber(): Boolean = false - /** 是否为字符串 */ - fun isString(): Boolean = false + /** 是否为字符串 */ + fun isString(): Boolean = false - /** 是否为对象 */ - fun isObject(): Boolean = false + /** 是否为对象 */ + fun isObject(): Boolean = false - /** 是否为数组 */ - fun isArray(): Boolean = false + /** 是否为数组 */ + fun isArray(): Boolean = false - /** 返回当前元素的类型名称 */ - fun name(): String = "Any" + /** 返回当前元素的类型名称 */ + fun name(): String = "Any" - /** 根据索引获取元素(数组专用) */ - fun get(index: Int): JsonItem = getIndex(index) + /** 根据索引获取元素(数组专用) */ + fun get(index: Int): JsonItem = getIndex(index) - /** 根据字段名获取元素(对象专用) */ - fun get(fieldName: String): JsonItem = getField(fieldName) + /** 根据字段名获取元素(对象专用) */ + fun get(fieldName: String): JsonItem = getField(fieldName) - /** - * 根据索引获取元素 - * @throws IllegalStateException 如果不是数组类型 - */ - fun getIndex(index: Int): JsonItem { - throw IllegalStateException("Current JSON element is ${name()} not a Array") - } + /** + * 根据索引获取元素 + * @throws IllegalStateException 如果不是数组类型 + */ + fun getIndex(index: Int): JsonItem { + throw IllegalStateException("Current JSON element is ${name()} not a Array") + } - /** - * 根据字段名获取元素 - * @throws IllegalStateException 如果不是对象类型 - */ - fun getField(name: String): JsonItem { - throw IllegalStateException("Current JSON element is ${name()} not a Object") - } + /** + * 根据字段名获取元素 + * @throws IllegalStateException 如果不是对象类型 + */ + fun getField(name: String): JsonItem { + throw IllegalStateException("Current JSON element is ${name()} not a Object") + } - /** - * 遍历数组元素 - * @param consumer 接收索引和元素的消费者函数 - */ - fun forEachArray(consumer: (Int, JsonItem) -> Unit) { - iteratorArray().forEach { - consumer(it.index, it.value) - } - } + /** + * 遍历数组元素 + * @param consumer 接收索引和元素的消费者函数 + */ + fun forEachArray(consumer: (Int, JsonItem) -> Unit) { + iteratorArray().forEach { + consumer(it.index, it.value) + } + } - /** - * 遍历对象字段 - * @param consumer 接收字段名和值的消费者函数 - */ - fun forEachObject(consumer: (String, JsonItem) -> Unit) { - iteratorObject().forEach { - consumer(it.key, it.value) - } - } + /** + * 遍历对象字段 + * @param consumer 接收字段名和值的消费者函数 + */ + fun forEachObject(consumer: (String, JsonItem) -> Unit) { + iteratorObject().forEach { + consumer(it.key, it.value) + } + } - /** - * 获取数组迭代器 - * @throws IllegalStateException 如果不是数组类型 - */ - fun iteratorArray(): Iterator> { - throw IllegalStateException("Current JSON element is ${name()} not a Array") - } + /** + * 获取数组迭代器 + * @throws IllegalStateException 如果不是数组类型 + */ + fun iteratorArray(): Iterator> { + throw IllegalStateException("Current JSON element is ${name()} not a Array") + } - /** - * 获取对象迭代器 - * @throws IllegalStateException 如果不是对象类型 - */ - fun iteratorObject(): Iterator> { - throw IllegalStateException("Current JSON element is ${name()} not a Object") - } + /** + * 获取对象迭代器 + * @throws IllegalStateException 如果不是对象类型 + */ + fun iteratorObject(): Iterator> { + throw IllegalStateException("Current JSON element is ${name()} not a Object") + } } /** @@ -177,20 +177,20 @@ interface JsonItem { * 表示键值对形式的 JSON 对象 {} */ abstract class JsonObject : JsonItem { - override fun isObject(): Boolean = true - override fun name(): String = "object" - override fun asObject(): JsonObject = this - override fun toString(): String = StringBuilder().apply { - append("{") - iteratorObject().forEach { - append(it.key) - append("=") - append(it.value) - append(",") - } - deleteCharAt(length - 1) - append("}") - }.toString() + override fun isObject(): Boolean = true + override fun name(): String = "object" + override fun asObject(): JsonObject = this + override fun toString(): String = StringBuilder().apply { + append("{") + iteratorObject().forEach { + append(it.key) + append("=") + append(it.value) + append(",") + } + deleteCharAt(length - 1) + append("}") + }.toString() } /** @@ -198,18 +198,18 @@ abstract class JsonObject : JsonItem { * 表示有序的 JSON 数组 [] */ abstract class JsonArray : JsonItem { - override fun isArray(): Boolean = true - override fun name(): String = "array" - override fun asArray() = this - override fun toString(): String = StringBuilder().apply { - append("[") - iteratorArray().forEach { - append(it.value) - append(",") - } - deleteCharAt(length - 1) - append("]") - }.toString() + override fun isArray(): Boolean = true + override fun name(): String = "array" + override fun asArray() = this + override fun toString(): String = StringBuilder().apply { + append("[") + iteratorArray().forEach { + append(it.value) + append(",") + } + deleteCharAt(length - 1) + append("]") + }.toString() } /** @@ -217,9 +217,9 @@ abstract class JsonArray : JsonItem { * 表示 JSON 中的 null 值 */ open class JsonNull : JsonItem { - override fun isNull(): Boolean = true - override fun name(): String = "null" - override fun toString(): String = "null" + override fun isNull(): Boolean = true + override fun name(): String = "null" + override fun toString(): String = "null" } /** @@ -228,26 +228,26 @@ open class JsonNull : JsonItem { * @param numberString 数字的字符串表示形式 */ open class JsonNumber(val numberString: String) : JsonItem, Number() { - override fun isNumber(): Boolean = true - override fun name(): String = "number" - override fun asNumber(): JsonNumber = this - override fun toDouble(): Double = numberString.toDouble() - override fun toFloat(): Float = numberString.toFloat() - override fun toLong(): Long = numberString.toLong() - override fun toInt(): Int = numberString.toInt() - override fun toShort(): Short = numberString.toShort() - override fun toByte(): Byte = numberString.toByte() + override fun isNumber(): Boolean = true + override fun name(): String = "number" + override fun asNumber(): JsonNumber = this + override fun toDouble(): Double = numberString.toDouble() + override fun toFloat(): Float = numberString.toFloat() + override fun toLong(): Long = numberString.toLong() + override fun toInt(): Int = numberString.toInt() + override fun toShort(): Short = numberString.toShort() + override fun toByte(): Byte = numberString.toByte() - /** 转换为 BigDecimal */ - open fun toBigDecimal(): BigDecimal = numberString.toBigDecimal() + /** 转换为 BigDecimal */ + open fun toBigDecimal(): BigDecimal = numberString.toBigDecimal() - /** 转换为指定精度的 BigDecimal */ - open fun toBigDecimal(scale: Int): BigDecimal = numberString.toBigDecimal().setScale(scale) + /** 转换为指定精度的 BigDecimal */ + open fun toBigDecimal(scale: Int): BigDecimal = numberString.toBigDecimal().setScale(scale) - /** 转换为 BigInteger */ - open fun toBigInteger(): BigInteger = numberString.toBigInteger() + /** 转换为 BigInteger */ + open fun toBigInteger(): BigInteger = numberString.toBigInteger() - override fun toString(): String = numberString + override fun toString(): String = numberString } /** @@ -255,13 +255,13 @@ open class JsonNumber(val numberString: String) : JsonItem, Number() { * @param value 字符串值 */ open class JsonString(val value: String) : JsonItem { - override fun isString(): Boolean = true - override fun name(): String = "string" - override fun asString(): String { - return value - } + override fun isString(): Boolean = true + override fun name(): String = "string" + override fun asString(): String { + return value + } - override fun toString(): String = value + override fun toString(): String = value } /** @@ -269,11 +269,11 @@ open class JsonString(val value: String) : JsonItem { * @param value 布尔值 */ open class JsonBoolean(val value: Boolean) : JsonItem { - override fun isBoolean(): Boolean = true - override fun name(): String = "boolean" - override fun asBoolean(): Boolean { - return value - } + override fun isBoolean(): Boolean = true + override fun name(): String = "boolean" + override fun asBoolean(): Boolean { + return value + } - override fun toString(): String = value.toString() + override fun toString(): String = value.toString() } diff --git a/src/main/kotlin/com/mingliqiye/utils/logger/MingLiLogger.kt b/src/main/kotlin/com/mingliqiye/utils/logger/MingLiLogger.kt index a5605fc..9391a37 100644 --- a/src/main/kotlin/com/mingliqiye/utils/logger/MingLiLogger.kt +++ b/src/main/kotlin/com/mingliqiye/utils/logger/MingLiLogger.kt @@ -26,341 +26,341 @@ import org.slf4j.Logger import org.slf4j.Marker class MingLiLogger(private val name: String) : Logger { - override fun getName(): String { - return name - } - - override fun isTraceEnabled(): Boolean { - return true - } - - override fun trace(msg: String?) { - msg?.let { toPrintln(it, MingLiLoggerLevel.TRACE) } - } - - override fun trace(format: String?, arg: Any?) { - format?.let { - val message = format1(it, arg) - toPrintln(message, MingLiLoggerLevel.TRACE) - } - } - - override fun trace(format: String?, arg1: Any?, arg2: Any?) { - format?.let { - val message = format2(it, arg1, arg2) - toPrintln(message, MingLiLoggerLevel.TRACE) - } - } - - override fun trace(format: String?, vararg arguments: Any?) { - format?.let { - val message = formatArray(it, arguments) - toPrintln(message, MingLiLoggerLevel.TRACE) - } - } - - override fun trace(msg: String?, t: Throwable?) { - msg?.let { - val message = if (t != null) "$it: ${t.message}" else it - toPrintln(message, MingLiLoggerLevel.TRACE) - } - } - - override fun isTraceEnabled(marker: Marker?): Boolean { - return true - } - - override fun trace(marker: Marker?, msg: String?) { - trace(msg) - } - - override fun trace(marker: Marker?, format: String?, arg: Any?) { - trace(format, arg) - } - - override fun trace(marker: Marker?, format: String?, arg1: Any?, arg2: Any?) { - trace(format, arg1, arg2) - } - - override fun trace(marker: Marker?, format: String?, vararg arguments: Any?) { - trace(format, *arguments) - } - - override fun trace(marker: Marker?, msg: String?, t: Throwable?) { - trace(msg, t) - } - - override fun isDebugEnabled(): Boolean { - return true - } - - override fun debug(msg: String?) { - msg?.let { toPrintln(it, MingLiLoggerLevel.DEBUG) } - } - - override fun debug(format: String?, arg: Any?) { - format?.let { - val message = format1(it, arg) - toPrintln(message, MingLiLoggerLevel.DEBUG) - } - } - - override fun debug(format: String?, arg1: Any?, arg2: Any?) { - format?.let { - val message = format2(it, arg1, arg2) - toPrintln(message, MingLiLoggerLevel.DEBUG) - } - } - - override fun debug(format: String?, vararg arguments: Any?) { - format?.let { - val message = formatArray(it, arguments) - toPrintln(message, MingLiLoggerLevel.DEBUG) - } - } - - override fun debug(msg: String?, t: Throwable?) { - msg?.let { - val message = if (t != null) "$it: ${t.message}" else it - toPrintln(message, MingLiLoggerLevel.DEBUG) - } - } - - override fun isDebugEnabled(marker: Marker?): Boolean { - return true - } - - override fun debug(marker: Marker?, msg: String?) { - debug(msg) - } - - override fun debug(marker: Marker?, format: String?, arg: Any?) { - debug(format, arg) - } - - override fun debug(marker: Marker?, format: String?, arg1: Any?, arg2: Any?) { - debug(format, arg1, arg2) - } - - override fun debug(marker: Marker?, format: String?, vararg arguments: Any?) { - debug(format, *arguments) - } - - override fun debug(marker: Marker?, msg: String?, t: Throwable?) { - debug(msg, t) - } - - override fun isInfoEnabled(): Boolean { - return true - } - - override fun info(msg: String?) { - msg?.let { toPrintln(it, MingLiLoggerLevel.INFO) } - } - - override fun info(format: String?, arg: Any?) { - format?.let { - val message = format1(it, arg) - toPrintln(message, MingLiLoggerLevel.INFO) - } - } - - override fun info(format: String?, arg1: Any?, arg2: Any?) { - format?.let { - val message = format2(it, arg1, arg2) - toPrintln(message, MingLiLoggerLevel.INFO) - } - } - - override fun info(format: String?, vararg arguments: Any?) { - format?.let { - val message = formatArray(it, arguments) - toPrintln(message, MingLiLoggerLevel.INFO) - } - } - - override fun info(msg: String?, t: Throwable?) { - msg?.let { - val message = if (t != null) "$it: ${t.message}" else it - toPrintln(message, MingLiLoggerLevel.INFO) - } - } - - override fun isInfoEnabled(marker: Marker?): Boolean { - return true - } - - override fun info(marker: Marker?, msg: String?) { - info(msg) - } - - override fun info(marker: Marker?, format: String?, arg: Any?) { - info(format, arg) - } - - override fun info(marker: Marker?, format: String?, arg1: Any?, arg2: Any?) { - info(format, arg1, arg2) - } - - override fun info(marker: Marker?, format: String?, vararg arguments: Any?) { - info(format, *arguments) - } - - override fun info(marker: Marker?, msg: String?, t: Throwable?) { - info(msg, t) - } - - override fun isWarnEnabled(): Boolean { - return true - } - - override fun warn(msg: String?) { - msg?.let { toPrintln(it, MingLiLoggerLevel.WARN) } - } - - override fun warn(format: String?, arg: Any?) { - format?.let { - val message = format1(it, arg) - toPrintln(message, MingLiLoggerLevel.WARN) - } - } - - override fun warn(format: String?, vararg arguments: Any?) { - format?.let { - val message = formatArray(it, arguments) - toPrintln(message, MingLiLoggerLevel.WARN) - } - } - - override fun warn(format: String?, arg1: Any?, arg2: Any?) { - format?.let { - val message = format2(it, arg1, arg2) - toPrintln(message, MingLiLoggerLevel.WARN) - } - } - - override fun warn(msg: String?, t: Throwable?) { - msg?.let { - val message = if (t != null) "$it: ${t.message}" else it - toPrintln(message, MingLiLoggerLevel.WARN) - } - } - - override fun isWarnEnabled(marker: Marker?): Boolean { - return true - } - - override fun warn(marker: Marker?, msg: String?) { - warn(msg) - } - - override fun warn(marker: Marker?, format: String?, arg: Any?) { - warn(format, arg) - } - - override fun warn(marker: Marker?, format: String?, arg1: Any?, arg2: Any?) { - warn(format, arg1, arg2) - } - - override fun warn(marker: Marker?, format: String?, vararg arguments: Any?) { - warn(format, *arguments) - } - - override fun warn(marker: Marker?, msg: String?, t: Throwable?) { - warn(msg, t) - } - - override fun isErrorEnabled(): Boolean { - return true - } - - override fun error(msg: String?) { - msg?.let { toPrintln(it, MingLiLoggerLevel.ERROR) } - } - - override fun error(format: String?, arg: Any?) { - format?.let { - val message = format1(it, arg) - toPrintln(message, MingLiLoggerLevel.ERROR) - } - } - - override fun error(format: String?, arg1: Any?, arg2: Any?) { - format?.let { - val message = format2(it, arg1, arg2) - toPrintln(message, MingLiLoggerLevel.ERROR) - } - } - - override fun error(format: String?, vararg arguments: Any?) { - format?.let { - val message = formatArray(it, arguments) - toPrintln(message, MingLiLoggerLevel.ERROR) - } - } - - override fun error(msg: String?, t: Throwable?) { - msg?.let { - toPrintln(it, MingLiLoggerLevel.ERROR) - } - } - - override fun isErrorEnabled(marker: Marker?): Boolean { - return true - } - - override fun error(marker: Marker?, msg: String?) { - error(msg) - } - - override fun error(marker: Marker?, format: String?, arg: Any?) { - error(format, arg) - } - - override fun error(marker: Marker?, format: String?, arg1: Any?, arg2: Any?) { - error(format, arg1, arg2) - } - - override fun error(marker: Marker?, format: String?, vararg arguments: Any?) { - error(format, *arguments) - } - - override fun error(marker: Marker?, msg: String?, t: Throwable?) { - error(msg, t) - } - - fun toPrintln(message: String, level: MingLiLoggerLevel) { - when (level) { - MingLiLoggerLevel.TRACE -> wirteToSteam("[TRACE] [$name] $message\n") - MingLiLoggerLevel.DEBUG -> wirteToSteam("[DEBUG] [$name] $message\n") - MingLiLoggerLevel.INFO -> wirteToSteam("[INFO] [$name] $message\n") - MingLiLoggerLevel.WARN -> wirteToSteam("[WARN] [$name] $message\n") - MingLiLoggerLevel.ERROR -> wirteToSteam("[ERROR] [$name] $message\n") - } - } - - fun wirteToSteam(string: String) { - System.out.write(string.toByteArray()) - } - - private fun format1(format: String, arg: Any?): String { - return if (format.contains("{}")) { - format.replaceFirst("{}", arg?.toString() ?: "null") - } else { - "$format $arg" - } - } - - private fun format2(format: String, arg1: Any?, arg2: Any?): String { - return format.replaceFirst("{}", arg1?.toString() ?: "null") - .replaceFirst("{}", arg2?.toString() ?: "null") - } - - private fun formatArray(format: String, arguments: Array): String { - var result = format - for (arg in arguments) { - result = result.replaceFirst("{}", arg?.toString() ?: "null") - } - return result - } + override fun getName(): String { + return name + } + + override fun isTraceEnabled(): Boolean { + return true + } + + override fun trace(msg: String?) { + msg?.let { toPrintln(it, MingLiLoggerLevel.TRACE) } + } + + override fun trace(format: String?, arg: Any?) { + format?.let { + val message = format1(it, arg) + toPrintln(message, MingLiLoggerLevel.TRACE) + } + } + + override fun trace(format: String?, arg1: Any?, arg2: Any?) { + format?.let { + val message = format2(it, arg1, arg2) + toPrintln(message, MingLiLoggerLevel.TRACE) + } + } + + override fun trace(format: String?, vararg arguments: Any?) { + format?.let { + val message = formatArray(it, arguments) + toPrintln(message, MingLiLoggerLevel.TRACE) + } + } + + override fun trace(msg: String?, t: Throwable?) { + msg?.let { + val message = if (t != null) "$it: ${t.message}" else it + toPrintln(message, MingLiLoggerLevel.TRACE) + } + } + + override fun isTraceEnabled(marker: Marker?): Boolean { + return true + } + + override fun trace(marker: Marker?, msg: String?) { + trace(msg) + } + + override fun trace(marker: Marker?, format: String?, arg: Any?) { + trace(format, arg) + } + + override fun trace(marker: Marker?, format: String?, arg1: Any?, arg2: Any?) { + trace(format, arg1, arg2) + } + + override fun trace(marker: Marker?, format: String?, vararg arguments: Any?) { + trace(format, *arguments) + } + + override fun trace(marker: Marker?, msg: String?, t: Throwable?) { + trace(msg, t) + } + + override fun isDebugEnabled(): Boolean { + return true + } + + override fun debug(msg: String?) { + msg?.let { toPrintln(it, MingLiLoggerLevel.DEBUG) } + } + + override fun debug(format: String?, arg: Any?) { + format?.let { + val message = format1(it, arg) + toPrintln(message, MingLiLoggerLevel.DEBUG) + } + } + + override fun debug(format: String?, arg1: Any?, arg2: Any?) { + format?.let { + val message = format2(it, arg1, arg2) + toPrintln(message, MingLiLoggerLevel.DEBUG) + } + } + + override fun debug(format: String?, vararg arguments: Any?) { + format?.let { + val message = formatArray(it, arguments) + toPrintln(message, MingLiLoggerLevel.DEBUG) + } + } + + override fun debug(msg: String?, t: Throwable?) { + msg?.let { + val message = if (t != null) "$it: ${t.message}" else it + toPrintln(message, MingLiLoggerLevel.DEBUG) + } + } + + override fun isDebugEnabled(marker: Marker?): Boolean { + return true + } + + override fun debug(marker: Marker?, msg: String?) { + debug(msg) + } + + override fun debug(marker: Marker?, format: String?, arg: Any?) { + debug(format, arg) + } + + override fun debug(marker: Marker?, format: String?, arg1: Any?, arg2: Any?) { + debug(format, arg1, arg2) + } + + override fun debug(marker: Marker?, format: String?, vararg arguments: Any?) { + debug(format, *arguments) + } + + override fun debug(marker: Marker?, msg: String?, t: Throwable?) { + debug(msg, t) + } + + override fun isInfoEnabled(): Boolean { + return true + } + + override fun info(msg: String?) { + msg?.let { toPrintln(it, MingLiLoggerLevel.INFO) } + } + + override fun info(format: String?, arg: Any?) { + format?.let { + val message = format1(it, arg) + toPrintln(message, MingLiLoggerLevel.INFO) + } + } + + override fun info(format: String?, arg1: Any?, arg2: Any?) { + format?.let { + val message = format2(it, arg1, arg2) + toPrintln(message, MingLiLoggerLevel.INFO) + } + } + + override fun info(format: String?, vararg arguments: Any?) { + format?.let { + val message = formatArray(it, arguments) + toPrintln(message, MingLiLoggerLevel.INFO) + } + } + + override fun info(msg: String?, t: Throwable?) { + msg?.let { + val message = if (t != null) "$it: ${t.message}" else it + toPrintln(message, MingLiLoggerLevel.INFO) + } + } + + override fun isInfoEnabled(marker: Marker?): Boolean { + return true + } + + override fun info(marker: Marker?, msg: String?) { + info(msg) + } + + override fun info(marker: Marker?, format: String?, arg: Any?) { + info(format, arg) + } + + override fun info(marker: Marker?, format: String?, arg1: Any?, arg2: Any?) { + info(format, arg1, arg2) + } + + override fun info(marker: Marker?, format: String?, vararg arguments: Any?) { + info(format, *arguments) + } + + override fun info(marker: Marker?, msg: String?, t: Throwable?) { + info(msg, t) + } + + override fun isWarnEnabled(): Boolean { + return true + } + + override fun warn(msg: String?) { + msg?.let { toPrintln(it, MingLiLoggerLevel.WARN) } + } + + override fun warn(format: String?, arg: Any?) { + format?.let { + val message = format1(it, arg) + toPrintln(message, MingLiLoggerLevel.WARN) + } + } + + override fun warn(format: String?, vararg arguments: Any?) { + format?.let { + val message = formatArray(it, arguments) + toPrintln(message, MingLiLoggerLevel.WARN) + } + } + + override fun warn(format: String?, arg1: Any?, arg2: Any?) { + format?.let { + val message = format2(it, arg1, arg2) + toPrintln(message, MingLiLoggerLevel.WARN) + } + } + + override fun warn(msg: String?, t: Throwable?) { + msg?.let { + val message = if (t != null) "$it: ${t.message}" else it + toPrintln(message, MingLiLoggerLevel.WARN) + } + } + + override fun isWarnEnabled(marker: Marker?): Boolean { + return true + } + + override fun warn(marker: Marker?, msg: String?) { + warn(msg) + } + + override fun warn(marker: Marker?, format: String?, arg: Any?) { + warn(format, arg) + } + + override fun warn(marker: Marker?, format: String?, arg1: Any?, arg2: Any?) { + warn(format, arg1, arg2) + } + + override fun warn(marker: Marker?, format: String?, vararg arguments: Any?) { + warn(format, *arguments) + } + + override fun warn(marker: Marker?, msg: String?, t: Throwable?) { + warn(msg, t) + } + + override fun isErrorEnabled(): Boolean { + return true + } + + override fun error(msg: String?) { + msg?.let { toPrintln(it, MingLiLoggerLevel.ERROR) } + } + + override fun error(format: String?, arg: Any?) { + format?.let { + val message = format1(it, arg) + toPrintln(message, MingLiLoggerLevel.ERROR) + } + } + + override fun error(format: String?, arg1: Any?, arg2: Any?) { + format?.let { + val message = format2(it, arg1, arg2) + toPrintln(message, MingLiLoggerLevel.ERROR) + } + } + + override fun error(format: String?, vararg arguments: Any?) { + format?.let { + val message = formatArray(it, arguments) + toPrintln(message, MingLiLoggerLevel.ERROR) + } + } + + override fun error(msg: String?, t: Throwable?) { + msg?.let { + toPrintln(it, MingLiLoggerLevel.ERROR) + } + } + + override fun isErrorEnabled(marker: Marker?): Boolean { + return true + } + + override fun error(marker: Marker?, msg: String?) { + error(msg) + } + + override fun error(marker: Marker?, format: String?, arg: Any?) { + error(format, arg) + } + + override fun error(marker: Marker?, format: String?, arg1: Any?, arg2: Any?) { + error(format, arg1, arg2) + } + + override fun error(marker: Marker?, format: String?, vararg arguments: Any?) { + error(format, *arguments) + } + + override fun error(marker: Marker?, msg: String?, t: Throwable?) { + error(msg, t) + } + + fun toPrintln(message: String, level: MingLiLoggerLevel) { + when (level) { + MingLiLoggerLevel.TRACE -> wirteToSteam("[TRACE] [$name] $message\n") + MingLiLoggerLevel.DEBUG -> wirteToSteam("[DEBUG] [$name] $message\n") + MingLiLoggerLevel.INFO -> wirteToSteam("[INFO] [$name] $message\n") + MingLiLoggerLevel.WARN -> wirteToSteam("[WARN] [$name] $message\n") + MingLiLoggerLevel.ERROR -> wirteToSteam("[ERROR] [$name] $message\n") + } + } + + fun wirteToSteam(string: String) { + System.out.write(string.toByteArray()) + } + + private fun format1(format: String, arg: Any?): String { + return if (format.contains("{}")) { + format.replaceFirst("{}", arg?.toString() ?: "null") + } else { + "$format $arg" + } + } + + private fun format2(format: String, arg1: Any?, arg2: Any?): String { + return format.replaceFirst("{}", arg1?.toString() ?: "null") + .replaceFirst("{}", arg2?.toString() ?: "null") + } + + private fun formatArray(format: String, arguments: Array): String { + var result = format + for (arg in arguments) { + result = result.replaceFirst("{}", arg?.toString() ?: "null") + } + return result + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/logger/MingLiLoggerFactory.kt b/src/main/kotlin/com/mingliqiye/utils/logger/MingLiLoggerFactory.kt index b3b0834..9b4ed66 100644 --- a/src/main/kotlin/com/mingliqiye/utils/logger/MingLiLoggerFactory.kt +++ b/src/main/kotlin/com/mingliqiye/utils/logger/MingLiLoggerFactory.kt @@ -29,78 +29,78 @@ import java.util.* class MingLiLoggerFactory { - companion object { + companion object { - private var nameMethod: Method? = null - private var clazzMethod: Method? = null + private var nameMethod: Method? = null + private var clazzMethod: Method? = null - init { - try { - val clazz = Class.forName("com.mingliqiye.logger.Loggers") - nameMethod = clazz.getMethod("getLogger", String::class.java) - clazzMethod = clazz.getMethod("getLogger", Class::class.java) - } catch (e: Exception) { - } - } + init { + try { + val clazz = Class.forName("com.mingliqiye.logger.Loggers") + nameMethod = clazz.getMethod("getLogger", String::class.java) + clazzMethod = clazz.getMethod("getLogger", Class::class.java) + } catch (e: Exception) { + } + } - private val mingLiLoggerFactory: MingLiLoggerFactory by lazy { - MingLiLoggerFactory() - } + private val mingLiLoggerFactory: MingLiLoggerFactory by lazy { + MingLiLoggerFactory() + } - @JvmStatic - fun getLogger(name: String): Logger { + @JvmStatic + fun getLogger(name: String): Logger { - return if (mingLiLoggerFactory.checkSLF4JImplementation()) { - if (nameMethod != null) { - nameMethod!!.invoke(null, name) as Logger - } else { - LoggerFactory.getLogger(name) - } - } else mingLiLoggerFactory.getLogger(name) - } + return if (mingLiLoggerFactory.checkSLF4JImplementation()) { + if (nameMethod != null) { + nameMethod!!.invoke(null, name) as Logger + } else { + LoggerFactory.getLogger(name) + } + } else mingLiLoggerFactory.getLogger(name) + } - @JvmStatic - fun getLogger(clazz: Class<*>): Logger { - return if (mingLiLoggerFactory.checkSLF4JImplementation()) { - if (clazzMethod != null) { - clazzMethod!!.invoke(null, clazz) as Logger - } else { - LoggerFactory.getLogger(clazz) - } - } else mingLiLoggerFactory.getLogger(clazz) - } + @JvmStatic + fun getLogger(clazz: Class<*>): Logger { + return if (mingLiLoggerFactory.checkSLF4JImplementation()) { + if (clazzMethod != null) { + clazzMethod!!.invoke(null, clazz) as Logger + } else { + LoggerFactory.getLogger(clazz) + } + } else mingLiLoggerFactory.getLogger(clazz) + } - inline fun getLogger() = getLogger(T::class.java) - } + inline fun getLogger() = getLogger(T::class.java) + } - private var hasSLF4JImplementation: Boolean? = null + private var hasSLF4JImplementation: Boolean? = null - // 线程安全的延迟初始化 - private fun checkSLF4JImplementation(): Boolean { - if (hasSLF4JImplementation == null) { - synchronized(this) { - if (hasSLF4JImplementation == null) { - hasSLF4JImplementation = try { - // 更可靠的检测方式 - ServiceLoader.load( - Class.forName("org.slf4j.spi.SLF4JServiceProvider") - ).iterator().hasNext() - } catch (e: ClassNotFoundException) { - false - } catch (e: NoClassDefFoundError) { - false - } - } - } - } - return hasSLF4JImplementation ?: false - } + // 线程安全的延迟初始化 + private fun checkSLF4JImplementation(): Boolean { + if (hasSLF4JImplementation == null) { + synchronized(this) { + if (hasSLF4JImplementation == null) { + hasSLF4JImplementation = try { + // 更可靠的检测方式 + ServiceLoader.load( + Class.forName("org.slf4j.spi.SLF4JServiceProvider") + ).iterator().hasNext() + } catch (e: ClassNotFoundException) { + false + } catch (e: NoClassDefFoundError) { + false + } + } + } + } + return hasSLF4JImplementation ?: false + } - @JvmName("getLogger_prc_name") - private fun getLogger(name: String): Logger = MingLiLogger(name) + @JvmName("getLogger_prc_name") + private fun getLogger(name: String): Logger = MingLiLogger(name) - @JvmName("getLogger_prc_clazz") - private fun getLogger(clazz: Class<*>): Logger = MingLiLogger(clazz.name) + @JvmName("getLogger_prc_clazz") + private fun getLogger(clazz: Class<*>): Logger = MingLiLogger(clazz.name) } diff --git a/src/main/kotlin/com/mingliqiye/utils/logger/MingLiLoggerLevel.kt b/src/main/kotlin/com/mingliqiye/utils/logger/MingLiLoggerLevel.kt index 5eee5ec..9c2cac7 100644 --- a/src/main/kotlin/com/mingliqiye/utils/logger/MingLiLoggerLevel.kt +++ b/src/main/kotlin/com/mingliqiye/utils/logger/MingLiLoggerLevel.kt @@ -23,9 +23,9 @@ package com.mingliqiye.utils.logger enum class MingLiLoggerLevel { - TRACE, - DEBUG, - INFO, - WARN, - ERROR + TRACE, + DEBUG, + INFO, + WARN, + ERROR } diff --git a/src/main/kotlin/com/mingliqiye/utils/map/Maps.kt b/src/main/kotlin/com/mingliqiye/utils/map/Maps.kt index ac6b737..be59994 100644 --- a/src/main/kotlin/com/mingliqiye/utils/map/Maps.kt +++ b/src/main/kotlin/com/mingliqiye/utils/map/Maps.kt @@ -29,143 +29,143 @@ import java.util.concurrent.ConcurrentHashMap fun newHashMap(vararg elements: Pair): HashMap { - val map = HashMap() - for (element in elements) { - map[element.first] = element.second - } - return map + val map = HashMap() + for (element in elements) { + map[element.first] = element.second + } + return map } fun newHashMap(size: Int): HashMap { - return HashMap(size) + return HashMap(size) } fun newHashMap(): HashMap { - return HashMap() + return HashMap() } fun newHashMap(vararg elements: Map.Entry): HashMap { - val map = HashMap() - for (element in elements) { - map[element.key] = element.value - } - return map + val map = HashMap() + for (element in elements) { + map[element.key] = element.value + } + return map } fun newConcurrentHashMap(vararg elements: Map.Entry): ConcurrentHashMap { - val map = newConcurrentHashMap() - for (element in elements) { - map[element.key] = element.value - } - return map + val map = newConcurrentHashMap() + for (element in elements) { + map[element.key] = element.value + } + return map } fun newLinkedHashMap(vararg elements: Map.Entry): LinkedHashMap { - val map = newLinkedHashMap() - for (element in elements) { - map[element.key] = element.value - } - return map + val map = newLinkedHashMap() + for (element in elements) { + map[element.key] = element.value + } + return map } fun newHashtable(vararg elements: Map.Entry): Hashtable { - val map = newHashtable() - for (element in elements) { - map[element.key] = element.value - } - return map + val map = newHashtable() + for (element in elements) { + map[element.key] = element.value + } + return map } fun , V> newTreeMap(vararg elements: Map.Entry): TreeMap { - val map = newTreeMap() - for (element in elements) { - map[element.key] = element.value - } - return map + val map = newTreeMap() + for (element in elements) { + map[element.key] = element.value + } + return map } inline fun Map.newHashMap(): HashMap { - return HashMap(this) + return HashMap(this) } fun newLinkedHashMap(): LinkedHashMap { - return LinkedHashMap() + return LinkedHashMap() } fun newLinkedHashMap(size: Int): LinkedHashMap { - return LinkedHashMap(size) + return LinkedHashMap(size) } fun newLinkedHashMap(vararg elements: Pair): LinkedHashMap { - val map = newLinkedHashMap() - for (element in elements) { - map[element.first] = element.second - } - return map + val map = newLinkedHashMap() + for (element in elements) { + map[element.first] = element.second + } + return map } inline fun Map.newLinkedHashMap(): LinkedHashMap { - return LinkedHashMap(this) + return LinkedHashMap(this) } fun , V> newTreeMap(): TreeMap { - return TreeMap() + return TreeMap() } fun , V> newTreeMap(vararg elements: Pair): TreeMap { - val map = newTreeMap() - for (element in elements) { - map[element.first] = element.second - } - return map + val map = newTreeMap() + for (element in elements) { + map[element.first] = element.second + } + return map } inline fun , reified V> Map.newTreeMap(): TreeMap { - return TreeMap(this) + return TreeMap(this) } fun newHashtable(): Hashtable { - return Hashtable() + return Hashtable() } fun newHashtable(size: Int): Hashtable { - return Hashtable(size) + return Hashtable(size) } fun newHashtable(vararg elements: Pair): Hashtable { - val map = newHashtable() - for (element in elements) { - map[element.first] = element.second - } - return map + val map = newHashtable() + for (element in elements) { + map[element.first] = element.second + } + return map } inline fun Map.newHashtable(): Hashtable { - val hashtable = Hashtable() - hashtable.putAll(this) - return hashtable + val hashtable = Hashtable() + hashtable.putAll(this) + return hashtable } fun newConcurrentHashMap(): ConcurrentHashMap { - return ConcurrentHashMap() + return ConcurrentHashMap() } fun newConcurrentHashMap(size: Int): ConcurrentHashMap { - return ConcurrentHashMap(size) + return ConcurrentHashMap(size) } fun newConcurrentHashMap(vararg elements: Pair): ConcurrentHashMap { - val map = newConcurrentHashMap() - for (element in elements) { - map[element.first] = element.second - } - return map + val map = newConcurrentHashMap() + for (element in elements) { + map[element.first] = element.second + } + return map } inline fun Map.newConcurrentHashMap(): ConcurrentHashMap { - return ConcurrentHashMap(this) + return ConcurrentHashMap(this) } fun ofEntries(entries: List>): Map { - return entries.associate { it.key to it.value } + return entries.associate { it.key to it.value } } diff --git a/src/main/kotlin/com/mingliqiye/utils/math/MathUtils.kt b/src/main/kotlin/com/mingliqiye/utils/math/MathUtils.kt index 6a769ab..0408690 100644 --- a/src/main/kotlin/com/mingliqiye/utils/math/MathUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/math/MathUtils.kt @@ -167,7 +167,7 @@ operator fun BigDecimal.div(value: BigDecimal): BigDecimal = this.divide(value) * @return 除法运算结果 */ operator fun BigDecimal.div( - value: Long, + value: Long, ): BigDecimal = this.divide(BigDecimal(value)) /** @@ -176,7 +176,7 @@ operator fun BigDecimal.div( * @return 除法运算结果 */ operator fun BigDecimal.div( - value: Int, + value: Int, ): BigDecimal = this.divide(BigDecimal(value)) /** @@ -185,7 +185,7 @@ operator fun BigDecimal.div( * @return 除法运算结果 */ operator fun BigDecimal.div( - value: Double, + value: Double, ): BigDecimal = this.divide(BigDecimal(value.toString())) /** @@ -194,7 +194,7 @@ operator fun BigDecimal.div( * @return 除法运算结果 */ operator fun BigDecimal.div( - value: Float, + value: Float, ): BigDecimal = this.divide(BigDecimal(value.toString())) /** @@ -203,7 +203,7 @@ operator fun BigDecimal.div( * @return 除法运算结果 */ operator fun BigDecimal.div( - value: BigInteger, + value: BigInteger, ): BigDecimal = this.divide(BigDecimal(value)) /** diff --git a/src/main/kotlin/com/mingliqiye/utils/metadata/MetaData.kt b/src/main/kotlin/com/mingliqiye/utils/metadata/MetaData.kt index 30820b1..5d4e181 100644 --- a/src/main/kotlin/com/mingliqiye/utils/metadata/MetaData.kt +++ b/src/main/kotlin/com/mingliqiye/utils/metadata/MetaData.kt @@ -29,28 +29,28 @@ import java.util.stream.Collectors.toMap class MetaDataResource fun getMetaData(): Map { - return ResourceUtils.getResourceAsString("/META-INF/meta-data").split("\n").stream().map { - if (it.isBlank()) { - return@map null - } - val split = it.split("=") - if (split.size == 2) { - split[0] to split[1] - } else { - return@map null - } - }.filter { it != null }.collect(toMap({ it!!.first }, { it!!.second })) + return ResourceUtils.getResourceAsString("/META-INF/meta-data").split("\n").stream().map { + if (it.isBlank()) { + return@map null + } + val split = it.split("=") + if (split.size == 2) { + split[0] to split[1] + } else { + return@map null + } + }.filter { it != null }.collect(toMap({ it!!.first }, { it!!.second })) } val mingliUtilsMetaData: MingliUtilsMetaData by lazy { - val metaData = getMetaData() - MingliUtilsMetaData().apply { - buildTime = metaData["buildTime"] ?: "" - groupId = metaData["groupId"] ?: "" - artifactId = metaData["artifactId"] ?: "" - version = metaData["version"] ?: "" - buildJdkVersion = metaData["buildJdkVersion"] ?: "" - author = metaData["author"] ?: "" - website = metaData["website"] ?: "" - } + val metaData = getMetaData() + MingliUtilsMetaData().apply { + buildTime = metaData["buildTime"] ?: "" + groupId = metaData["groupId"] ?: "" + artifactId = metaData["artifactId"] ?: "" + version = metaData["version"] ?: "" + buildJdkVersion = metaData["buildJdkVersion"] ?: "" + author = metaData["author"] ?: "" + website = metaData["website"] ?: "" + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/metadata/MingliUtilsMetaData.kt b/src/main/kotlin/com/mingliqiye/utils/metadata/MingliUtilsMetaData.kt index 2a0c420..fabdc80 100644 --- a/src/main/kotlin/com/mingliqiye/utils/metadata/MingliUtilsMetaData.kt +++ b/src/main/kotlin/com/mingliqiye/utils/metadata/MingliUtilsMetaData.kt @@ -23,11 +23,11 @@ package com.mingliqiye.utils.metadata data class MingliUtilsMetaData( - var buildTime: String = "", - var groupId: String = "", - var artifactId: String = "", - var version: String = "", - var buildJdkVersion: String = "", - var author: String = "", - var website: String = "", + var buildTime: String = "", + var groupId: String = "", + var artifactId: String = "", + var version: String = "", + var buildJdkVersion: String = "", + var author: String = "", + var website: String = "", ) diff --git a/src/main/kotlin/com/mingliqiye/utils/mybatis/CallType.kt b/src/main/kotlin/com/mingliqiye/utils/mybatis/CallType.kt index 91894f4..f7bda14 100644 --- a/src/main/kotlin/com/mingliqiye/utils/mybatis/CallType.kt +++ b/src/main/kotlin/com/mingliqiye/utils/mybatis/CallType.kt @@ -23,21 +23,21 @@ package com.mingliqiye.utils.mybatis enum class CallType { - /** - * 通过索引访问结果集 - * 使用数字索引位置来获取结果集中的数据 - */ - RESULTSET_INDEX, + /** + * 通过索引访问结果集 + * 使用数字索引位置来获取结果集中的数据 + */ + RESULTSET_INDEX, - /** - * 通过名称访问结果集 - * 使用列名来获取结果集中的数据 - */ - RESULTSET_NAME, + /** + * 通过名称访问结果集 + * 使用列名来获取结果集中的数据 + */ + RESULTSET_NAME, - /** - * 通过索引访问可调用语句 - * 使用数字索引位置来获取可调用语句中的数据 - */ - CALLABLE_STATEMENT_INDEX + /** + * 通过索引访问可调用语句 + * 使用数字索引位置来获取可调用语句中的数据 + */ + CALLABLE_STATEMENT_INDEX } diff --git a/src/main/kotlin/com/mingliqiye/utils/mybatis/QuickBaseTypeHandler.kt b/src/main/kotlin/com/mingliqiye/utils/mybatis/QuickBaseTypeHandler.kt index ddee32a..261a522 100644 --- a/src/main/kotlin/com/mingliqiye/utils/mybatis/QuickBaseTypeHandler.kt +++ b/src/main/kotlin/com/mingliqiye/utils/mybatis/QuickBaseTypeHandler.kt @@ -37,90 +37,90 @@ import java.sql.SQLException * @param T 要处理的 Java 类型 */ abstract class QuickBaseTypeHandler : BaseTypeHandler() { - /** - * 抽象方法,用于从数据库结果中获取并转换为 Java 类型 T。 - * - * @param vg 值获取器,封装了 ResultSet 或 CallableStatement - * @param ct 调用类型,标识当前是从 ResultSet 还是 CallableStatement 获取数据 - * @param ci 列索引(可为 null) - * @param cn 列名(可为 null) - * @return 转换后的 Java 类型 T 实例 - * @throws SQLException SQL 执行异常时抛出 - */ - @Throws(SQLException::class) - abstract fun getValue( - vg: QuickBaseTypeHandlerValueGetter, - ct: CallType, - ci: Int?, - cn: String? - ): T? + /** + * 抽象方法,用于从数据库结果中获取并转换为 Java 类型 T。 + * + * @param vg 值获取器,封装了 ResultSet 或 CallableStatement + * @param ct 调用类型,标识当前是从 ResultSet 还是 CallableStatement 获取数据 + * @param ci 列索引(可为 null) + * @param cn 列名(可为 null) + * @return 转换后的 Java 类型 T 实例 + * @throws SQLException SQL 执行异常时抛出 + */ + @Throws(SQLException::class) + abstract fun getValue( + vg: QuickBaseTypeHandlerValueGetter, + ct: CallType, + ci: Int?, + cn: String?, + ): T? - /** - * 抽象方法,用于将 Java 类型 T 设置到 PreparedStatement 中。 - * - * @param ps PreparedStatement 对象 - * @param index 参数索引位置 - * @param parameter Java 类型 T 的实例 - * @param jdbcType JDBC 类型 - * @throws SQLException SQL 执行异常时抛出 - */ - @Throws(SQLException::class) - abstract fun setValue(ps: PreparedStatement, index: Int, parameter: T?, jdbcType: JdbcType?) + /** + * 抽象方法,用于将 Java 类型 T 设置到 PreparedStatement 中。 + * + * @param ps PreparedStatement 对象 + * @param index 参数索引位置 + * @param parameter Java 类型 T 的实例 + * @param jdbcType JDBC 类型 + * @throws SQLException SQL 执行异常时抛出 + */ + @Throws(SQLException::class) + abstract fun setValue(ps: PreparedStatement, index: Int, parameter: T?, jdbcType: JdbcType?) - /** - * 实现 BaseTypeHandler 的 setNonNullParameter 方法, - * 将非空参数设置到 PreparedStatement 中。 - * - * @param ps PreparedStatement 对象 - * @param i 参数索引位置 - * @param parameter Java 类型 T 的实例(非空) - * @param jdbcType JDBC 类型 - * @throws SQLException SQL 执行异常时抛出 - */ - @Throws(SQLException::class) - override fun setNonNullParameter(ps: PreparedStatement, i: Int, parameter: T?, jdbcType: JdbcType?) { - setValue(ps, i, parameter, jdbcType) - } + /** + * 实现 BaseTypeHandler 的 setNonNullParameter 方法, + * 将非空参数设置到 PreparedStatement 中。 + * + * @param ps PreparedStatement 对象 + * @param i 参数索引位置 + * @param parameter Java 类型 T 的实例(非空) + * @param jdbcType JDBC 类型 + * @throws SQLException SQL 执行异常时抛出 + */ + @Throws(SQLException::class) + override fun setNonNullParameter(ps: PreparedStatement, i: Int, parameter: T?, jdbcType: JdbcType?) { + setValue(ps, i, parameter, jdbcType) + } - /** - * 实现 BaseTypeHandler 的 getNullableResult 方法, - * 通过列名从 ResultSet 中获取可能为 null 的结果。 - * - * @param rs ResultSet 对象 - * @param columnName 数据库列名 - * @return 转换后的 Java 类型 T 实例(可能为 null) - * @throws SQLException SQL 执行异常时抛出 - */ - @Throws(SQLException::class) - override fun getNullableResult(rs: ResultSet, columnName: String): T? { - return getValue(QuickBaseTypeHandlerValueGetter(null, rs), CallType.RESULTSET_NAME, null, columnName) - } + /** + * 实现 BaseTypeHandler 的 getNullableResult 方法, + * 通过列名从 ResultSet 中获取可能为 null 的结果。 + * + * @param rs ResultSet 对象 + * @param columnName 数据库列名 + * @return 转换后的 Java 类型 T 实例(可能为 null) + * @throws SQLException SQL 执行异常时抛出 + */ + @Throws(SQLException::class) + override fun getNullableResult(rs: ResultSet, columnName: String): T? { + return getValue(QuickBaseTypeHandlerValueGetter(null, rs), CallType.RESULTSET_NAME, null, columnName) + } - /** - * 实现 BaseTypeHandler 的 getNullableResult 方法, - * 通过列索引从 ResultSet 中获取可能为 null 的结果。 - * - * @param rs ResultSet 对象 - * @param columnIndex 数据库列索引 - * @return 转换后的 Java 类型 T 实例(可能为 null) - * @throws SQLException SQL 执行异常时抛出 - */ - @Throws(SQLException::class) - override fun getNullableResult(rs: ResultSet, columnIndex: Int): T? { - return getValue(QuickBaseTypeHandlerValueGetter(null, rs), CallType.RESULTSET_INDEX, columnIndex, null) - } + /** + * 实现 BaseTypeHandler 的 getNullableResult 方法, + * 通过列索引从 ResultSet 中获取可能为 null 的结果。 + * + * @param rs ResultSet 对象 + * @param columnIndex 数据库列索引 + * @return 转换后的 Java 类型 T 实例(可能为 null) + * @throws SQLException SQL 执行异常时抛出 + */ + @Throws(SQLException::class) + override fun getNullableResult(rs: ResultSet, columnIndex: Int): T? { + return getValue(QuickBaseTypeHandlerValueGetter(null, rs), CallType.RESULTSET_INDEX, columnIndex, null) + } - /** - * 实现 BaseTypeHandler 的 getNullableResult 方法, - * 通过列索引从 CallableStatement 中获取可能为 null 的结果。 - * - * @param cs CallableStatement 对象 - * @param columnIndex 数据库列索引 - * @return 转换后的 Java 类型 T 实例(可能为 null) - * @throws SQLException SQL 执行异常时抛出 - */ - @Throws(SQLException::class) - override fun getNullableResult(cs: CallableStatement, columnIndex: Int): T? { - return getValue(QuickBaseTypeHandlerValueGetter(cs, null), CallType.CALLABLE_STATEMENT_INDEX, columnIndex, null) - } + /** + * 实现 BaseTypeHandler 的 getNullableResult 方法, + * 通过列索引从 CallableStatement 中获取可能为 null 的结果。 + * + * @param cs CallableStatement 对象 + * @param columnIndex 数据库列索引 + * @return 转换后的 Java 类型 T 实例(可能为 null) + * @throws SQLException SQL 执行异常时抛出 + */ + @Throws(SQLException::class) + override fun getNullableResult(cs: CallableStatement, columnIndex: Int): T? { + return getValue(QuickBaseTypeHandlerValueGetter(cs, null), CallType.CALLABLE_STATEMENT_INDEX, columnIndex, null) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/datetime/DateTimeTypeHandler.kt b/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/datetime/DateTimeTypeHandler.kt index ca64ba4..30713b8 100644 --- a/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/datetime/DateTimeTypeHandler.kt +++ b/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/datetime/DateTimeTypeHandler.kt @@ -38,35 +38,35 @@ import java.sql.Types.TIMESTAMP @MappedTypes(DateTime::class) class DateTimeTypeHandler : QuickBaseTypeHandler() { - override fun getValue( - vg: QuickBaseTypeHandlerValueGetter, - ct: CallType, - ci: Int?, - cn: String? - ): DateTime? { - val data = (when (ct) { - CallType.RESULTSET_INDEX -> vg.resultSet!!.getTimestamp(ci!!) - CallType.RESULTSET_NAME -> vg.resultSet!!.getTimestamp(cn!!) - CallType.CALLABLE_STATEMENT_INDEX -> vg.callableStatement!!.getTimestamp(ci!!) - }) - if (data == null) { - return null - } - return DateTime.of( - data - ) - } + override fun getValue( + vg: QuickBaseTypeHandlerValueGetter, + ct: CallType, + ci: Int?, + cn: String?, + ): DateTime? { + val data = (when (ct) { + CallType.RESULTSET_INDEX -> vg.resultSet!!.getTimestamp(ci!!) + CallType.RESULTSET_NAME -> vg.resultSet!!.getTimestamp(cn!!) + CallType.CALLABLE_STATEMENT_INDEX -> vg.callableStatement!!.getTimestamp(ci!!) + }) + if (data == null) { + return null + } + return DateTime.of( + data + ) + } - override fun setValue( - ps: PreparedStatement, - index: Int, - parameter: DateTime?, - jdbcType: JdbcType? - ) { - if (parameter == null) { - ps.setNull(index, TIMESTAMP) - return - } - ps.setTimestamp(index, Timestamp.valueOf(parameter.toLocalDateTime())) - } + override fun setValue( + ps: PreparedStatement, + index: Int, + parameter: DateTime?, + jdbcType: JdbcType?, + ) { + if (parameter == null) { + ps.setNull(index, TIMESTAMP) + return + } + ps.setTimestamp(index, Timestamp.valueOf(parameter.toLocalDateTime())) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/mysql/uuid/MysqlUUIDBinaryTypeHandler.kt b/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/mysql/uuid/MysqlUUIDBinaryTypeHandler.kt index 084194a..1f6c335 100644 --- a/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/mysql/uuid/MysqlUUIDBinaryTypeHandler.kt +++ b/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/mysql/uuid/MysqlUUIDBinaryTypeHandler.kt @@ -35,54 +35,54 @@ import java.sql.PreparedStatement @MappedTypes(UUID::class) class MysqlUUIDBinaryTypeHandler : QuickBaseTypeHandler() { - companion object { - /** - * 将字节数组转换为UUID对象 - * - * @param byteArray 字节数组 - * @return UUID对象,如果字节数组为null则返回null - */ - private fun toUUID(byteArray: ByteArray?): UUID? { - return byteArray?.let { UUID.of(mysqlToUuid(it)) } - } + companion object { + /** + * 将字节数组转换为UUID对象 + * + * @param byteArray 字节数组 + * @return UUID对象,如果字节数组为null则返回null + */ + private fun toUUID(byteArray: ByteArray?): UUID? { + return byteArray?.let { UUID.of(mysqlToUuid(it)) } + } - /** - * 将UUID对象转换为字节数组 - * - * @param uuid UUID对象 - * @return 字节数组,如果UUID为null则返回null - */ - fun toByteArray(uuid: UUID?): ByteArray? { - return uuid?.let { uuidToMysql(it.toBytes()) } - } - } + /** + * 将UUID对象转换为字节数组 + * + * @param uuid UUID对象 + * @return 字节数组,如果UUID为null则返回null + */ + fun toByteArray(uuid: UUID?): ByteArray? { + return uuid?.let { uuidToMysql(it.toBytes()) } + } + } - override fun getValue( - vg: QuickBaseTypeHandlerValueGetter, ct: CallType, ci: Int?, cn: String? - ): UUID? { + override fun getValue( + vg: QuickBaseTypeHandlerValueGetter, ct: CallType, ci: Int?, cn: String?, + ): UUID? { - val data: ByteArray? = when (ct) { - CallType.RESULTSET_NAME -> vg.resultSet!!.getBytes(cn!!) - CallType.RESULTSET_INDEX -> vg.resultSet!!.getBytes(ci!!) - CallType.CALLABLE_STATEMENT_INDEX -> vg.resultSet!!.getBytes(ci!!) - } - if (data == null) { - return null - } + val data: ByteArray? = when (ct) { + CallType.RESULTSET_NAME -> vg.resultSet!!.getBytes(cn!!) + CallType.RESULTSET_INDEX -> vg.resultSet!!.getBytes(ci!!) + CallType.CALLABLE_STATEMENT_INDEX -> vg.resultSet!!.getBytes(ci!!) + } + if (data == null) { + return null + } - return toUUID( - data - ) - } + return toUUID( + data + ) + } - override fun setValue( - ps: PreparedStatement, index: Int, parameter: UUID?, jdbcType: JdbcType? - ) { - if (parameter == null) { - ps.setNull(index, java.sql.Types.BINARY) - return - } - ps.setBytes(index, toByteArray(parameter)) - } + override fun setValue( + ps: PreparedStatement, index: Int, parameter: UUID?, jdbcType: JdbcType?, + ) { + if (parameter == null) { + ps.setNull(index, java.sql.Types.BINARY) + return + } + ps.setBytes(index, toByteArray(parameter)) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/pgsql/uuid/PgsqlUUIDTypeHandler.kt b/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/pgsql/uuid/PgsqlUUIDTypeHandler.kt index 101a121..bf67aff 100644 --- a/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/pgsql/uuid/PgsqlUUIDTypeHandler.kt +++ b/src/main/kotlin/com/mingliqiye/utils/mybatis/typehandler/pgsql/uuid/PgsqlUUIDTypeHandler.kt @@ -32,32 +32,32 @@ import java.sql.PreparedStatement @MappedTypes(UUID::class) class PgsqlUUIDTypeHandler : QuickBaseTypeHandler() { - override fun getValue( - vg: QuickBaseTypeHandlerValueGetter, ct: CallType, ci: Int?, cn: String? - ): UUID? { - val data: String? = when (ct) { - CallType.RESULTSET_INDEX -> - vg.resultSet!!.getString(ci!!) + override fun getValue( + vg: QuickBaseTypeHandlerValueGetter, ct: CallType, ci: Int?, cn: String?, + ): UUID? { + val data: String? = when (ct) { + CallType.RESULTSET_INDEX -> + vg.resultSet!!.getString(ci!!) - CallType.RESULTSET_NAME -> - vg.resultSet!!.getString(cn) + CallType.RESULTSET_NAME -> + vg.resultSet!!.getString(cn) - CallType.CALLABLE_STATEMENT_INDEX -> - vg.callableStatement!!.getString(cn) - } - if (data == null) { - return null - } - return UUID.of(data) - } + CallType.CALLABLE_STATEMENT_INDEX -> + vg.callableStatement!!.getString(cn) + } + if (data == null) { + return null + } + return UUID.of(data) + } - override fun setValue( - ps: PreparedStatement, index: Int, parameter: UUID?, jdbcType: JdbcType? - ) { - if (parameter == null) { - ps.setNull(index, jdbcType?.TYPE_CODE ?: JdbcType.JAVA_OBJECT.TYPE_CODE) - return - } - ps.setObject(index, parameter.getUuid()) - } + override fun setValue( + ps: PreparedStatement, index: Int, parameter: UUID?, jdbcType: JdbcType?, + ) { + if (parameter == null) { + ps.setNull(index, jdbcType?.TYPE_CODE ?: JdbcType.JAVA_OBJECT.TYPE_CODE) + return + } + ps.setObject(index, parameter.getUuid()) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/mybatisplus/FastBaseIService.kt b/src/main/kotlin/com/mingliqiye/utils/mybatisplus/FastBaseIService.kt index ac46e60..c7f1a84 100644 --- a/src/main/kotlin/com/mingliqiye/utils/mybatisplus/FastBaseIService.kt +++ b/src/main/kotlin/com/mingliqiye/utils/mybatisplus/FastBaseIService.kt @@ -16,7 +16,7 @@ * ProjectName mingli-utils * ModuleName mingli-utils.main * CurrentFile FastBaseIService.kt - * LastUpdate 2026-10-28 23:26:17 + * LastUpdate 2026-10-31 09:51:52 * UpdateUser MingLiPro */ @@ -66,757 +66,757 @@ import kotlin.reflect.KProperty1 */ open class FastBaseIService> : ServiceImpl(), IService { - /** - * 当前服务绑定的基础映射器实例,等价于[com.baomidou.mybatisplus.extension.repository.CrudRepository.getBaseMapper] - * @return D 继承自[FastBaseMapper]的映射器实例 - */ - val mapper: D - get() = getBaseMapper() - - /** - * 创建[com.baomidou.mybatisplus.core.conditions.query.QueryWrapper]实例 - * @return QueryWrapper 查询包装器实例 - */ - fun queryWrapper() = mapper.queryWrapper() - - /** - * 创建[com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper]实例 - * @return UpdateWrapper 更新包装器实例 - */ - fun updateWrapper() = mapper.updateWrapper() - - /** - * 创建[com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper]实例 - * @return LambdaQueryWrapper Lambda查询包装器实例 - */ - fun lambdaQueryWrapper() = mapper.lambdaQueryWrapper() - - /** - * 创建[com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper]实例 - * @return LambdaUpdateWrapper Lambda更新包装器实例 - */ - fun lambdaUpdateWrapper() = mapper.lambdaUpdateWrapper() - - - /** - * [queryWrapper]的简写形式 - * @return QueryWrapper 查询包装器实例 - */ - fun qw() = queryWrapper() - - /** - * [updateWrapper]的简写形式 - * @return UpdateWrapper 更新包装器实例 - */ - fun uw() = updateWrapper() - - /** - * [lambdaQueryWrapper]的简写形式 - * @return LambdaQueryWrapper Lambda查询包装器实例 - */ - fun lqw() = lambdaQueryWrapper() - - /** - * [lambdaUpdateWrapper]的简写形式 - * @return LambdaUpdateWrapper Lambda更新包装器实例 - */ - fun luw() = lambdaUpdateWrapper() - - - /** - * 按字符串列名等值条件查询记录列表 - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值,执行等值匹配 - * @return List 查询结果列表 - */ - fun selectListByColumn( - column: String, - value: R, - ) = mapper.selectListByColumn(column, value, qw()) - - /** - * 在给定[com.baomidou.mybatisplus.core.conditions.query.QueryWrapper]上追加字符串列名等值条件并查询记录列表 - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值,执行等值匹配 - * @param wrapper 承载查询条件的查询包装器 - * @return List 查询结果列表 - */ - fun selectListByColumn( - column: String, - value: R, - wrapper: QueryWrapper, - ) = mapper.selectListByColumn(column, value, wrapper) - - - /** - * 按方法引用列等值条件查询记录列表 - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值,执行等值匹配 - * @return List 查询结果列表 - */ - fun selectListByColumn( - column: SFunction, - value: R, - ) = mapper.selectListByColumn(column, value, lqw()) - - /** - * 在给定[com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper]上追加方法引用列等值条件并查询记录列表 - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值,执行等值匹配 - * @param wrapper 承载查询条件的Lambda查询包装器 - * @return List 查询结果列表 - */ - fun selectListByColumn( - column: SFunction, - value: R, - wrapper: LambdaQueryWrapper, - ) = mapper.selectListByColumn(column, value, wrapper) - - /** - * 按方法引用列IN条件查询记录列表,集合为空时直接返回空列表而不执行查询 - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值集合,执行IN匹配 - * @return List 查询结果列表 - */ - fun selectListByColumn( - column: SFunction, - value: Collection, - ) = mapper.selectListByColumn(column, value, lqw()) - - /** - * 在给定[LambdaQueryWrapper]上追加方法引用列IN条件并查询记录列表,集合为空时直接返回空列表而不执行查询 - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值集合,执行IN匹配 - * @param wrapper 承载查询条件的Lambda查询包装器 - * @return List 查询结果列表 - */ - fun selectListByColumn( - column: SFunction, - value: Collection, - wrapper: LambdaQueryWrapper = lqw(), - ) = mapper.selectListByColumn(column, value, wrapper) - - /** - * 按字符串列名IN条件查询记录列表,集合为空时直接返回空列表而不执行查询 - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值集合,执行IN匹配 - * @return List 查询结果列表 - */ - fun selectListByColumn( - column: String, - value: Collection, - ) = mapper.selectListByColumn(column, value, qw()) - - /** - * 在给定[QueryWrapper]上追加字符串列名IN条件并查询记录列表,集合为空时直接返回空列表而不执行查询 - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值集合,执行IN匹配 - * @param wrapper 承载查询条件的查询包装器 - * @return List 查询结果列表 - */ - fun selectListByColumn( - column: String, - value: Collection, - wrapper: QueryWrapper = qw(), - ) = mapper.selectListByColumn(column, value, wrapper) - - /** - * 按多个字符串列名等值条件查询记录列表,各列条件以AND连接 - * @param columns 列名与列值构成的二元组,逐项执行等值匹配 - * @return List 查询结果列表 - */ - fun selectListByColumns( - vararg columns: FastBaseMapper.StringAnyTuple2, - ) = mapper.selectListByColumns(columns = columns) - - /** - * 按多个方法引用列等值条件查询记录列表,各列条件以AND连接 - * @param columns 方法引用列与列值构成的二元组,逐项执行等值匹配 - * @return List 查询结果列表 - */ - fun selectListByColumns( - vararg columns: FastBaseMapper.SFunctionAnyTuple2, - ) = mapper.selectListByColumns(lqw(), columns = columns) - - /** - * 在给定[LambdaQueryWrapper]上追加多个方法引用列等值条件并查询记录列表,各列条件以AND连接 - * @param wrapper 承载查询条件的Lambda查询包装器 - * @param columns 方法引用列与列值构成的二元组,逐项执行等值匹配 - * @return List 查询结果列表 - */ - fun selectListByColumns( - wrapper: LambdaQueryWrapper, - vararg columns: FastBaseMapper.SFunctionAnyTuple2, - ) = mapper.selectListByColumns(wrapper = wrapper, columns = columns) - - /** - * 按字符串列名等值条件查询单条记录,结果数量不为1时返回null - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值,执行等值匹配 - * @return T? 唯一的查询结果,不存在或多于一条时返回null - */ - fun selectOneByColumn( - column: String, - value: R, - ) = mapper.selectOneByColumn(column, value, qw()) - - /** - * 在给定[QueryWrapper]上追加字符串列名等值条件并查询单条记录,结果数量不为1时返回null - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值,执行等值匹配 - * @param wrapper 承载查询条件的查询包装器 - * @return T? 唯一的查询结果,不存在或多于一条时返回null - */ - fun selectOneByColumn( - column: String, - value: R, - wrapper: QueryWrapper = qw(), - ) = mapper.selectOneByColumn( - column, value, wrapper - ) - - - /** - * 按方法引用列等值条件查询单条记录,结果数量不为1时返回null - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值,执行等值匹配 - * @return T? 唯一的查询结果,不存在或多于一条时返回null - */ - fun selectOneByColumn( - column: SFunction, - value: R, - ) = selectOneByColumn( - column, value, lqw() - ) - - /** - * 在给定[LambdaQueryWrapper]上追加方法引用列等值条件并查询单条记录,结果数量不为1时返回null - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值,执行等值匹配 - * @param wrapper 承载查询条件的Lambda查询包装器 - * @return T? 唯一的查询结果,不存在或多于一条时返回null - */ - fun selectOneByColumn( - column: SFunction, - value: R, - wrapper: LambdaQueryWrapper, - ) = mapper.selectOneByColumn( - column, value, wrapper - ) - - /** - * 按字符串列名等值条件判断记录是否存在 - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值,执行等值匹配 - * @return Boolean 存在符合条件的记录返回true,否则返回false - */ - fun existsByColumn( - column: String, - value: R, - ) = mapper.existsByColumn(column, value, qw()) - - /** - * 在给定[QueryWrapper]上追加字符串列名等值条件并判断记录是否存在 - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值,执行等值匹配 - * @param wrapper 承载查询条件的查询包装器 - * @return Boolean 存在符合条件的记录返回true,否则返回false - */ - fun existsByColumn( - column: String, - value: R, - wrapper: QueryWrapper = qw(), - ) = mapper.existsByColumn( - column, value, wrapper - ) - - /** - * 按方法引用列等值条件判断记录是否存在 - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值,执行等值匹配 - * @return Boolean 存在符合条件的记录返回true,否则返回false - */ - fun existsByColumn( - column: SFunction, - value: R, - ) = mapper.existsByColumn(column, value, lqw()) - - /** - * 在给定[LambdaQueryWrapper]上追加方法引用列等值条件并判断记录是否存在 - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值,执行等值匹配 - * @param wrapper 承载查询条件的Lambda查询包装器 - * @return Boolean 存在符合条件的记录返回true,否则返回false - */ - fun existsByColumn( - column: SFunction, - value: R, - wrapper: LambdaQueryWrapper = lqw(), - ) = mapper.existsByColumn( - column, value, wrapper - ) - - /** - * 按方法引用列IN条件查询记录并构建有序映射,集合为空时直接返回空映射而不执行查询 - * 返回的[LinkedHashMap]保持入参集合的迭代顺序,缺失的键对应的值为null - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值集合,执行IN匹配 - * @return LinkedHashMap 以列值为键、实体为值的有序映射 - */ - fun selectMapByColumn( - column: SFunction, - value: Collection, - ) = mapper.selectMapByColumn(column, value, lqw()) - - - /** - * 在给定[LambdaQueryWrapper]上按方法引用列IN条件查询记录并构建有序映射,集合为空时直接返回空映射而不执行查询 - * 返回的[LinkedHashMap]保持入参集合的迭代顺序,缺失的键对应的值为null - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值集合,执行IN匹配 - * @param wrapper 承载查询条件的Lambda查询包装器 - * @return LinkedHashMap 以列值为键、实体为值的有序映射 - */ - fun selectMapByColumn( - column: SFunction, - value: Collection, - wrapper: LambdaQueryWrapper = lqw(), - ) = mapper.selectMapByColumn(column, value, wrapper) - - /** - * 按字符串列名IN条件删除记录,集合为空时直接返回0而不执行删除 - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值集合,执行IN匹配 - * @return Int 被删除的行数 - */ - fun deleteByColumn( - column: String, - value: Collection, - ) = mapper.deleteByColumn(column, value, qw()) - - /** - * 在给定[QueryWrapper]上按字符串列名IN条件删除记录,集合为空时直接返回0而不执行删除 - * 注意:MyBatis-Plus对空集合的IN条件会整体跳过,若不拦截将导致全表删除 - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值集合,执行IN匹配 - * @param wrapper 承载查询条件的查询包装器 - * @return Int 被删除的行数 - */ - fun deleteByColumn( - column: String, - value: Collection, - wrapper: QueryWrapper = qw(), - ) = mapper.deleteByColumn(column, value, wrapper) - - /** - * 按方法引用列IN条件删除记录,集合为空时直接返回0而不执行删除 - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值集合,执行IN匹配 - * @return Int 被删除的行数 - */ - fun deleteByColumn( - column: SFunction, - value: Collection, - ) = mapper.deleteByColumn(column, value, lqw()) - - /** - * 在给定[LambdaQueryWrapper]上按方法引用列IN条件删除记录,集合为空时直接返回0而不执行删除 - * 注意:MyBatis-Plus对空集合的IN条件会整体跳过,若不拦截将导致全表删除 - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值集合,执行IN匹配 - * @param wrapper 承载查询条件的Lambda查询包装器 - * @return Int 被删除的行数 - */ - fun deleteByColumn( - column: SFunction, - value: Collection, - wrapper: LambdaQueryWrapper, - ) = mapper.deleteByColumn(column, value, wrapper) - - companion object { - - /** - * 为[FastBaseIService]绑定的实体类型创建[com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper]实例 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @return KtQueryWrapper Kotlin查询包装器实例,使用T类作为参数 - */ - inline fun > FastBaseIService.ktQueryWrapper(): KtQueryWrapper = - KtQueryWrapper(T::class.java) - - /** - * 为[FastBaseIService]绑定的实体类型创建[com.baomidou.mybatisplus.extension.kotlin.KtQueryChainWrapper]实例 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @return KtQueryChainWrapper Kotlin查询链式包装器实例,使用T类作为参数 - */ - inline fun > FastBaseIService.ktQueryChainWrapper(): KtQueryChainWrapper = - KtQueryChainWrapper(T::class.java) - - /** - * 为[FastBaseIService]绑定的实体类型创建[com.baomidou.mybatisplus.extension.kotlin.KtUpdateWrapper]实例 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @return KtUpdateWrapper Kotlin更新包装器实例,使用T类作为参数 - */ - inline fun > FastBaseIService.ktUpdateWrapper(): KtUpdateWrapper = - KtUpdateWrapper(T::class.java) - - /** - * 为[FastBaseIService]绑定的实体类型创建[com.baomidou.mybatisplus.extension.kotlin.KtUpdateChainWrapper]实例 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @return KtUpdateChainWrapper Kotlin更新链式包装器实例,使用T类作为参数 - */ - inline fun > FastBaseIService.ktUpdateChainWrapper(): KtUpdateChainWrapper = - KtUpdateChainWrapper(T::class.java) - - /** - * 创建绑定当前映射器的[KtQueryChainWrapper]实例 - * 与[ktQueryChainWrapper]不同,该链式包装器持有映射器引用,可直接调用`list`/`one`/`page`等方法执行查询 - * @param T 实体类型,必须继承自Any - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @return KtQueryChainWrapper 可执行的Kotlin查询链式包装器实例 - */ - fun > FastBaseIService.ktQueryChain(): KtQueryChainWrapper = - this.mapper.ktQueryChain() - - /** - * 创建绑定当前映射器的[KtUpdateChainWrapper]实例 - * 与[ktUpdateChainWrapper]不同,该链式包装器持有映射器引用,可直接调用`update`/`remove`等方法执行操作 - * @param T 实体类型,必须继承自Any - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @return KtUpdateChainWrapper 可执行的Kotlin更新链式包装器实例 - */ - fun > FastBaseIService.ktUpdateChain(): KtUpdateChainWrapper = - this.mapper.ktUpdateChain() - - /** - * [ktQueryWrapper]的简写形式 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @return KtQueryWrapper Kotlin查询包装器实例,使用T类作为参数 - */ - inline fun > FastBaseIService.kqw(): KtQueryWrapper = - this.mapper.ktQueryWrapper() - - /** - * [ktUpdateWrapper]的简写形式 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @return KtUpdateWrapper Kotlin更新包装器实例,使用T类作为参数 - */ - inline fun > FastBaseIService.kuw(): KtUpdateWrapper = - this.mapper.ktUpdateWrapper() - - /** - * [ktQueryChainWrapper]的简写形式 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @return KtQueryChainWrapper Kotlin查询链式包装器实例,使用T类作为参数 - */ - inline fun > FastBaseIService.kqcw(): KtQueryChainWrapper = - this.mapper.ktQueryChainWrapper() - - /** - * [ktUpdateChainWrapper]的简写形式 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @return KtUpdateChainWrapper Kotlin更新链式包装器实例,使用T类作为参数 - */ - inline fun > FastBaseIService.kucw(): KtUpdateChainWrapper = - this.mapper.ktUpdateChainWrapper() - - /** - * 通过Lambda构建[KtUpdateWrapper]并执行更新 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @param funs 更新包装器构建函数,返回构建完成的更新包装器 - * @return Int 受影响的行数 - */ - inline fun > FastBaseIService.update(funs: (wrapper: KtUpdateWrapper) -> KtUpdateWrapper) = - mapper.update(funs) - - /** - * 通过Lambda构建[KtUpdateWrapper]并携带实体执行更新 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @param entity 承载待更新字段值的实体对象 - * @param funs 更新包装器构建函数,返回构建完成的更新包装器 - * @return Int 受影响的行数 - */ - inline fun > FastBaseIService.update( - entity: T, - funs: (wrapper: KtUpdateWrapper) -> KtUpdateWrapper, - ) = mapper.update(entity, funs) - - /** - * 通过Lambda构建[KtQueryWrapper]并执行查询 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @param funs 查询包装器构建函数,返回构建完成的查询包装器 - * @return List 查询结果列表 - */ - inline fun > FastBaseIService.selectList(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper) = - mapper.selectList(funs) - - /** - * 通过Lambda构建[KtQueryWrapper]并执行分页查询 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @param page 分页参数对象 - * @param funs 查询包装器构建函数,返回构建完成的查询包装器 - * @return Page 分页查询结果 - */ - inline fun > FastBaseIService.selectPage( - page: Page, - funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper = { it }, - ) = mapper.selectPage(page, funs) - - /** - * 通过页码与每页大小直接执行分页查询 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @param current 当前页码,从1开始 - * @param size 每页记录数 - * @param funs 查询包装器构建函数,返回构建完成的查询包装器 - * @return Page 分页查询结果 - */ - inline fun > FastBaseIService.selectPage( - current: Long, - size: Long, - funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper = { it }, - ) = mapper.selectPage( - current, size, funs - ) - - /** - * 通过Lambda构建[KtQueryWrapper]并查询单条记录 - * 结果数量不为1时返回null,不抛出异常 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @param funs 查询包装器构建函数,返回构建完成的查询包装器 - * @return T? 唯一的查询结果,不存在或多于一条时返回null - */ - inline fun > FastBaseIService.selectOne(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper) = - mapper.selectOne(funs) - - /** - * 通过Lambda构建[KtQueryWrapper]并统计记录数 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @param funs 查询包装器构建函数,返回构建完成的查询包装器 - * @return Long 符合条件的记录总数 - */ - inline fun > FastBaseIService.selectCount(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper) = - mapper.selectCount(funs) - - /** - * 通过Lambda构建[KtQueryWrapper]并判断记录是否存在 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @param funs 查询包装器构建函数,返回构建完成的查询包装器 - * @return Boolean 存在符合条件的记录返回true,否则返回false - */ - inline fun > FastBaseIService.exists(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper) = - mapper.exists(funs) - - /** - * 通过Lambda构建[KtQueryWrapper]并执行删除 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @param funs 查询包装器构建函数,返回构建完成的查询包装器 - * @return Int 被删除的行数 - */ - inline fun > FastBaseIService.delete(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper) = - mapper.delete( - funs - ) - - /** - * 按单列等值条件查询记录列表 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @param R 列值类型 - * @receiver FastBaseIService 快速服务实例 - * @param column 实体列属性引用 - * @param value 列值,执行等值匹配 - * @param funs 附加查询包装器构建函数,在等值条件之前应用 - * @return List 查询结果列表 - */ - inline fun , R> FastBaseIService.selectListByColumn( - column: KProperty1, - value: R, - funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, - ) = mapper.selectListByColumn( - column, value, funs - ) - - /** - * 按单列IN条件查询记录列表,集合为空时直接返回空列表而不执行查询 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @param R 列值类型 - * @receiver FastBaseIService 快速服务实例 - * @param column 实体列属性引用 - * @param value 列值集合,执行IN匹配 - * @param funs 附加查询包装器构建函数,在IN条件之前应用 - * @return List 查询结果列表 - */ - inline fun , R> FastBaseIService.selectListByColumn( - column: KProperty1, - value: Collection, - funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, - ) = mapper.selectListByColumn( - column, value, funs - ) - - /** - * 按多列等值条件查询记录列表 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @receiver FastBaseIService 快速服务实例 - * @param columns 列属性引用与列值的键值对,逐项执行等值匹配 - * @param funs 附加查询包装器构建函数,在各列等值条件之前应用 - * @return List 查询结果列表 - */ - inline fun > FastBaseIService.selectListByColumns( - vararg columns: Pair, Any?>, - funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, - ) = mapper.selectListByColumns(columns = columns, funs) - - /** - * 按单列等值条件查询单条记录,结果数量不为1时返回null - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @param R 列值类型 - * @receiver FastBaseIService 快速服务实例 - * @param column 实体列属性引用 - * @param value 列值,执行等值匹配 - * @param funs 附加查询包装器构建函数,在等值条件之前应用 - * @return T? 唯一的查询结果,不存在或多于一条时返回null - */ - inline fun , R> FastBaseIService.selectOneByColumn( - column: KProperty1, - value: R, - funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, - ) = mapper.selectOneByColumn( - column, value, funs - ) - - /** - * 按单列等值条件判断记录是否存在 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @param R 列值类型 - * @receiver FastBaseIService 快速服务实例 - * @param column 实体列属性引用 - * @param value 列值,执行等值匹配 - * @param funs 附加查询包装器构建函数,在等值条件之前应用 - * @return Boolean 存在符合条件的记录返回true,否则返回false - */ - inline fun , R> FastBaseIService.existsByColumn( - column: KProperty1, - value: R, - funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, - ) = mapper.existsByColumn( - column, value, funs - ) - - /** - * 按单列IN条件查询记录并构建有序映射,集合为空时直接返回空映射而不执行查询 - * 返回的[LinkedHashMap]保持入参集合的迭代顺序,缺失的键对应的值为null - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @param R 列值类型 - * @receiver FastBaseIService 快速服务实例 - * @param column 实体列属性引用 - * @param value 列值集合,执行IN匹配 - * @param funs 附加查询包装器构建函数,在IN条件之前应用 - * @return LinkedHashMap 以列值为键、实体为值的有序映射 - */ - inline fun , R> FastBaseIService.selectMapByColumn( - column: KProperty1, - value: Collection, - funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, - ) = mapper.selectMapByColumn( - column, value, funs - ) - - /** - * 按单列等值条件删除记录 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @param R 列值类型 - * @receiver FastBaseIService 快速服务实例 - * @param column 实体列属性引用 - * @param value 列值,执行等值匹配 - * @param funs 附加查询包装器构建函数,在等值条件之前应用 - * @return Int 被删除的行数 - */ - inline fun , R> FastBaseIService.deleteByColumn( - column: KProperty1, - value: R, - funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, - ) = mapper.deleteByColumn(column, value, funs) - - /** - * 按单列IN条件删除记录,集合为空时直接返回0而不执行删除 - * 注意:MyBatis-Plus对空集合的IN条件会整体跳过,若不拦截将导致全表删除 - * @param T 实体类型,必须继承自Any,通过reified获取实际类型 - * @param MP 基础映射器类型,必须继承自[FastBaseMapper] - * @param R 列值类型 - * @receiver FastBaseIService 快速服务实例 - * @param column 实体列属性引用 - * @param value 列值集合,执行IN匹配 - * @param funs 附加查询包装器构建函数,在IN条件之前应用 - * @return Int 被删除的行数 - */ - inline fun , R> FastBaseIService.deleteByColumn( - column: KProperty1, - value: Collection, - funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, - ) = mapper.deleteByColumn(column, value, funs) - } + /** + * 当前服务绑定的基础映射器实例,等价于[com.baomidou.mybatisplus.extension.repository.CrudRepository.getBaseMapper] + * @return D 继承自[FastBaseMapper]的映射器实例 + */ + open val mapper: D + get() = getBaseMapper() + + /** + * 创建[com.baomidou.mybatisplus.core.conditions.query.QueryWrapper]实例 + * @return QueryWrapper 查询包装器实例 + */ + open fun queryWrapper() = mapper.queryWrapper() + + /** + * 创建[com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper]实例 + * @return UpdateWrapper 更新包装器实例 + */ + open fun updateWrapper() = mapper.updateWrapper() + + /** + * 创建[com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper]实例 + * @return LambdaQueryWrapper Lambda查询包装器实例 + */ + open fun lambdaQueryWrapper() = mapper.lambdaQueryWrapper() + + /** + * 创建[com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper]实例 + * @return LambdaUpdateWrapper Lambda更新包装器实例 + */ + open fun lambdaUpdateWrapper() = mapper.lambdaUpdateWrapper() + + + /** + * [queryWrapper]的简写形式 + * @return QueryWrapper 查询包装器实例 + */ + open fun qw() = queryWrapper() + + /** + * [updateWrapper]的简写形式 + * @return UpdateWrapper 更新包装器实例 + */ + open fun uw() = updateWrapper() + + /** + * [lambdaQueryWrapper]的简写形式 + * @return LambdaQueryWrapper Lambda查询包装器实例 + */ + open fun lqw() = lambdaQueryWrapper() + + /** + * [lambdaUpdateWrapper]的简写形式 + * @return LambdaUpdateWrapper Lambda更新包装器实例 + */ + open fun luw() = lambdaUpdateWrapper() + + + /** + * 按字符串列名等值条件查询记录列表 + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值,执行等值匹配 + * @return List 查询结果列表 + */ + open fun selectListByColumn( + column: String, + value: R, + ) = mapper.selectListByColumn(column, value, qw()) + + /** + * 在给定[com.baomidou.mybatisplus.core.conditions.query.QueryWrapper]上追加字符串列名等值条件并查询记录列表 + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值,执行等值匹配 + * @param wrapper 承载查询条件的查询包装器 + * @return List 查询结果列表 + */ + open fun selectListByColumn( + column: String, + value: R, + wrapper: QueryWrapper, + ) = mapper.selectListByColumn(column, value, wrapper) + + + /** + * 按方法引用列等值条件查询记录列表 + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值,执行等值匹配 + * @return List 查询结果列表 + */ + open fun selectListByColumn( + column: SFunction, + value: R, + ) = mapper.selectListByColumn(column, value, lqw()) + + /** + * 在给定[com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper]上追加方法引用列等值条件并查询记录列表 + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值,执行等值匹配 + * @param wrapper 承载查询条件的Lambda查询包装器 + * @return List 查询结果列表 + */ + open fun selectListByColumn( + column: SFunction, + value: R, + wrapper: LambdaQueryWrapper, + ) = mapper.selectListByColumn(column, value, wrapper) + + /** + * 按方法引用列IN条件查询记录列表,集合为空时直接返回空列表而不执行查询 + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值集合,执行IN匹配 + * @return List 查询结果列表 + */ + open fun selectListByColumn( + column: SFunction, + value: Collection, + ) = mapper.selectListByColumn(column, value, lqw()) + + /** + * 在给定[LambdaQueryWrapper]上追加方法引用列IN条件并查询记录列表,集合为空时直接返回空列表而不执行查询 + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值集合,执行IN匹配 + * @param wrapper 承载查询条件的Lambda查询包装器 + * @return List 查询结果列表 + */ + open fun selectListByColumn( + column: SFunction, + value: Collection, + wrapper: LambdaQueryWrapper = lqw(), + ) = mapper.selectListByColumn(column, value, wrapper) + + /** + * 按字符串列名IN条件查询记录列表,集合为空时直接返回空列表而不执行查询 + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值集合,执行IN匹配 + * @return List 查询结果列表 + */ + open fun selectListByColumn( + column: String, + value: Collection, + ) = mapper.selectListByColumn(column, value, qw()) + + /** + * 在给定[QueryWrapper]上追加字符串列名IN条件并查询记录列表,集合为空时直接返回空列表而不执行查询 + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值集合,执行IN匹配 + * @param wrapper 承载查询条件的查询包装器 + * @return List 查询结果列表 + */ + open fun selectListByColumn( + column: String, + value: Collection, + wrapper: QueryWrapper = qw(), + ) = mapper.selectListByColumn(column, value, wrapper) + + /** + * 按多个字符串列名等值条件查询记录列表,各列条件以AND连接 + * @param columns 列名与列值构成的二元组,逐项执行等值匹配 + * @return List 查询结果列表 + */ + open fun selectListByColumns( + vararg columns: FastBaseMapper.StringAnyTuple2, + ) = mapper.selectListByColumns(columns = columns) + + /** + * 按多个方法引用列等值条件查询记录列表,各列条件以AND连接 + * @param columns 方法引用列与列值构成的二元组,逐项执行等值匹配 + * @return List 查询结果列表 + */ + open fun selectListByColumns( + vararg columns: FastBaseMapper.SFunctionAnyTuple2, + ) = mapper.selectListByColumns(lqw(), columns = columns) + + /** + * 在给定[LambdaQueryWrapper]上追加多个方法引用列等值条件并查询记录列表,各列条件以AND连接 + * @param wrapper 承载查询条件的Lambda查询包装器 + * @param columns 方法引用列与列值构成的二元组,逐项执行等值匹配 + * @return List 查询结果列表 + */ + open fun selectListByColumns( + wrapper: LambdaQueryWrapper, + vararg columns: FastBaseMapper.SFunctionAnyTuple2, + ) = mapper.selectListByColumns(wrapper = wrapper, columns = columns) + + /** + * 按字符串列名等值条件查询单条记录,结果数量不为1时返回null + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值,执行等值匹配 + * @return T? 唯一的查询结果,不存在或多于一条时返回null + */ + open fun selectOneByColumn( + column: String, + value: R, + ) = mapper.selectOneByColumn(column, value, qw()) + + /** + * 在给定[QueryWrapper]上追加字符串列名等值条件并查询单条记录,结果数量不为1时返回null + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值,执行等值匹配 + * @param wrapper 承载查询条件的查询包装器 + * @return T? 唯一的查询结果,不存在或多于一条时返回null + */ + open fun selectOneByColumn( + column: String, + value: R, + wrapper: QueryWrapper = qw(), + ) = mapper.selectOneByColumn( + column, value, wrapper + ) + + + /** + * 按方法引用列等值条件查询单条记录,结果数量不为1时返回null + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值,执行等值匹配 + * @return T? 唯一的查询结果,不存在或多于一条时返回null + */ + open fun selectOneByColumn( + column: SFunction, + value: R, + ) = selectOneByColumn( + column, value, lqw() + ) + + /** + * 在给定[LambdaQueryWrapper]上追加方法引用列等值条件并查询单条记录,结果数量不为1时返回null + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值,执行等值匹配 + * @param wrapper 承载查询条件的Lambda查询包装器 + * @return T? 唯一的查询结果,不存在或多于一条时返回null + */ + open fun selectOneByColumn( + column: SFunction, + value: R, + wrapper: LambdaQueryWrapper, + ) = mapper.selectOneByColumn( + column, value, wrapper + ) + + /** + * 按字符串列名等值条件判断记录是否存在 + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值,执行等值匹配 + * @return Boolean 存在符合条件的记录返回true,否则返回false + */ + open fun existsByColumn( + column: String, + value: R, + ) = mapper.existsByColumn(column, value, qw()) + + /** + * 在给定[QueryWrapper]上追加字符串列名等值条件并判断记录是否存在 + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值,执行等值匹配 + * @param wrapper 承载查询条件的查询包装器 + * @return Boolean 存在符合条件的记录返回true,否则返回false + */ + open fun existsByColumn( + column: String, + value: R, + wrapper: QueryWrapper = qw(), + ) = mapper.existsByColumn( + column, value, wrapper + ) + + /** + * 按方法引用列等值条件判断记录是否存在 + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值,执行等值匹配 + * @return Boolean 存在符合条件的记录返回true,否则返回false + */ + open fun existsByColumn( + column: SFunction, + value: R, + ) = mapper.existsByColumn(column, value, lqw()) + + /** + * 在给定[LambdaQueryWrapper]上追加方法引用列等值条件并判断记录是否存在 + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值,执行等值匹配 + * @param wrapper 承载查询条件的Lambda查询包装器 + * @return Boolean 存在符合条件的记录返回true,否则返回false + */ + open fun existsByColumn( + column: SFunction, + value: R, + wrapper: LambdaQueryWrapper = lqw(), + ) = mapper.existsByColumn( + column, value, wrapper + ) + + /** + * 按方法引用列IN条件查询记录并构建有序映射,集合为空时直接返回空映射而不执行查询 + * 返回的[LinkedHashMap]保持入参集合的迭代顺序,缺失的键对应的值为null + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值集合,执行IN匹配 + * @return LinkedHashMap 以列值为键、实体为值的有序映射 + */ + open fun selectMapByColumn( + column: SFunction, + value: Collection, + ) = mapper.selectMapByColumn(column, value, lqw()) + + + /** + * 在给定[LambdaQueryWrapper]上按方法引用列IN条件查询记录并构建有序映射,集合为空时直接返回空映射而不执行查询 + * 返回的[LinkedHashMap]保持入参集合的迭代顺序,缺失的键对应的值为null + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值集合,执行IN匹配 + * @param wrapper 承载查询条件的Lambda查询包装器 + * @return LinkedHashMap 以列值为键、实体为值的有序映射 + */ + open fun selectMapByColumn( + column: SFunction, + value: Collection, + wrapper: LambdaQueryWrapper = lqw(), + ) = mapper.selectMapByColumn(column, value, wrapper) + + /** + * 按字符串列名IN条件删除记录,集合为空时直接返回0而不执行删除 + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值集合,执行IN匹配 + * @return Int 被删除的行数 + */ + open fun deleteByColumn( + column: String, + value: Collection, + ) = mapper.deleteByColumn(column, value, qw()) + + /** + * 在给定[QueryWrapper]上按字符串列名IN条件删除记录,集合为空时直接返回0而不执行删除 + * 注意:MyBatis-Plus对空集合的IN条件会整体跳过,若不拦截将导致全表删除 + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值集合,执行IN匹配 + * @param wrapper 承载查询条件的查询包装器 + * @return Int 被删除的行数 + */ + open fun deleteByColumn( + column: String, + value: Collection, + wrapper: QueryWrapper = qw(), + ) = mapper.deleteByColumn(column, value, wrapper) + + /** + * 按方法引用列IN条件删除记录,集合为空时直接返回0而不执行删除 + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值集合,执行IN匹配 + * @return Int 被删除的行数 + */ + open fun deleteByColumn( + column: SFunction, + value: Collection, + ) = mapper.deleteByColumn(column, value, lqw()) + + /** + * 在给定[LambdaQueryWrapper]上按方法引用列IN条件删除记录,集合为空时直接返回0而不执行删除 + * 注意:MyBatis-Plus对空集合的IN条件会整体跳过,若不拦截将导致全表删除 + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值集合,执行IN匹配 + * @param wrapper 承载查询条件的Lambda查询包装器 + * @return Int 被删除的行数 + */ + open fun deleteByColumn( + column: SFunction, + value: Collection, + wrapper: LambdaQueryWrapper, + ) = mapper.deleteByColumn(column, value, wrapper) + + companion object { + + /** + * 为[FastBaseIService]绑定的实体类型创建[com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper]实例 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @return KtQueryWrapper Kotlin查询包装器实例,使用T类作为参数 + */ + inline fun > FastBaseIService.ktQueryWrapper(): KtQueryWrapper = + KtQueryWrapper(T::class.java) + + /** + * 为[FastBaseIService]绑定的实体类型创建[com.baomidou.mybatisplus.extension.kotlin.KtQueryChainWrapper]实例 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @return KtQueryChainWrapper Kotlin查询链式包装器实例,使用T类作为参数 + */ + inline fun > FastBaseIService.ktQueryChainWrapper(): KtQueryChainWrapper = + KtQueryChainWrapper(T::class.java) + + /** + * 为[FastBaseIService]绑定的实体类型创建[com.baomidou.mybatisplus.extension.kotlin.KtUpdateWrapper]实例 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @return KtUpdateWrapper Kotlin更新包装器实例,使用T类作为参数 + */ + inline fun > FastBaseIService.ktUpdateWrapper(): KtUpdateWrapper = + KtUpdateWrapper(T::class.java) + + /** + * 为[FastBaseIService]绑定的实体类型创建[com.baomidou.mybatisplus.extension.kotlin.KtUpdateChainWrapper]实例 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @return KtUpdateChainWrapper Kotlin更新链式包装器实例,使用T类作为参数 + */ + inline fun > FastBaseIService.ktUpdateChainWrapper(): KtUpdateChainWrapper = + KtUpdateChainWrapper(T::class.java) + + /** + * 创建绑定当前映射器的[KtQueryChainWrapper]实例 + * 与[ktQueryChainWrapper]不同,该链式包装器持有映射器引用,可直接调用`list`/`one`/`page`等方法执行查询 + * @param T 实体类型,必须继承自Any + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @return KtQueryChainWrapper 可执行的Kotlin查询链式包装器实例 + */ + fun > FastBaseIService.ktQueryChain(): KtQueryChainWrapper = + this.mapper.ktQueryChain() + + /** + * 创建绑定当前映射器的[KtUpdateChainWrapper]实例 + * 与[ktUpdateChainWrapper]不同,该链式包装器持有映射器引用,可直接调用`update`/`remove`等方法执行操作 + * @param T 实体类型,必须继承自Any + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @return KtUpdateChainWrapper 可执行的Kotlin更新链式包装器实例 + */ + fun > FastBaseIService.ktUpdateChain(): KtUpdateChainWrapper = + this.mapper.ktUpdateChain() + + /** + * [ktQueryWrapper]的简写形式 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @return KtQueryWrapper Kotlin查询包装器实例,使用T类作为参数 + */ + inline fun > FastBaseIService.kqw(): KtQueryWrapper = + this.mapper.ktQueryWrapper() + + /** + * [ktUpdateWrapper]的简写形式 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @return KtUpdateWrapper Kotlin更新包装器实例,使用T类作为参数 + */ + inline fun > FastBaseIService.kuw(): KtUpdateWrapper = + this.mapper.ktUpdateWrapper() + + /** + * [ktQueryChainWrapper]的简写形式 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @return KtQueryChainWrapper Kotlin查询链式包装器实例,使用T类作为参数 + */ + inline fun > FastBaseIService.kqcw(): KtQueryChainWrapper = + this.mapper.ktQueryChainWrapper() + + /** + * [ktUpdateChainWrapper]的简写形式 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @return KtUpdateChainWrapper Kotlin更新链式包装器实例,使用T类作为参数 + */ + inline fun > FastBaseIService.kucw(): KtUpdateChainWrapper = + this.mapper.ktUpdateChainWrapper() + + /** + * 通过Lambda构建[KtUpdateWrapper]并执行更新 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @param funs 更新包装器构建函数,返回构建完成的更新包装器 + * @return Int 受影响的行数 + */ + inline fun > FastBaseIService.update(funs: (wrapper: KtUpdateWrapper) -> KtUpdateWrapper) = + mapper.update(funs) + + /** + * 通过Lambda构建[KtUpdateWrapper]并携带实体执行更新 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @param entity 承载待更新字段值的实体对象 + * @param funs 更新包装器构建函数,返回构建完成的更新包装器 + * @return Int 受影响的行数 + */ + inline fun > FastBaseIService.update( + entity: T, + funs: (wrapper: KtUpdateWrapper) -> KtUpdateWrapper, + ) = mapper.update(entity, funs) + + /** + * 通过Lambda构建[KtQueryWrapper]并执行查询 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @param funs 查询包装器构建函数,返回构建完成的查询包装器 + * @return List 查询结果列表 + */ + inline fun > FastBaseIService.selectList(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper) = + mapper.selectList(funs) + + /** + * 通过Lambda构建[KtQueryWrapper]并执行分页查询 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @param page 分页参数对象 + * @param funs 查询包装器构建函数,返回构建完成的查询包装器 + * @return Page 分页查询结果 + */ + inline fun > FastBaseIService.selectPage( + page: Page, + funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper = { it }, + ) = mapper.selectPage(page, funs) + + /** + * 通过页码与每页大小直接执行分页查询 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @param current 当前页码,从1开始 + * @param size 每页记录数 + * @param funs 查询包装器构建函数,返回构建完成的查询包装器 + * @return Page 分页查询结果 + */ + inline fun > FastBaseIService.selectPage( + current: Long, + size: Long, + funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper = { it }, + ) = mapper.selectPage( + current, size, funs + ) + + /** + * 通过Lambda构建[KtQueryWrapper]并查询单条记录 + * 结果数量不为1时返回null,不抛出异常 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @param funs 查询包装器构建函数,返回构建完成的查询包装器 + * @return T? 唯一的查询结果,不存在或多于一条时返回null + */ + inline fun > FastBaseIService.selectOne(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper) = + mapper.selectOne(funs) + + /** + * 通过Lambda构建[KtQueryWrapper]并统计记录数 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @param funs 查询包装器构建函数,返回构建完成的查询包装器 + * @return Long 符合条件的记录总数 + */ + inline fun > FastBaseIService.selectCount(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper) = + mapper.selectCount(funs) + + /** + * 通过Lambda构建[KtQueryWrapper]并判断记录是否存在 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @param funs 查询包装器构建函数,返回构建完成的查询包装器 + * @return Boolean 存在符合条件的记录返回true,否则返回false + */ + inline fun > FastBaseIService.exists(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper) = + mapper.exists(funs) + + /** + * 通过Lambda构建[KtQueryWrapper]并执行删除 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @param funs 查询包装器构建函数,返回构建完成的查询包装器 + * @return Int 被删除的行数 + */ + inline fun > FastBaseIService.delete(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper) = + mapper.delete( + funs + ) + + /** + * 按单列等值条件查询记录列表 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @param R 列值类型 + * @receiver FastBaseIService 快速服务实例 + * @param column 实体列属性引用 + * @param value 列值,执行等值匹配 + * @param funs 附加查询包装器构建函数,在等值条件之前应用 + * @return List 查询结果列表 + */ + inline fun , R> FastBaseIService.selectListByColumn( + column: KProperty1, + value: R, + funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, + ) = mapper.selectListByColumn( + column, value, funs + ) + + /** + * 按单列IN条件查询记录列表,集合为空时直接返回空列表而不执行查询 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @param R 列值类型 + * @receiver FastBaseIService 快速服务实例 + * @param column 实体列属性引用 + * @param value 列值集合,执行IN匹配 + * @param funs 附加查询包装器构建函数,在IN条件之前应用 + * @return List 查询结果列表 + */ + inline fun , R> FastBaseIService.selectListByColumn( + column: KProperty1, + value: Collection, + funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, + ) = mapper.selectListByColumn( + column, value, funs + ) + + /** + * 按多列等值条件查询记录列表 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @receiver FastBaseIService 快速服务实例 + * @param columns 列属性引用与列值的键值对,逐项执行等值匹配 + * @param funs 附加查询包装器构建函数,在各列等值条件之前应用 + * @return List 查询结果列表 + */ + inline fun > FastBaseIService.selectListByColumns( + vararg columns: Pair, Any?>, + funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, + ) = mapper.selectListByColumns(columns = columns, funs) + + /** + * 按单列等值条件查询单条记录,结果数量不为1时返回null + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @param R 列值类型 + * @receiver FastBaseIService 快速服务实例 + * @param column 实体列属性引用 + * @param value 列值,执行等值匹配 + * @param funs 附加查询包装器构建函数,在等值条件之前应用 + * @return T? 唯一的查询结果,不存在或多于一条时返回null + */ + inline fun , R> FastBaseIService.selectOneByColumn( + column: KProperty1, + value: R, + funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, + ) = mapper.selectOneByColumn( + column, value, funs + ) + + /** + * 按单列等值条件判断记录是否存在 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @param R 列值类型 + * @receiver FastBaseIService 快速服务实例 + * @param column 实体列属性引用 + * @param value 列值,执行等值匹配 + * @param funs 附加查询包装器构建函数,在等值条件之前应用 + * @return Boolean 存在符合条件的记录返回true,否则返回false + */ + inline fun , R> FastBaseIService.existsByColumn( + column: KProperty1, + value: R, + funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, + ) = mapper.existsByColumn( + column, value, funs + ) + + /** + * 按单列IN条件查询记录并构建有序映射,集合为空时直接返回空映射而不执行查询 + * 返回的[LinkedHashMap]保持入参集合的迭代顺序,缺失的键对应的值为null + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @param R 列值类型 + * @receiver FastBaseIService 快速服务实例 + * @param column 实体列属性引用 + * @param value 列值集合,执行IN匹配 + * @param funs 附加查询包装器构建函数,在IN条件之前应用 + * @return LinkedHashMap 以列值为键、实体为值的有序映射 + */ + inline fun , R> FastBaseIService.selectMapByColumn( + column: KProperty1, + value: Collection, + funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, + ) = mapper.selectMapByColumn( + column, value, funs + ) + + /** + * 按单列等值条件删除记录 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @param R 列值类型 + * @receiver FastBaseIService 快速服务实例 + * @param column 实体列属性引用 + * @param value 列值,执行等值匹配 + * @param funs 附加查询包装器构建函数,在等值条件之前应用 + * @return Int 被删除的行数 + */ + inline fun , R> FastBaseIService.deleteByColumn( + column: KProperty1, + value: R, + funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, + ) = mapper.deleteByColumn(column, value, funs) + + /** + * 按单列IN条件删除记录,集合为空时直接返回0而不执行删除 + * 注意:MyBatis-Plus对空集合的IN条件会整体跳过,若不拦截将导致全表删除 + * @param T 实体类型,必须继承自Any,通过reified获取实际类型 + * @param MP 基础映射器类型,必须继承自[FastBaseMapper] + * @param R 列值类型 + * @receiver FastBaseIService 快速服务实例 + * @param column 实体列属性引用 + * @param value 列值集合,执行IN匹配 + * @param funs 附加查询包装器构建函数,在IN条件之前应用 + * @return Int 被删除的行数 + */ + inline fun , R> FastBaseIService.deleteByColumn( + column: KProperty1, + value: Collection, + funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, + ) = mapper.deleteByColumn(column, value, funs) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/mybatisplus/FastBaseMapper.kt b/src/main/kotlin/com/mingliqiye/utils/mybatisplus/FastBaseMapper.kt index 7c0567f..8fdaf1f 100644 --- a/src/main/kotlin/com/mingliqiye/utils/mybatisplus/FastBaseMapper.kt +++ b/src/main/kotlin/com/mingliqiye/utils/mybatisplus/FastBaseMapper.kt @@ -46,822 +46,822 @@ import kotlin.reflect.KProperty1 * 包含普通包装器、`Lambda`包装器和`Kotlin`专用包装器的创建方法 */ interface FastBaseMapper : BaseMapper { - /** - * 创建[com.baomidou.mybatisplus.core.conditions.query.QueryWrapper]实例 - * @return QueryWrapper 查询包装器实例 - */ - fun queryWrapper() = QueryWrapper() - - /** - * 创建[com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper]实例 - * @return UpdateWrapper 更新包装器实例 - */ - fun updateWrapper() = UpdateWrapper() - - /** - * 创建[com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper]实例 - * @return LambdaQueryWrapper Lambda查询包装器实例 - */ - fun lambdaQueryWrapper() = LambdaQueryWrapper() - - /** - * 创建[com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper]实例 - * @return LambdaUpdateWrapper Lambda更新包装器实例 - */ - fun lambdaUpdateWrapper() = LambdaUpdateWrapper() - - - /** - * [queryWrapper]的简写形式 - * @return QueryWrapper 查询包装器实例 - */ - fun qw() = queryWrapper() - - /** - * [updateWrapper]的简写形式 - * @return UpdateWrapper 更新包装器实例 - */ - fun uw() = updateWrapper() - - /** - * [lambdaQueryWrapper]的简写形式 - * @return LambdaQueryWrapper Lambda查询包装器实例 - */ - fun lqw() = lambdaQueryWrapper() - - /** - * [lambdaUpdateWrapper]的简写形式 - * @return LambdaUpdateWrapper Lambda更新包装器实例 - */ - fun luw() = lambdaUpdateWrapper() - - - /** - * 按字符串列名等值条件查询记录列表 - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值,执行等值匹配 - * @return List 查询结果列表 - */ - fun selectListByColumn( - column: String, - value: R, - ): List = selectListByColumn(column, value, qw()) - - /** - * 在给定[QueryWrapper]上追加字符串列名等值条件并查询记录列表 - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值,执行等值匹配 - * @param wrapper 承载查询条件的查询包装器 - * @return List 查询结果列表 - */ - fun selectListByColumn( - column: String, - value: R, - wrapper: QueryWrapper, - ): List = selectList(wrapper.eq(column, value)) - - - /** - * 按方法引用列等值条件查询记录列表 - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值,执行等值匹配 - * @return List 查询结果列表 - */ - fun selectListByColumn( - column: SFunction, - value: R, - ): List = selectListByColumn(column, value, lqw()) - - /** - * 在给定[LambdaQueryWrapper]上追加方法引用列等值条件并查询记录列表 - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值,执行等值匹配 - * @param wrapper 承载查询条件的Lambda查询包装器 - * @return List 查询结果列表 - */ - fun selectListByColumn( - column: SFunction, - value: R, - wrapper: LambdaQueryWrapper, - ): List = selectList(wrapper.eq(column, value)) - - /** - * 按方法引用列IN条件查询记录列表,集合为空时直接返回空列表而不执行查询 - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值集合,执行IN匹配 - * @return List 查询结果列表 - */ - fun selectListByColumn( - column: SFunction, - value: Collection, - ): List = selectListByColumn(column, value, lqw()) - - /** - * 在给定[LambdaQueryWrapper]上追加方法引用列IN条件并查询记录列表,集合为空时直接返回空列表而不执行查询 - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值集合,执行IN匹配 - * @param wrapper 承载查询条件的Lambda查询包装器 - * @return List 查询结果列表 - */ - fun selectListByColumn( - column: SFunction, - value: Collection, - wrapper: LambdaQueryWrapper = lqw(), - ): List { - if (value.isEmpty()) return emptyList() - return selectList(wrapper.`in`(column, value)) - } - - /** - * 按字符串列名IN条件查询记录列表,集合为空时直接返回空列表而不执行查询 - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值集合,执行IN匹配 - * @return List 查询结果列表 - */ - fun selectListByColumn( - column: String, - value: Collection, - ): List = selectListByColumn(column, value, qw()) - - /** - * 在给定[QueryWrapper]上追加字符串列名IN条件并查询记录列表,集合为空时直接返回空列表而不执行查询 - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值集合,执行IN匹配 - * @param wrapper 承载查询条件的查询包装器 - * @return List 查询结果列表 - */ - fun selectListByColumn( - column: String, - value: Collection, - wrapper: QueryWrapper = qw(), - ): List { - if (value.isEmpty()) return emptyList() - return selectList(wrapper.`in`(column, value)) - } - - /** - * 字符串列名与列值构成的二元组,用于[selectListByColumns]的可变参数传参 - * @property t1 列名(数据库字段名) - * @property t2 列值 - */ - class StringAnyTuple2( - val t1: String, - val t2: Any, - ) : Tuple(2) { - operator fun component1() = t1 - operator fun component2() = t2 - } - - /** - * 方法引用列与列值构成的二元组,用于[selectListByColumns]的可变参数传参 - * @param T 实体类型 - * @param D 列值类型 - * @property t1 实体列的方法引用 - * @property t2 列值 - */ - class SFunctionAnyTuple2( - val t1: SFunction, - val t2: D, - ) : Tuple(2) { - operator fun component1() = t1 - operator fun component2() = t2 - } - - /** - * 按多个字符串列名等值条件查询记录列表,各列条件以AND连接 - * @param columns 列名与列值构成的二元组,逐项执行等值匹配 - * @return List 查询结果列表 - */ - fun selectListByColumns( - vararg columns: StringAnyTuple2, - ): List = selectList(qw().let { wrapper -> - columns.forEach { (column, value) -> - wrapper.eq(column, value) - } - wrapper - }) - - /** - * 按多个方法引用列等值条件查询记录列表,各列条件以AND连接 - * @param columns 方法引用列与列值构成的二元组,逐项执行等值匹配 - * @return List 查询结果列表 - */ - fun selectListByColumns( - vararg columns: SFunctionAnyTuple2, - ): List = selectListByColumns(lqw(), *columns) - - /** - * 在给定[LambdaQueryWrapper]上追加多个方法引用列等值条件并查询记录列表,各列条件以AND连接 - * @param wrapper 承载查询条件的Lambda查询包装器 - * @param columns 方法引用列与列值构成的二元组,逐项执行等值匹配 - * @return List 查询结果列表 - */ - fun selectListByColumns( - wrapper: LambdaQueryWrapper, - vararg columns: SFunctionAnyTuple2, - ): List = selectList(wrapper.let { - columns.forEach { (column, value) -> - it.eq(column, value) - } - it - }) - - /** - * 按字符串列名等值条件查询单条记录,结果数量不为1时返回null - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值,执行等值匹配 - * @return T? 唯一的查询结果,不存在或多于一条时返回null - */ - fun selectOneByColumn( - column: String, - value: R, - ): T? = selectOneByColumn(column, value, qw()) - - /** - * 在给定[QueryWrapper]上追加字符串列名等值条件并查询单条记录,结果数量不为1时返回null - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值,执行等值匹配 - * @param wrapper 承载查询条件的查询包装器 - * @return T? 唯一的查询结果,不存在或多于一条时返回null - */ - fun selectOneByColumn( - column: String, - value: R, - wrapper: QueryWrapper = qw(), - ): T? = selectOne( - wrapper.eq(column, value), - ) - - - /** - * 按方法引用列等值条件查询单条记录,结果数量不为1时返回null - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值,执行等值匹配 - * @return T? 唯一的查询结果,不存在或多于一条时返回null - */ - fun selectOneByColumn( - column: SFunction, - value: R, - ): T? = selectOneByColumn( - column, value, lqw() - ) - - /** - * 在给定[LambdaQueryWrapper]上追加方法引用列等值条件并查询单条记录,结果数量不为1时返回null - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值,执行等值匹配 - * @param wrapper 承载查询条件的Lambda查询包装器 - * @return T? 唯一的查询结果,不存在或多于一条时返回null - */ - fun selectOneByColumn( - column: SFunction, - value: R, - wrapper: LambdaQueryWrapper, - ): T? = selectOne( - wrapper.eq(column, value), - ) - - /** - * 按字符串列名等值条件判断记录是否存在 - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值,执行等值匹配 - * @return Boolean 存在符合条件的记录返回true,否则返回false - */ - fun existsByColumn( - column: String, - value: R, - ): Boolean = existsByColumn(column, value, qw()) - - /** - * 在给定[QueryWrapper]上追加字符串列名等值条件并判断记录是否存在 - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值,执行等值匹配 - * @param wrapper 承载查询条件的查询包装器 - * @return Boolean 存在符合条件的记录返回true,否则返回false - */ - fun existsByColumn( - column: String, - value: R, - wrapper: QueryWrapper = qw(), - ): Boolean = exists( - wrapper.eq(column, value), - ) - - /** - * 按方法引用列等值条件判断记录是否存在 - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值,执行等值匹配 - * @return Boolean 存在符合条件的记录返回true,否则返回false - */ - fun existsByColumn( - column: SFunction, - value: R, - ): Boolean = existsByColumn(column, value, lqw()) - - /** - * 在给定[LambdaQueryWrapper]上追加方法引用列等值条件并判断记录是否存在 - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值,执行等值匹配 - * @param wrapper 承载查询条件的Lambda查询包装器 - * @return Boolean 存在符合条件的记录返回true,否则返回false - */ - fun existsByColumn( - column: SFunction, - value: R, - wrapper: LambdaQueryWrapper = lqw(), - ): Boolean = exists( - wrapper.eq(column, value), - ) - - /** - * 按方法引用列IN条件查询记录并构建有序映射,集合为空时直接返回空映射而不执行查询 - * 返回的[LinkedHashMap]保持入参集合的迭代顺序,缺失的键对应的值为null - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值集合,执行IN匹配 - * @return LinkedHashMap 以列值为键、实体为值的有序映射 - */ - fun selectMapByColumn( - column: SFunction, - value: Collection, - ): LinkedHashMap { - return selectMapByColumn(column, value, lqw()) - } - - - /** - * 在给定[LambdaQueryWrapper]上按方法引用列IN条件查询记录并构建有序映射,集合为空时直接返回空映射而不执行查询 - * 返回的[LinkedHashMap]保持入参集合的迭代顺序,缺失的键对应的值为null - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值集合,执行IN匹配 - * @param wrapper 承载查询条件的Lambda查询包装器 - * @return LinkedHashMap 以列值为键、实体为值的有序映射 - */ - fun selectMapByColumn( - column: SFunction, - value: Collection, - wrapper: LambdaQueryWrapper = lqw(), - ): LinkedHashMap { - if (value.isEmpty()) return linkedMapOf() - - val data = selectList(wrapper.`in`(column, value)) - - val mapdata: Map = data.associateBy { column.apply(it) } - - val map = LinkedHashMap(value.size) - value.forEach { key -> - map[key] = mapdata[key] - } - return map - } - - /** - * 按字符串列名IN条件删除记录,集合为空时直接返回0而不执行删除 - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值集合,执行IN匹配 - * @return Int 被删除的行数 - */ - fun deleteByColumn( - column: String, - value: Collection, - ): Int { - return deleteByColumn(column, value, qw()) - } - - /** - * 在给定[QueryWrapper]上按字符串列名IN条件删除记录,集合为空时直接返回0而不执行删除 - * 注意:MyBatis-Plus对空集合的IN条件会整体跳过,若不拦截将导致全表删除 - * @param R 列值类型 - * @param column 列名(数据库字段名) - * @param value 列值集合,执行IN匹配 - * @param wrapper 承载查询条件的查询包装器 - * @return Int 被删除的行数 - */ - fun deleteByColumn( - column: String, - value: Collection, - wrapper: QueryWrapper = qw(), - ): Int { - if (value.isEmpty()) return 0 - return delete( - wrapper.`in`( - column, value - ) - ) - } - - /** - * 按方法引用列IN条件删除记录,集合为空时直接返回0而不执行删除 - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值集合,执行IN匹配 - * @return Int 被删除的行数 - */ - fun deleteByColumn( - column: SFunction, - value: Collection, - ): Int { - return deleteByColumn( - column, value, lqw() - ) - } - - /** - * 在给定[LambdaQueryWrapper]上按方法引用列IN条件删除记录,集合为空时直接返回0而不执行删除 - * 注意:MyBatis-Plus对空集合的IN条件会整体跳过,若不拦截将导致全表删除 - * @param R 列值类型 - * @param column 实体列的方法引用 - * @param value 列值集合,执行IN匹配 - * @param wrapper 承载查询条件的Lambda查询包装器 - * @return Int 被删除的行数 - */ - fun deleteByColumn( - column: SFunction, - value: Collection, - wrapper: LambdaQueryWrapper, - ): Int { - if (value.isEmpty()) return 0 - return delete( - wrapper.`in`( - column, value - ) - ) - } - - - companion object { - - /** - * 为[BaseMapper]创建[com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper]实例 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver BaseMapper 基础映射器实例 - * @return KtQueryWrapper Kotlin查询包装器实例,使用T类作为参数 - */ - inline fun BaseMapper.ktQueryWrapper(): KtQueryWrapper = KtQueryWrapper(T::class.java) - - /** - * 为[BaseMapper]创建[com.baomidou.mybatisplus.extension.kotlin.KtQueryChainWrapper]实例 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver BaseMapper 基础映射器实例 - * @return KtQueryChainWrapper Kotlin查询链式包装器实例,使用T类作为参数 - */ - inline fun BaseMapper.ktQueryChainWrapper(): KtQueryChainWrapper = - KtQueryChainWrapper(T::class.java) - - /** - * 为[BaseMapper]创建[com.baomidou.mybatisplus.extension.kotlin.KtUpdateWrapper]实例 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver BaseMapper 基础映射器实例 - * @return KtUpdateWrapper Kotlin更新包装器实例,使用T类作为参数 - */ - inline fun BaseMapper.ktUpdateWrapper(): KtUpdateWrapper = - KtUpdateWrapper(T::class.java) - - /** - * 为[BaseMapper]创建[com.baomidou.mybatisplus.extension.kotlin.KtUpdateChainWrapper]实例 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver BaseMapper 基础映射器实例 - * @return KtUpdateChainWrapper Kotlin更新链式包装器实例,使用T类作为参数 - */ - inline fun BaseMapper.ktUpdateChainWrapper(): KtUpdateChainWrapper = - KtUpdateChainWrapper(T::class.java) - - /** - * 创建绑定当前映射器的[com.baomidou.mybatisplus.extension.kotlin.KtQueryChainWrapper]实例 - * 与[ktQueryChainWrapper]不同,该链式包装器持有映射器引用,可直接调用`list`/`one`/`page`等方法执行查询 - * @param T 范型类型,必须继承自Any - * @receiver FastBaseMapper 快速映射器实例 - * @return KtQueryChainWrapper 可执行的Kotlin查询链式包装器实例 - */ - fun FastBaseMapper.ktQueryChain(): KtQueryChainWrapper = - KtQueryChainWrapper(this as BaseMapper) - - /** - * 创建绑定当前映射器的[com.baomidou.mybatisplus.extension.kotlin.KtUpdateChainWrapper]实例 - * 与[ktUpdateChainWrapper]不同,该链式包装器持有映射器引用,可直接调用`update`/`remove`等方法执行操作 - * @param T 范型类型,必须继承自Any - * @receiver FastBaseMapper 快速映射器实例 - * @return KtUpdateChainWrapper 可执行的Kotlin更新链式包装器实例 - */ - fun FastBaseMapper.ktUpdateChain(): KtUpdateChainWrapper = - KtUpdateChainWrapper(this as BaseMapper) - - /** - * [ktQueryWrapper]的简写形式 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver FastBaseMapper 快速映射器实例 - * @return KtQueryWrapper Kotlin查询包装器实例,使用T类作为参数 - */ - inline fun FastBaseMapper.kqw(): KtQueryWrapper = ktQueryWrapper() - - /** - * [ktUpdateWrapper]的简写形式 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver FastBaseMapper 快速映射器实例 - * @return KtUpdateWrapper Kotlin更新包装器实例,使用T类作为参数 - */ - inline fun FastBaseMapper.kuw(): KtUpdateWrapper = ktUpdateWrapper() - - /** - * [ktQueryChainWrapper]的简写形式 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver FastBaseMapper 快速映射器实例 - * @return KtQueryChainWrapper Kotlin查询链式包装器实例,使用T类作为参数 - */ - inline fun FastBaseMapper.kqcw(): KtQueryChainWrapper = ktQueryChainWrapper() - - /** - * [ktUpdateChainWrapper]的简写形式 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver FastBaseMapper 快速映射器实例 - * @return KtUpdateChainWrapper Kotlin更新链式包装器实例,使用T类作为参数 - */ - inline fun FastBaseMapper.kucw(): KtUpdateChainWrapper = ktUpdateChainWrapper() - - /** - * 通过Lambda构建[com.baomidou.mybatisplus.extension.kotlin.KtUpdateWrapper]并执行更新 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver FastBaseMapper 快速映射器实例 - * @param funs 更新包装器构建函数,返回构建完成的更新包装器 - * @return Int 受影响的行数 - */ - inline fun FastBaseMapper.update(funs: (wrapper: KtUpdateWrapper) -> KtUpdateWrapper): Int = - this.update(funs(kuw())) - - /** - * 通过Lambda构建[com.baomidou.mybatisplus.extension.kotlin.KtUpdateWrapper]并携带实体执行更新 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver FastBaseMapper 快速映射器实例 - * @param entity 承载待更新字段值的实体对象 - * @param funs 更新包装器构建函数,返回构建完成的更新包装器 - * @return Int 受影响的行数 - */ - inline fun FastBaseMapper.update( - entity: T, - funs: (wrapper: KtUpdateWrapper) -> KtUpdateWrapper, - ): Int = this.update(entity, funs(kuw())) - - /** - * 通过Lambda构建[com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper]并执行查询 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver FastBaseMapper 快速映射器实例 - * @param funs 查询包装器构建函数,返回构建完成的查询包装器 - * @return List 查询结果列表 - */ - inline fun FastBaseMapper.selectList(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper): List = - this.selectList(funs(kqw())) - - /** - * 通过Lambda构建[com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper]并执行分页查询 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver FastBaseMapper 快速映射器实例 - * @param page 分页参数对象 - * @param funs 查询包装器构建函数,返回构建完成的查询包装器 - * @return Page 分页查询结果 - */ - inline fun FastBaseMapper.selectPage( - page: Page, - funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper = { it }, - ): Page = this.selectPage(page, funs(kqw())) - - /** - * 通过页码与每页大小直接执行分页查询 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver FastBaseMapper 快速映射器实例 - * @param current 当前页码,从1开始 - * @param size 每页记录数 - * @param funs 查询包装器构建函数,返回构建完成的查询包装器 - * @return Page 分页查询结果 - */ - inline fun FastBaseMapper.selectPage( - current: Long, - size: Long, - funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper = { it }, - ): Page = this.selectPage(Page(current, size), funs(kqw())) - - /** - * 通过Lambda构建[com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper]并查询单条记录 - * 结果数量不为1时返回null,不抛出异常 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver FastBaseMapper 快速映射器实例 - * @param funs 查询包装器构建函数,返回构建完成的查询包装器 - * @return T? 唯一的查询结果,不存在或多于一条时返回null - */ - inline fun FastBaseMapper.selectOne(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper): T? = - this.selectList(funs).let { - if (it.size != 1) null - else it[0] - } - - /** - * 通过Lambda构建[com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper]并统计记录数 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver FastBaseMapper 快速映射器实例 - * @param funs 查询包装器构建函数,返回构建完成的查询包装器 - * @return Long 符合条件的记录总数 - */ - inline fun FastBaseMapper.selectCount(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper): Long = - this.selectCount(funs(kqw())) - - /** - * 通过Lambda构建[com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper]并判断记录是否存在 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver FastBaseMapper 快速映射器实例 - * @param funs 查询包装器构建函数,返回构建完成的查询包装器 - * @return Boolean 存在符合条件的记录返回true,否则返回false - */ - inline fun FastBaseMapper.exists(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper): Boolean = - this.exists(funs(kqw())) - - /** - * 通过Lambda构建[com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper]并执行删除 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver FastBaseMapper 快速映射器实例 - * @param funs 查询包装器构建函数,返回构建完成的查询包装器 - * @return Int 被删除的行数 - */ - inline fun FastBaseMapper.delete(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper): Int = - this.delete(funs(kqw())) - - /** - * 按单列等值条件查询记录列表 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @param R 列值类型 - * @receiver FastBaseMapper 快速映射器实例 - * @param column 实体列属性引用 - * @param value 列值,执行等值匹配 - * @param funs 附加查询包装器构建函数,在等值条件之前应用 - * @return List 查询结果列表 - */ - inline fun FastBaseMapper.selectListByColumn( - column: KProperty1, - value: R, - funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, - ): List = selectList { wrapper: KtQueryWrapper -> - funs(wrapper).eq(column, value) - } - - /** - * 按单列IN条件查询记录列表,集合为空时直接返回空列表而不执行查询 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @param R 列值类型 - * @receiver FastBaseMapper 快速映射器实例 - * @param column 实体列属性引用 - * @param value 列值集合,执行IN匹配 - * @param funs 附加查询包装器构建函数,在IN条件之前应用 - * @return List 查询结果列表 - */ - inline fun FastBaseMapper.selectListByColumn( - column: KProperty1, - value: Collection, - funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, - ): List { - if (value.isEmpty()) return emptyList() - return selectList { wrapper: KtQueryWrapper -> - funs(wrapper).`in`(column, value) - } - } - - /** - * 按多列等值条件查询记录列表 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @receiver FastBaseMapper 快速映射器实例 - * @param columns 列属性引用与列值的键值对,逐项执行等值匹配 - * @param funs 附加查询包装器构建函数,在各列等值条件之前应用 - * @return List 查询结果列表 - */ - inline fun FastBaseMapper.selectListByColumns( - vararg columns: Pair, Any?>, - funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, - ): List = selectList { wrapper: KtQueryWrapper -> - val w = funs(wrapper) - columns.forEach { (column, value) -> w.eq(column, value) } - w - } - - /** - * 按单列等值条件查询单条记录,结果数量不为1时返回null - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @param R 列值类型 - * @receiver FastBaseMapper 快速映射器实例 - * @param column 实体列属性引用 - * @param value 列值,执行等值匹配 - * @param funs 附加查询包装器构建函数,在等值条件之前应用 - * @return T? 唯一的查询结果,不存在或多于一条时返回null - */ - inline fun FastBaseMapper.selectOneByColumn( - column: KProperty1, - value: R, - funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, - ): T? = selectOne { wrapper: KtQueryWrapper -> - funs(wrapper).eq(column, value) - } - - /** - * 按单列等值条件判断记录是否存在 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @param R 列值类型 - * @receiver FastBaseMapper 快速映射器实例 - * @param column 实体列属性引用 - * @param funs 附加查询包装器构建函数,在等值条件之前应用 - * @param value 列值,执行等值匹配 - * @return Boolean 存在符合条件的记录返回true,否则返回false - */ - inline fun FastBaseMapper.existsByColumn( - column: KProperty1, - value: R, - funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, - ): Boolean = exists { wrapper: KtQueryWrapper -> - funs(wrapper).eq(column, value) - } - - /** - * 按单列IN条件查询记录并构建有序映射,集合为空时直接返回空映射而不执行查询 - * 返回的[LinkedHashMap]保持入参集合的迭代顺序,缺失的键对应的值为null - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @param R 列值类型 - * @receiver FastBaseMapper 快速映射器实例 - * @param column 实体列属性引用 - * @param value 列值集合,执行IN匹配 - * @param funs 附加查询包装器构建函数,在IN条件之前应用 - * @return LinkedHashMap 以列值为键、实体为值的有序映射 - */ - inline fun FastBaseMapper.selectMapByColumn( - column: KProperty1, - value: Collection, - funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, - ): LinkedHashMap { - if (value.isEmpty()) return linkedMapOf() - - val data = selectList { wrapper: KtQueryWrapper -> - funs(wrapper).`in`(column, value) - } - - val mapdata: Map = data.associateBy { column(it) } - - val map = LinkedHashMap(value.size) - value.forEach { key -> - map[key] = mapdata[key] - } - return map - } - - /** - * 按单列等值条件删除记录 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @param R 列值类型 - * @receiver FastBaseMapper 快速映射器实例 - * @param column 实体列属性引用 - * @param value 列值,执行等值匹配 - * @param funs 附加查询包装器构建函数,在等值条件之前应用 - * @return Int 被删除的行数 - */ - inline fun FastBaseMapper.deleteByColumn( - column: KProperty1, - value: R, - funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, - ): Int = delete { wrapper: KtQueryWrapper -> - funs(wrapper).eq(column, value) - } - - /** - * 按单列IN条件删除记录,集合为空时直接返回0而不执行删除 - * 注意:MyBatis-Plus对空集合的IN条件会整体跳过,若不拦截将导致全表删除 - * @param T 范型类型,必须继承自Any,通过reified获取实际类型 - * @param R 列值类型 - * @receiver FastBaseMapper 快速映射器实例 - * @param column 实体列属性引用 - * @param value 列值集合,执行IN匹配 - * @param funs 附加查询包装器构建函数,在IN条件之前应用 - * @return Int 被删除的行数 - */ - inline fun FastBaseMapper.deleteByColumn( - column: KProperty1, - value: Collection, - funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, - ): Int { - if (value.isEmpty()) return 0 - return delete { wrapper: KtQueryWrapper -> - funs(wrapper).`in`(column, value) - } - } - } + /** + * 创建[com.baomidou.mybatisplus.core.conditions.query.QueryWrapper]实例 + * @return QueryWrapper 查询包装器实例 + */ + fun queryWrapper() = QueryWrapper() + + /** + * 创建[com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper]实例 + * @return UpdateWrapper 更新包装器实例 + */ + fun updateWrapper() = UpdateWrapper() + + /** + * 创建[com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper]实例 + * @return LambdaQueryWrapper Lambda查询包装器实例 + */ + fun lambdaQueryWrapper() = LambdaQueryWrapper() + + /** + * 创建[com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper]实例 + * @return LambdaUpdateWrapper Lambda更新包装器实例 + */ + fun lambdaUpdateWrapper() = LambdaUpdateWrapper() + + + /** + * [queryWrapper]的简写形式 + * @return QueryWrapper 查询包装器实例 + */ + fun qw() = queryWrapper() + + /** + * [updateWrapper]的简写形式 + * @return UpdateWrapper 更新包装器实例 + */ + fun uw() = updateWrapper() + + /** + * [lambdaQueryWrapper]的简写形式 + * @return LambdaQueryWrapper Lambda查询包装器实例 + */ + fun lqw() = lambdaQueryWrapper() + + /** + * [lambdaUpdateWrapper]的简写形式 + * @return LambdaUpdateWrapper Lambda更新包装器实例 + */ + fun luw() = lambdaUpdateWrapper() + + + /** + * 按字符串列名等值条件查询记录列表 + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值,执行等值匹配 + * @return List 查询结果列表 + */ + fun selectListByColumn( + column: String, + value: R, + ): List = selectListByColumn(column, value, qw()) + + /** + * 在给定[QueryWrapper]上追加字符串列名等值条件并查询记录列表 + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值,执行等值匹配 + * @param wrapper 承载查询条件的查询包装器 + * @return List 查询结果列表 + */ + fun selectListByColumn( + column: String, + value: R, + wrapper: QueryWrapper, + ): List = selectList(wrapper.eq(column, value)) + + + /** + * 按方法引用列等值条件查询记录列表 + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值,执行等值匹配 + * @return List 查询结果列表 + */ + fun selectListByColumn( + column: SFunction, + value: R, + ): List = selectListByColumn(column, value, lqw()) + + /** + * 在给定[LambdaQueryWrapper]上追加方法引用列等值条件并查询记录列表 + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值,执行等值匹配 + * @param wrapper 承载查询条件的Lambda查询包装器 + * @return List 查询结果列表 + */ + fun selectListByColumn( + column: SFunction, + value: R, + wrapper: LambdaQueryWrapper, + ): List = selectList(wrapper.eq(column, value)) + + /** + * 按方法引用列IN条件查询记录列表,集合为空时直接返回空列表而不执行查询 + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值集合,执行IN匹配 + * @return List 查询结果列表 + */ + fun selectListByColumn( + column: SFunction, + value: Collection, + ): List = selectListByColumn(column, value, lqw()) + + /** + * 在给定[LambdaQueryWrapper]上追加方法引用列IN条件并查询记录列表,集合为空时直接返回空列表而不执行查询 + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值集合,执行IN匹配 + * @param wrapper 承载查询条件的Lambda查询包装器 + * @return List 查询结果列表 + */ + fun selectListByColumn( + column: SFunction, + value: Collection, + wrapper: LambdaQueryWrapper = lqw(), + ): List { + if (value.isEmpty()) return emptyList() + return selectList(wrapper.`in`(column, value)) + } + + /** + * 按字符串列名IN条件查询记录列表,集合为空时直接返回空列表而不执行查询 + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值集合,执行IN匹配 + * @return List 查询结果列表 + */ + fun selectListByColumn( + column: String, + value: Collection, + ): List = selectListByColumn(column, value, qw()) + + /** + * 在给定[QueryWrapper]上追加字符串列名IN条件并查询记录列表,集合为空时直接返回空列表而不执行查询 + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值集合,执行IN匹配 + * @param wrapper 承载查询条件的查询包装器 + * @return List 查询结果列表 + */ + fun selectListByColumn( + column: String, + value: Collection, + wrapper: QueryWrapper = qw(), + ): List { + if (value.isEmpty()) return emptyList() + return selectList(wrapper.`in`(column, value)) + } + + /** + * 字符串列名与列值构成的二元组,用于[selectListByColumns]的可变参数传参 + * @property t1 列名(数据库字段名) + * @property t2 列值 + */ + class StringAnyTuple2( + val t1: String, + val t2: Any, + ) : Tuple(2) { + operator fun component1() = t1 + operator fun component2() = t2 + } + + /** + * 方法引用列与列值构成的二元组,用于[selectListByColumns]的可变参数传参 + * @param T 实体类型 + * @param D 列值类型 + * @property t1 实体列的方法引用 + * @property t2 列值 + */ + class SFunctionAnyTuple2( + val t1: SFunction, + val t2: D, + ) : Tuple(2) { + operator fun component1() = t1 + operator fun component2() = t2 + } + + /** + * 按多个字符串列名等值条件查询记录列表,各列条件以AND连接 + * @param columns 列名与列值构成的二元组,逐项执行等值匹配 + * @return List 查询结果列表 + */ + fun selectListByColumns( + vararg columns: StringAnyTuple2, + ): List = selectList(qw().let { wrapper -> + columns.forEach { (column, value) -> + wrapper.eq(column, value) + } + wrapper + }) + + /** + * 按多个方法引用列等值条件查询记录列表,各列条件以AND连接 + * @param columns 方法引用列与列值构成的二元组,逐项执行等值匹配 + * @return List 查询结果列表 + */ + fun selectListByColumns( + vararg columns: SFunctionAnyTuple2, + ): List = selectListByColumns(lqw(), *columns) + + /** + * 在给定[LambdaQueryWrapper]上追加多个方法引用列等值条件并查询记录列表,各列条件以AND连接 + * @param wrapper 承载查询条件的Lambda查询包装器 + * @param columns 方法引用列与列值构成的二元组,逐项执行等值匹配 + * @return List 查询结果列表 + */ + fun selectListByColumns( + wrapper: LambdaQueryWrapper, + vararg columns: SFunctionAnyTuple2, + ): List = selectList(wrapper.let { + columns.forEach { (column, value) -> + it.eq(column, value) + } + it + }) + + /** + * 按字符串列名等值条件查询单条记录,结果数量不为1时返回null + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值,执行等值匹配 + * @return T? 唯一的查询结果,不存在或多于一条时返回null + */ + fun selectOneByColumn( + column: String, + value: R, + ): T? = selectOneByColumn(column, value, qw()) + + /** + * 在给定[QueryWrapper]上追加字符串列名等值条件并查询单条记录,结果数量不为1时返回null + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值,执行等值匹配 + * @param wrapper 承载查询条件的查询包装器 + * @return T? 唯一的查询结果,不存在或多于一条时返回null + */ + fun selectOneByColumn( + column: String, + value: R, + wrapper: QueryWrapper = qw(), + ): T? = selectOne( + wrapper.eq(column, value), + ) + + + /** + * 按方法引用列等值条件查询单条记录,结果数量不为1时返回null + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值,执行等值匹配 + * @return T? 唯一的查询结果,不存在或多于一条时返回null + */ + fun selectOneByColumn( + column: SFunction, + value: R, + ): T? = selectOneByColumn( + column, value, lqw() + ) + + /** + * 在给定[LambdaQueryWrapper]上追加方法引用列等值条件并查询单条记录,结果数量不为1时返回null + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值,执行等值匹配 + * @param wrapper 承载查询条件的Lambda查询包装器 + * @return T? 唯一的查询结果,不存在或多于一条时返回null + */ + fun selectOneByColumn( + column: SFunction, + value: R, + wrapper: LambdaQueryWrapper, + ): T? = selectOne( + wrapper.eq(column, value), + ) + + /** + * 按字符串列名等值条件判断记录是否存在 + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值,执行等值匹配 + * @return Boolean 存在符合条件的记录返回true,否则返回false + */ + fun existsByColumn( + column: String, + value: R, + ): Boolean = existsByColumn(column, value, qw()) + + /** + * 在给定[QueryWrapper]上追加字符串列名等值条件并判断记录是否存在 + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值,执行等值匹配 + * @param wrapper 承载查询条件的查询包装器 + * @return Boolean 存在符合条件的记录返回true,否则返回false + */ + fun existsByColumn( + column: String, + value: R, + wrapper: QueryWrapper = qw(), + ): Boolean = exists( + wrapper.eq(column, value), + ) + + /** + * 按方法引用列等值条件判断记录是否存在 + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值,执行等值匹配 + * @return Boolean 存在符合条件的记录返回true,否则返回false + */ + fun existsByColumn( + column: SFunction, + value: R, + ): Boolean = existsByColumn(column, value, lqw()) + + /** + * 在给定[LambdaQueryWrapper]上追加方法引用列等值条件并判断记录是否存在 + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值,执行等值匹配 + * @param wrapper 承载查询条件的Lambda查询包装器 + * @return Boolean 存在符合条件的记录返回true,否则返回false + */ + fun existsByColumn( + column: SFunction, + value: R, + wrapper: LambdaQueryWrapper = lqw(), + ): Boolean = exists( + wrapper.eq(column, value), + ) + + /** + * 按方法引用列IN条件查询记录并构建有序映射,集合为空时直接返回空映射而不执行查询 + * 返回的[LinkedHashMap]保持入参集合的迭代顺序,缺失的键对应的值为null + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值集合,执行IN匹配 + * @return LinkedHashMap 以列值为键、实体为值的有序映射 + */ + fun selectMapByColumn( + column: SFunction, + value: Collection, + ): LinkedHashMap { + return selectMapByColumn(column, value, lqw()) + } + + + /** + * 在给定[LambdaQueryWrapper]上按方法引用列IN条件查询记录并构建有序映射,集合为空时直接返回空映射而不执行查询 + * 返回的[LinkedHashMap]保持入参集合的迭代顺序,缺失的键对应的值为null + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值集合,执行IN匹配 + * @param wrapper 承载查询条件的Lambda查询包装器 + * @return LinkedHashMap 以列值为键、实体为值的有序映射 + */ + fun selectMapByColumn( + column: SFunction, + value: Collection, + wrapper: LambdaQueryWrapper = lqw(), + ): LinkedHashMap { + if (value.isEmpty()) return linkedMapOf() + + val data = selectList(wrapper.`in`(column, value)) + + val mapdata: Map = data.associateBy { column.apply(it) } + + val map = LinkedHashMap(value.size) + value.forEach { key -> + map[key] = mapdata[key] + } + return map + } + + /** + * 按字符串列名IN条件删除记录,集合为空时直接返回0而不执行删除 + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值集合,执行IN匹配 + * @return Int 被删除的行数 + */ + fun deleteByColumn( + column: String, + value: Collection, + ): Int { + return deleteByColumn(column, value, qw()) + } + + /** + * 在给定[QueryWrapper]上按字符串列名IN条件删除记录,集合为空时直接返回0而不执行删除 + * 注意:MyBatis-Plus对空集合的IN条件会整体跳过,若不拦截将导致全表删除 + * @param R 列值类型 + * @param column 列名(数据库字段名) + * @param value 列值集合,执行IN匹配 + * @param wrapper 承载查询条件的查询包装器 + * @return Int 被删除的行数 + */ + fun deleteByColumn( + column: String, + value: Collection, + wrapper: QueryWrapper = qw(), + ): Int { + if (value.isEmpty()) return 0 + return delete( + wrapper.`in`( + column, value + ) + ) + } + + /** + * 按方法引用列IN条件删除记录,集合为空时直接返回0而不执行删除 + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值集合,执行IN匹配 + * @return Int 被删除的行数 + */ + fun deleteByColumn( + column: SFunction, + value: Collection, + ): Int { + return deleteByColumn( + column, value, lqw() + ) + } + + /** + * 在给定[LambdaQueryWrapper]上按方法引用列IN条件删除记录,集合为空时直接返回0而不执行删除 + * 注意:MyBatis-Plus对空集合的IN条件会整体跳过,若不拦截将导致全表删除 + * @param R 列值类型 + * @param column 实体列的方法引用 + * @param value 列值集合,执行IN匹配 + * @param wrapper 承载查询条件的Lambda查询包装器 + * @return Int 被删除的行数 + */ + fun deleteByColumn( + column: SFunction, + value: Collection, + wrapper: LambdaQueryWrapper, + ): Int { + if (value.isEmpty()) return 0 + return delete( + wrapper.`in`( + column, value + ) + ) + } + + + companion object { + + /** + * 为[BaseMapper]创建[com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper]实例 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver BaseMapper 基础映射器实例 + * @return KtQueryWrapper Kotlin查询包装器实例,使用T类作为参数 + */ + inline fun BaseMapper.ktQueryWrapper(): KtQueryWrapper = KtQueryWrapper(T::class.java) + + /** + * 为[BaseMapper]创建[com.baomidou.mybatisplus.extension.kotlin.KtQueryChainWrapper]实例 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver BaseMapper 基础映射器实例 + * @return KtQueryChainWrapper Kotlin查询链式包装器实例,使用T类作为参数 + */ + inline fun BaseMapper.ktQueryChainWrapper(): KtQueryChainWrapper = + KtQueryChainWrapper(T::class.java) + + /** + * 为[BaseMapper]创建[com.baomidou.mybatisplus.extension.kotlin.KtUpdateWrapper]实例 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver BaseMapper 基础映射器实例 + * @return KtUpdateWrapper Kotlin更新包装器实例,使用T类作为参数 + */ + inline fun BaseMapper.ktUpdateWrapper(): KtUpdateWrapper = + KtUpdateWrapper(T::class.java) + + /** + * 为[BaseMapper]创建[com.baomidou.mybatisplus.extension.kotlin.KtUpdateChainWrapper]实例 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver BaseMapper 基础映射器实例 + * @return KtUpdateChainWrapper Kotlin更新链式包装器实例,使用T类作为参数 + */ + inline fun BaseMapper.ktUpdateChainWrapper(): KtUpdateChainWrapper = + KtUpdateChainWrapper(T::class.java) + + /** + * 创建绑定当前映射器的[com.baomidou.mybatisplus.extension.kotlin.KtQueryChainWrapper]实例 + * 与[ktQueryChainWrapper]不同,该链式包装器持有映射器引用,可直接调用`list`/`one`/`page`等方法执行查询 + * @param T 范型类型,必须继承自Any + * @receiver FastBaseMapper 快速映射器实例 + * @return KtQueryChainWrapper 可执行的Kotlin查询链式包装器实例 + */ + fun FastBaseMapper.ktQueryChain(): KtQueryChainWrapper = + KtQueryChainWrapper(this as BaseMapper) + + /** + * 创建绑定当前映射器的[com.baomidou.mybatisplus.extension.kotlin.KtUpdateChainWrapper]实例 + * 与[ktUpdateChainWrapper]不同,该链式包装器持有映射器引用,可直接调用`update`/`remove`等方法执行操作 + * @param T 范型类型,必须继承自Any + * @receiver FastBaseMapper 快速映射器实例 + * @return KtUpdateChainWrapper 可执行的Kotlin更新链式包装器实例 + */ + fun FastBaseMapper.ktUpdateChain(): KtUpdateChainWrapper = + KtUpdateChainWrapper(this as BaseMapper) + + /** + * [ktQueryWrapper]的简写形式 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver FastBaseMapper 快速映射器实例 + * @return KtQueryWrapper Kotlin查询包装器实例,使用T类作为参数 + */ + inline fun FastBaseMapper.kqw(): KtQueryWrapper = ktQueryWrapper() + + /** + * [ktUpdateWrapper]的简写形式 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver FastBaseMapper 快速映射器实例 + * @return KtUpdateWrapper Kotlin更新包装器实例,使用T类作为参数 + */ + inline fun FastBaseMapper.kuw(): KtUpdateWrapper = ktUpdateWrapper() + + /** + * [ktQueryChainWrapper]的简写形式 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver FastBaseMapper 快速映射器实例 + * @return KtQueryChainWrapper Kotlin查询链式包装器实例,使用T类作为参数 + */ + inline fun FastBaseMapper.kqcw(): KtQueryChainWrapper = ktQueryChainWrapper() + + /** + * [ktUpdateChainWrapper]的简写形式 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver FastBaseMapper 快速映射器实例 + * @return KtUpdateChainWrapper Kotlin更新链式包装器实例,使用T类作为参数 + */ + inline fun FastBaseMapper.kucw(): KtUpdateChainWrapper = ktUpdateChainWrapper() + + /** + * 通过Lambda构建[com.baomidou.mybatisplus.extension.kotlin.KtUpdateWrapper]并执行更新 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver FastBaseMapper 快速映射器实例 + * @param funs 更新包装器构建函数,返回构建完成的更新包装器 + * @return Int 受影响的行数 + */ + inline fun FastBaseMapper.update(funs: (wrapper: KtUpdateWrapper) -> KtUpdateWrapper): Int = + this.update(funs(kuw())) + + /** + * 通过Lambda构建[com.baomidou.mybatisplus.extension.kotlin.KtUpdateWrapper]并携带实体执行更新 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver FastBaseMapper 快速映射器实例 + * @param entity 承载待更新字段值的实体对象 + * @param funs 更新包装器构建函数,返回构建完成的更新包装器 + * @return Int 受影响的行数 + */ + inline fun FastBaseMapper.update( + entity: T, + funs: (wrapper: KtUpdateWrapper) -> KtUpdateWrapper, + ): Int = this.update(entity, funs(kuw())) + + /** + * 通过Lambda构建[com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper]并执行查询 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver FastBaseMapper 快速映射器实例 + * @param funs 查询包装器构建函数,返回构建完成的查询包装器 + * @return List 查询结果列表 + */ + inline fun FastBaseMapper.selectList(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper): List = + this.selectList(funs(kqw())) + + /** + * 通过Lambda构建[com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper]并执行分页查询 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver FastBaseMapper 快速映射器实例 + * @param page 分页参数对象 + * @param funs 查询包装器构建函数,返回构建完成的查询包装器 + * @return Page 分页查询结果 + */ + inline fun FastBaseMapper.selectPage( + page: Page, + funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper = { it }, + ): Page = this.selectPage(page, funs(kqw())) + + /** + * 通过页码与每页大小直接执行分页查询 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver FastBaseMapper 快速映射器实例 + * @param current 当前页码,从1开始 + * @param size 每页记录数 + * @param funs 查询包装器构建函数,返回构建完成的查询包装器 + * @return Page 分页查询结果 + */ + inline fun FastBaseMapper.selectPage( + current: Long, + size: Long, + funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper = { it }, + ): Page = this.selectPage(Page(current, size), funs(kqw())) + + /** + * 通过Lambda构建[com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper]并查询单条记录 + * 结果数量不为1时返回null,不抛出异常 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver FastBaseMapper 快速映射器实例 + * @param funs 查询包装器构建函数,返回构建完成的查询包装器 + * @return T? 唯一的查询结果,不存在或多于一条时返回null + */ + inline fun FastBaseMapper.selectOne(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper): T? = + this.selectList(funs).let { + if (it.size != 1) null + else it[0] + } + + /** + * 通过Lambda构建[com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper]并统计记录数 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver FastBaseMapper 快速映射器实例 + * @param funs 查询包装器构建函数,返回构建完成的查询包装器 + * @return Long 符合条件的记录总数 + */ + inline fun FastBaseMapper.selectCount(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper): Long = + this.selectCount(funs(kqw())) + + /** + * 通过Lambda构建[com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper]并判断记录是否存在 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver FastBaseMapper 快速映射器实例 + * @param funs 查询包装器构建函数,返回构建完成的查询包装器 + * @return Boolean 存在符合条件的记录返回true,否则返回false + */ + inline fun FastBaseMapper.exists(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper): Boolean = + this.exists(funs(kqw())) + + /** + * 通过Lambda构建[com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper]并执行删除 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver FastBaseMapper 快速映射器实例 + * @param funs 查询包装器构建函数,返回构建完成的查询包装器 + * @return Int 被删除的行数 + */ + inline fun FastBaseMapper.delete(funs: (wrapper: KtQueryWrapper) -> KtQueryWrapper): Int = + this.delete(funs(kqw())) + + /** + * 按单列等值条件查询记录列表 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @param R 列值类型 + * @receiver FastBaseMapper 快速映射器实例 + * @param column 实体列属性引用 + * @param value 列值,执行等值匹配 + * @param funs 附加查询包装器构建函数,在等值条件之前应用 + * @return List 查询结果列表 + */ + inline fun FastBaseMapper.selectListByColumn( + column: KProperty1, + value: R, + funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, + ): List = selectList { wrapper: KtQueryWrapper -> + funs(wrapper).eq(column, value) + } + + /** + * 按单列IN条件查询记录列表,集合为空时直接返回空列表而不执行查询 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @param R 列值类型 + * @receiver FastBaseMapper 快速映射器实例 + * @param column 实体列属性引用 + * @param value 列值集合,执行IN匹配 + * @param funs 附加查询包装器构建函数,在IN条件之前应用 + * @return List 查询结果列表 + */ + inline fun FastBaseMapper.selectListByColumn( + column: KProperty1, + value: Collection, + funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, + ): List { + if (value.isEmpty()) return emptyList() + return selectList { wrapper: KtQueryWrapper -> + funs(wrapper).`in`(column, value) + } + } + + /** + * 按多列等值条件查询记录列表 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @receiver FastBaseMapper 快速映射器实例 + * @param columns 列属性引用与列值的键值对,逐项执行等值匹配 + * @param funs 附加查询包装器构建函数,在各列等值条件之前应用 + * @return List 查询结果列表 + */ + inline fun FastBaseMapper.selectListByColumns( + vararg columns: Pair, Any?>, + funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, + ): List = selectList { wrapper: KtQueryWrapper -> + val w = funs(wrapper) + columns.forEach { (column, value) -> w.eq(column, value) } + w + } + + /** + * 按单列等值条件查询单条记录,结果数量不为1时返回null + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @param R 列值类型 + * @receiver FastBaseMapper 快速映射器实例 + * @param column 实体列属性引用 + * @param value 列值,执行等值匹配 + * @param funs 附加查询包装器构建函数,在等值条件之前应用 + * @return T? 唯一的查询结果,不存在或多于一条时返回null + */ + inline fun FastBaseMapper.selectOneByColumn( + column: KProperty1, + value: R, + funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, + ): T? = selectOne { wrapper: KtQueryWrapper -> + funs(wrapper).eq(column, value) + } + + /** + * 按单列等值条件判断记录是否存在 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @param R 列值类型 + * @receiver FastBaseMapper 快速映射器实例 + * @param column 实体列属性引用 + * @param funs 附加查询包装器构建函数,在等值条件之前应用 + * @param value 列值,执行等值匹配 + * @return Boolean 存在符合条件的记录返回true,否则返回false + */ + inline fun FastBaseMapper.existsByColumn( + column: KProperty1, + value: R, + funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, + ): Boolean = exists { wrapper: KtQueryWrapper -> + funs(wrapper).eq(column, value) + } + + /** + * 按单列IN条件查询记录并构建有序映射,集合为空时直接返回空映射而不执行查询 + * 返回的[LinkedHashMap]保持入参集合的迭代顺序,缺失的键对应的值为null + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @param R 列值类型 + * @receiver FastBaseMapper 快速映射器实例 + * @param column 实体列属性引用 + * @param value 列值集合,执行IN匹配 + * @param funs 附加查询包装器构建函数,在IN条件之前应用 + * @return LinkedHashMap 以列值为键、实体为值的有序映射 + */ + inline fun FastBaseMapper.selectMapByColumn( + column: KProperty1, + value: Collection, + funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, + ): LinkedHashMap { + if (value.isEmpty()) return linkedMapOf() + + val data = selectList { wrapper: KtQueryWrapper -> + funs(wrapper).`in`(column, value) + } + + val mapdata: Map = data.associateBy { column(it) } + + val map = LinkedHashMap(value.size) + value.forEach { key -> + map[key] = mapdata[key] + } + return map + } + + /** + * 按单列等值条件删除记录 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @param R 列值类型 + * @receiver FastBaseMapper 快速映射器实例 + * @param column 实体列属性引用 + * @param value 列值,执行等值匹配 + * @param funs 附加查询包装器构建函数,在等值条件之前应用 + * @return Int 被删除的行数 + */ + inline fun FastBaseMapper.deleteByColumn( + column: KProperty1, + value: R, + funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, + ): Int = delete { wrapper: KtQueryWrapper -> + funs(wrapper).eq(column, value) + } + + /** + * 按单列IN条件删除记录,集合为空时直接返回0而不执行删除 + * 注意:MyBatis-Plus对空集合的IN条件会整体跳过,若不拦截将导致全表删除 + * @param T 范型类型,必须继承自Any,通过reified获取实际类型 + * @param R 列值类型 + * @receiver FastBaseMapper 快速映射器实例 + * @param column 实体列属性引用 + * @param value 列值集合,执行IN匹配 + * @param funs 附加查询包装器构建函数,在IN条件之前应用 + * @return Int 被删除的行数 + */ + inline fun FastBaseMapper.deleteByColumn( + column: KProperty1, + value: Collection, + funs: (w: KtQueryWrapper) -> KtQueryWrapper = { it }, + ): Int { + if (value.isEmpty()) return 0 + return delete { wrapper: KtQueryWrapper -> + funs(wrapper).`in`(column, value) + } + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/netty/ByteArrayCodec.kt b/src/main/kotlin/com/mingliqiye/utils/netty/ByteArrayCodec.kt index 14078c9..4047aa7 100644 --- a/src/main/kotlin/com/mingliqiye/utils/netty/ByteArrayCodec.kt +++ b/src/main/kotlin/com/mingliqiye/utils/netty/ByteArrayCodec.kt @@ -35,40 +35,40 @@ import io.netty.channel.ChannelHandlerContext */ class ByteArrayCodec : NettyBaseCodec() { - /** - * 解码:ByteBuf → ByteArray - * - * 将 Netty 的 ByteBuf 转换为 Kotlin 的 ByteArray - * - * @param inData 输入的 ByteBuf - * @param channelHandlerContext 上下文 - * @param outList 输出列表(未使用) - * @return 转换后的 ByteArray - */ - override fun decode( - inData: ByteBuf, - channelHandlerContext: ChannelHandlerContext, - outList: MutableList, - ): ByteArray { - return inData.toByteArray() - } + /** + * 解码:ByteBuf → ByteArray + * + * 将 Netty 的 ByteBuf 转换为 Kotlin 的 ByteArray + * + * @param inData 输入的 ByteBuf + * @param channelHandlerContext 上下文 + * @param outList 输出列表(未使用) + * @return 转换后的 ByteArray + */ + override fun decode( + inData: ByteBuf, + channelHandlerContext: ChannelHandlerContext, + outList: MutableList, + ): ByteArray { + return inData.toByteArray() + } - /** - * 编码:ByteArray → ByteBuf - * - * 将 Kotlin 的 ByteArray 转换为 Netty 的 ByteBuf - * - * @param inData 输入的 ByteArray - * @param channelHandlerContext 上下文 - * @param outList 输出列表(未使用) - * @return 转换后的 ByteBuf - * - */ - override fun encode( - inData: ByteArray, - channelHandlerContext: ChannelHandlerContext, - outList: MutableList, - ): ByteBuf { - return inData.toByteBuf() - } + /** + * 编码:ByteArray → ByteBuf + * + * 将 Kotlin 的 ByteArray 转换为 Netty 的 ByteBuf + * + * @param inData 输入的 ByteArray + * @param channelHandlerContext 上下文 + * @param outList 输出列表(未使用) + * @return 转换后的 ByteBuf + * + */ + override fun encode( + inData: ByteArray, + channelHandlerContext: ChannelHandlerContext, + outList: MutableList, + ): ByteBuf { + return inData.toByteBuf() + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/netty/ClientScheduleReconnect.kt b/src/main/kotlin/com/mingliqiye/utils/netty/ClientScheduleReconnect.kt index b6042ce..9c39ef6 100644 --- a/src/main/kotlin/com/mingliqiye/utils/netty/ClientScheduleReconnect.kt +++ b/src/main/kotlin/com/mingliqiye/utils/netty/ClientScheduleReconnect.kt @@ -36,196 +36,196 @@ import java.util.concurrent.TimeUnit */ abstract class ClientScheduleReconnect { - private val bootstrap: Bootstrap - private var delay: Long = 10L - private var timeUnit: TimeUnit = TimeUnit.SECONDS + private val bootstrap: Bootstrap + private var delay: Long = 10L + private var timeUnit: TimeUnit = TimeUnit.SECONDS - constructor() : this(Bootstrap()) - constructor(bootstrap: Bootstrap) : this(bootstrap, 10L) - constructor(bootstrap: Bootstrap, delay: Long) : this(bootstrap, delay, TimeUnit.SECONDS) - constructor(bootstrap: Bootstrap, delay: Long, timeUnit: TimeUnit) { - this.bootstrap = bootstrap - this.delay = delay - this.timeUnit = timeUnit - } + constructor() : this(Bootstrap()) + constructor(bootstrap: Bootstrap) : this(bootstrap, 10L) + constructor(bootstrap: Bootstrap, delay: Long) : this(bootstrap, delay, TimeUnit.SECONDS) + constructor(bootstrap: Bootstrap, delay: Long, timeUnit: TimeUnit) { + this.bootstrap = bootstrap + this.delay = delay + this.timeUnit = timeUnit + } - open fun start() { - initBootstrap(bootstrap) - connect() - } + open fun start() { + initBootstrap(bootstrap) + connect() + } - /** - * 获取Netty引导配置对象 - * @return Bootstrap 引导配置对象 - */ - open fun getBootstrap(): Bootstrap = bootstrap + /** + * 获取Netty引导配置对象 + * @return Bootstrap 引导配置对象 + */ + open fun getBootstrap(): Bootstrap = bootstrap - /** - * 获取当前连接的通道 - * @return Channel? 当前连接的通道,可能为空 - */ - open fun getChannel(): Channel? = channel + /** + * 获取当前连接的通道 + * @return Channel? 当前连接的通道,可能为空 + */ + open fun getChannel(): Channel? = channel - /** - * 获取时间单位 - * @return TimeUnit 时间单位 - */ - open fun getTimeUnit(): TimeUnit = timeUnit + /** + * 获取时间单位 + * @return TimeUnit 时间单位 + */ + open fun getTimeUnit(): TimeUnit = timeUnit - /** - * 设置时间单位 - * @param timeUnit 新的时间单位 - */ - open fun setTimeUnit(timeUnit: TimeUnit) { - this.timeUnit = timeUnit - } + /** + * 设置时间单位 + * @param timeUnit 新的时间单位 + */ + open fun setTimeUnit(timeUnit: TimeUnit) { + this.timeUnit = timeUnit + } - /** - * 获取重连延迟时间 - * @return Long 延迟时间 - */ - open fun getDelay(): Long = delay + /** + * 获取重连延迟时间 + * @return Long 延迟时间 + */ + open fun getDelay(): Long = delay - /** - * 设置重连延迟时间 - * @param delay 新的延迟时间 - */ - open fun setDelay(delay: Long) { - this.delay = delay - } + /** + * 设置重连延迟时间 + * @param delay 新的延迟时间 + */ + open fun setDelay(delay: Long) { + this.delay = delay + } - /** - * 检查是否已连接 - * @return Boolean 是否已连接 - */ - open fun isConnected(): Boolean = channel?.isActive ?: false + /** + * 检查是否已连接 + * @return Boolean 是否已连接 + */ + open fun isConnected(): Boolean = channel?.isActive ?: false - private var isStop = false - private var channel: Channel? = null + private var isStop = false + private var channel: Channel? = null - /** - * 连接成功时的日志记录回调 - * @param channel 成功连接的通道 - */ - abstract fun onConnectedLog(channel: Channel) + /** + * 连接成功时的日志记录回调 + * @param channel 成功连接的通道 + */ + abstract fun onConnectedLog(channel: Channel) - /** - * 连接失败时的日志记录回调 - * @param cause 连接失败的原因,可能为空 - */ - abstract fun onConnectFailedLog(cause: Throwable?) + /** + * 连接失败时的日志记录回调 + * @param cause 连接失败的原因,可能为空 + */ + abstract fun onConnectFailedLog(cause: Throwable?) - /** - * 停止连接时的日志记录回调 - */ - abstract fun onStoppedLog() + /** + * 停止连接时的日志记录回调 + */ + abstract fun onStoppedLog() - abstract fun onConnectClosed() + abstract fun onConnectClosed() - /** - * 执行连接操作 - * @return ChannelFuture 连接结果的异步操作对象 - */ - abstract fun doConnect(bootstrap: Bootstrap): ChannelFuture + /** + * 执行连接操作 + * @return ChannelFuture 连接结果的异步操作对象 + */ + abstract fun doConnect(bootstrap: Bootstrap): ChannelFuture - /** - * 初始化引导配置 - * @param bootstrap 要初始化的引导配置对象 - */ - abstract fun initBootstrap(bootstrap: Bootstrap) + /** + * 初始化引导配置 + * @param bootstrap 要初始化的引导配置对象 + */ + abstract fun initBootstrap(bootstrap: Bootstrap) - /** - * 更新重连延迟配置 - * @param newDelay 新的延迟时间,必须大于0 - * @param newTimeUnit 新的时间单位 - * @throws IllegalArgumentException 当newDelay小于等于0时抛出 - */ - open fun updateReconnectDelay(newDelay: Long, newTimeUnit: TimeUnit) { - require(newDelay > 0) { "Delay must be positive" } - this.delay = newDelay - this.timeUnit = newTimeUnit - } + /** + * 更新重连延迟配置 + * @param newDelay 新的延迟时间,必须大于0 + * @param newTimeUnit 新的时间单位 + * @throws IllegalArgumentException 当newDelay小于等于0时抛出 + */ + open fun updateReconnectDelay(newDelay: Long, newTimeUnit: TimeUnit) { + require(newDelay > 0) { "Delay must be positive" } + this.delay = newDelay + this.timeUnit = newTimeUnit + } - /** - * 执行连接操作,设置连接完成监听器 - */ - open fun connect() { - doConnect(bootstrap).addListener(object : ChannelFutureListener { - override fun operationComplete(future: ChannelFuture) { - if (future.isSuccess) { - onConnected(future.channel()) - } else { - onConnectFailed(future.cause()) - } - } - }) - } + /** + * 执行连接操作,设置连接完成监听器 + */ + open fun connect() { + doConnect(bootstrap).addListener(object : ChannelFutureListener { + override fun operationComplete(future: ChannelFuture) { + if (future.isSuccess) { + onConnected(future.channel()) + } else { + onConnectFailed(future.cause()) + } + } + }) + } - /** - * 停止连接并标记为停止状态 - */ - @Deprecated("use close()", ReplaceWith("close()")) - open fun stop() { - isStop = true - disConnect() - } + /** + * 停止连接并标记为停止状态 + */ + @Deprecated("use close()", ReplaceWith("close()")) + open fun stop() { + isStop = true + disConnect() + } - /** - * 断开当前连接并清理通道引用 - */ - open fun disConnect() { - channel?.close() - channel = null - } + /** + * 断开当前连接并清理通道引用 + */ + open fun disConnect() { + channel?.close() + channel = null + } - /** - * 停止连接并标记为停止状态 - */ - open fun close() { - isStop = true - disConnect() - } + /** + * 停止连接并标记为停止状态 + */ + open fun close() { + isStop = true + disConnect() + } - /** - * 调度下一次重连操作 - */ - open fun scheduleReconnect() { - // 检查是否已停止,如果已停止则记录日志并返回 - if (isStop) { - onStoppedLog() - return - } - bootstrap.config().group().schedule({ - // 再次检查停止状态,避免在调度期间被停止 - if (isStop) { - onStoppedLog() - return@schedule - } - connect() - }, delay, timeUnit) - } + /** + * 调度下一次重连操作 + */ + open fun scheduleReconnect() { + // 检查是否已停止,如果已停止则记录日志并返回 + if (isStop) { + onStoppedLog() + return + } + bootstrap.config().group().schedule({ + // 再次检查停止状态,避免在调度期间被停止 + if (isStop) { + onStoppedLog() + return@schedule + } + connect() + }, delay, timeUnit) + } - /** - * 处理连接成功的逻辑 - * @param channel 成功连接的通道 - */ - open fun onConnected(channel: Channel) { - this.channel = channel - onConnectedLog(channel) - // 监听通道关闭事件,以便在断开后重新调度连接 - channel.closeFuture().addListener { _ -> - scheduleReconnect() - onConnectClosed() - } - } + /** + * 处理连接成功的逻辑 + * @param channel 成功连接的通道 + */ + open fun onConnected(channel: Channel) { + this.channel = channel + onConnectedLog(channel) + // 监听通道关闭事件,以便在断开后重新调度连接 + channel.closeFuture().addListener { _ -> + scheduleReconnect() + onConnectClosed() + } + } - /** - * 处理连接失败的逻辑 - * @param cause 连接失败的原因 - */ - open fun onConnectFailed(cause: Throwable?) { - onConnectFailedLog(cause) - scheduleReconnect() - } + /** + * 处理连接失败的逻辑 + * @param cause 连接失败的原因 + */ + open fun onConnectFailed(cause: Throwable?) { + onConnectFailedLog(cause) + scheduleReconnect() + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/netty/NamedMultiThreadIoEventLoopGroup.kt b/src/main/kotlin/com/mingliqiye/utils/netty/NamedMultiThreadIoEventLoopGroup.kt index 0966000..d88fa51 100644 --- a/src/main/kotlin/com/mingliqiye/utils/netty/NamedMultiThreadIoEventLoopGroup.kt +++ b/src/main/kotlin/com/mingliqiye/utils/netty/NamedMultiThreadIoEventLoopGroup.kt @@ -38,15 +38,15 @@ import java.text.MessageFormat * @param selectorProvider NIO 提供者 */ open class NamedMultiThreadIoEventLoopGroup( - val template: String = "{0}-{2}-{3}", - val name: String = "NamedMultiThreadIoEventLoopGroup", - nThreads: Int = availableProcessors * 2, - selectorProvider: SelectorProvider = SelectorProvider.provider(), + val template: String = "{0}-{2}-{3}", + val name: String = "NamedMultiThreadIoEventLoopGroup", + nThreads: Int = availableProcessors * 2, + selectorProvider: SelectorProvider = SelectorProvider.provider(), ) : - MultiThreadIoEventLoopGroup( - nThreads, - NamedThreadFactory( - getName = { a, b, c -> MessageFormat.format(template, name, a, b, c) } - ), - NioIoHandler.newFactory(selectorProvider), - ) + MultiThreadIoEventLoopGroup( + nThreads, + NamedThreadFactory( + getName = { a, b, c -> MessageFormat.format(template, name, a, b, c) } + ), + NioIoHandler.newFactory(selectorProvider), + ) diff --git a/src/main/kotlin/com/mingliqiye/utils/netty/NamedNioEventLoopGroup.kt b/src/main/kotlin/com/mingliqiye/utils/netty/NamedNioEventLoopGroup.kt index 0514bf0..9daea41 100644 --- a/src/main/kotlin/com/mingliqiye/utils/netty/NamedNioEventLoopGroup.kt +++ b/src/main/kotlin/com/mingliqiye/utils/netty/NamedNioEventLoopGroup.kt @@ -35,13 +35,13 @@ import java.text.MessageFormat * @param nThreads 线程数量,默认为核心数的2倍 */ open class NamedNioEventLoopGroup( - val template: String = "{0}-{2}-{3}", - val name: String = "NioEventLoopGroup", - nThreads: Int = availableProcessors * 2, + val template: String = "{0}-{2}-{3}", + val name: String = "NioEventLoopGroup", + nThreads: Int = availableProcessors * 2, ) : - NioEventLoopGroup( - nThreads, - NamedThreadFactory( - getName = { a, b, c -> MessageFormat.format(template, name, a, b, c) } - ) - ) + NioEventLoopGroup( + nThreads, + NamedThreadFactory( + getName = { a, b, c -> MessageFormat.format(template, name, a, b, c) } + ) + ) diff --git a/src/main/kotlin/com/mingliqiye/utils/netty/NamedThreadFactory.kt b/src/main/kotlin/com/mingliqiye/utils/netty/NamedThreadFactory.kt index 6d1898c..f56cc16 100644 --- a/src/main/kotlin/com/mingliqiye/utils/netty/NamedThreadFactory.kt +++ b/src/main/kotlin/com/mingliqiye/utils/netty/NamedThreadFactory.kt @@ -31,81 +31,81 @@ import java.util.concurrent.atomic.AtomicInteger */ open class NamedThreadFactory(private val getName: NamedThreadFactoryNameGetter) : ThreadFactory { - companion object { + companion object { - @JvmStatic - private val allThreadPoolNumber = AtomicInteger(0) + @JvmStatic + private val allThreadPoolNumber = AtomicInteger(0) - /** - * 函数式接口,用于定义线程名称生成规则 - */ - @FunctionalInterface - fun interface NamedThreadFactoryNameGetter { - /** - * 获取线程名称 - * @param clazz 线程工厂类 - * @param poolNumber 线程池编号 - * @param threadNumber 线程编号 - * @return 生成的线程名称 - */ - fun getName(clazz: Class, poolNumber: Int, threadNumber: Int): String - } + /** + * 函数式接口,用于定义线程名称生成规则 + */ + @FunctionalInterface + fun interface NamedThreadFactoryNameGetter { + /** + * 获取线程名称 + * @param clazz 线程工厂类 + * @param poolNumber 线程池编号 + * @param threadNumber 线程编号 + * @return 生成的线程名称 + */ + fun getName(clazz: Class, poolNumber: Int, threadNumber: Int): String + } - /** - * 默认的线程名称生成器 - */ - @JvmStatic - val defaultGetName = - NamedThreadFactoryNameGetter { clazz, poolNumber, threadNumber -> "${clazz.simpleName}-$poolNumber-$threadNumber" } + /** + * 默认的线程名称生成器 + */ + @JvmStatic + val defaultGetName = + NamedThreadFactoryNameGetter { clazz, poolNumber, threadNumber -> "${clazz.simpleName}-$poolNumber-$threadNumber" } - /** - * 创建命名线程工厂实例 - * @param name 线程名称前缀 - * @return NamedThreadFactory实例 - */ - @JvmStatic - fun of(name: String): NamedThreadFactory { - return NamedThreadFactory { a, b, c -> - "$name-$c" - } - } + /** + * 创建命名线程工厂实例 + * @param name 线程名称前缀 + * @return NamedThreadFactory实例 + */ + @JvmStatic + fun of(name: String): NamedThreadFactory { + return NamedThreadFactory { a, b, c -> + "$name-$c" + } + } - /** - * 创建命名线程工厂实例 - * @param getter 线程名称生成器,默认使用defaultGetName - * @return NamedThreadFactory实例 - */ - @JvmStatic - fun of(getter: NamedThreadFactoryNameGetter = defaultGetName): NamedThreadFactory { - return NamedThreadFactory(getter) - } - } + /** + * 创建命名线程工厂实例 + * @param getter 线程名称生成器,默认使用defaultGetName + * @return NamedThreadFactory实例 + */ + @JvmStatic + fun of(getter: NamedThreadFactoryNameGetter = defaultGetName): NamedThreadFactory { + return NamedThreadFactory(getter) + } + } - // 当前线程工厂的线程计数器 - private val threadNumber = AtomicInteger(0) + // 当前线程工厂的线程计数器 + private val threadNumber = AtomicInteger(0) - // 全局线程池计数器,用于标识不同的线程池 - private val threadPoolNumber = allThreadPoolNumber.addAndGet(1) + // 全局线程池计数器,用于标识不同的线程池 + private val threadPoolNumber = allThreadPoolNumber.addAndGet(1) - /** - * 获取线程名称 - * @param clazz 线程工厂类 - * @param poolNumber 线程池编号 - * @param threadNumber 线程编号 - * @return 生成的线程名称 - */ - open fun getThreadName(clazz: Class, poolNumber: Int, threadNumber: Int) = - getName.getName(clazz, poolNumber, threadNumber) + /** + * 获取线程名称 + * @param clazz 线程工厂类 + * @param poolNumber 线程池编号 + * @param threadNumber 线程编号 + * @return 生成的线程名称 + */ + open fun getThreadName(clazz: Class, poolNumber: Int, threadNumber: Int) = + getName.getName(clazz, poolNumber, threadNumber) - /** - * 创建新线程 - * @param r 线程执行的任务 - * @return 新创建的线程对象 - */ - override fun newThread(r: Runnable): Thread { - return Thread(r).let { - it.name = getThreadName(this.javaClass, threadPoolNumber, threadNumber.addAndGet(1)) - it - } - } + /** + * 创建新线程 + * @param r 线程执行的任务 + * @return 新创建的线程对象 + */ + override fun newThread(r: Runnable): Thread { + return Thread(r).let { + it.name = getThreadName(this.javaClass, threadPoolNumber, threadNumber.addAndGet(1)) + it + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/netty/NettyBaseCodec.kt b/src/main/kotlin/com/mingliqiye/utils/netty/NettyBaseCodec.kt index d28df69..5999969 100644 --- a/src/main/kotlin/com/mingliqiye/utils/netty/NettyBaseCodec.kt +++ b/src/main/kotlin/com/mingliqiye/utils/netty/NettyBaseCodec.kt @@ -48,69 +48,69 @@ import io.netty.handler.codec.MessageToMessageCodec */ abstract class NettyBaseCodec : MessageToMessageCodec() { - /** - * 解码方法(Netty 框架回调) - * - * 将入站消息 I 转换为 O,并添加到输出列表 - * - * @param ctx ChannelHandler 上下文,可用于获取 Channel 等信息 - * @param msg 入站消息(类型为 I) - * @param out 输出列表,解码后的消息(类型为 O)将被添加到此列表 - * - * @see decode 抽象方法,由子类实现具体的解码逻辑 - */ - override fun decode(ctx: ChannelHandlerContext, msg: I, out: MutableList) { - // 调用子类实现的抽象解码方法,将结果添加到输出列表 - out.add(decode(msg, ctx, out)) - } + /** + * 解码方法(Netty 框架回调) + * + * 将入站消息 I 转换为 O,并添加到输出列表 + * + * @param ctx ChannelHandler 上下文,可用于获取 Channel 等信息 + * @param msg 入站消息(类型为 I) + * @param out 输出列表,解码后的消息(类型为 O)将被添加到此列表 + * + * @see decode 抽象方法,由子类实现具体的解码逻辑 + */ + override fun decode(ctx: ChannelHandlerContext, msg: I, out: MutableList) { + // 调用子类实现的抽象解码方法,将结果添加到输出列表 + out.add(decode(msg, ctx, out)) + } - /** - * 编码方法(Netty 框架回调) - * - * 将出站消息 O 转换为 I,并添加到输出列表 - * - * @param ctx ChannelHandler 上下文 - * @param msg 出站消息(类型为 O) - * @param out 输出列表,编码后的消息(类型为 I)将被添加到此列表 - * - * @see encode 抽象方法,由子类实现具体的编码逻辑 - */ - override fun encode(ctx: ChannelHandlerContext, msg: O, out: MutableList) { - // 调用子类实现的抽象编码方法,将结果添加到输出列表 - out.add(encode(msg, ctx, out)) - } + /** + * 编码方法(Netty 框架回调) + * + * 将出站消息 O 转换为 I,并添加到输出列表 + * + * @param ctx ChannelHandler 上下文 + * @param msg 出站消息(类型为 O) + * @param out 输出列表,编码后的消息(类型为 I)将被添加到此列表 + * + * @see encode 抽象方法,由子类实现具体的编码逻辑 + */ + override fun encode(ctx: ChannelHandlerContext, msg: O, out: MutableList) { + // 调用子类实现的抽象编码方法,将结果添加到输出列表 + out.add(encode(msg, ctx, out)) + } - /** - * 抽象解码方法 - * - * 子类必须实现此方法,定义具体的解码逻辑 - * 将类型 I 的消息转换为类型 O - * - * @param inData 输入数据(类型 I),需要被解码 - * @param channelHandlerContext ChannelHandler 上下文 - * @param outList 输出列表,可用于在解码过程中添加多个消息(目前设计为单一返回值,outList 暂未使用) - * @return 解码后的数据(类型 O) - */ - abstract fun decode( - inData: I, - channelHandlerContext: ChannelHandlerContext, - outList: MutableList, - ): O + /** + * 抽象解码方法 + * + * 子类必须实现此方法,定义具体的解码逻辑 + * 将类型 I 的消息转换为类型 O + * + * @param inData 输入数据(类型 I),需要被解码 + * @param channelHandlerContext ChannelHandler 上下文 + * @param outList 输出列表,可用于在解码过程中添加多个消息(目前设计为单一返回值,outList 暂未使用) + * @return 解码后的数据(类型 O) + */ + abstract fun decode( + inData: I, + channelHandlerContext: ChannelHandlerContext, + outList: MutableList, + ): O - /** - * 抽象编码方法 - * - * 子类必须实现此方法,定义具体的编码逻辑 - * 将类型 O 的消息转换为类型 I - * - * @param inData 输入数据(类型 O),需要被编码 - * @param channelHandlerContext ChannelHandler 上下文 - * @param outList 输出列表,可用于在编码过程中添加多个消息(目前设计为单一返回值,outList 暂未使用) - * @return 编码后的数据(类型 I) - */ - abstract fun encode( - inData: O, - channelHandlerContext: ChannelHandlerContext, - outList: MutableList, - ): I + /** + * 抽象编码方法 + * + * 子类必须实现此方法,定义具体的编码逻辑 + * 将类型 O 的消息转换为类型 I + * + * @param inData 输入数据(类型 O),需要被编码 + * @param channelHandlerContext ChannelHandler 上下文 + * @param outList 输出列表,可用于在编码过程中添加多个消息(目前设计为单一返回值,outList 暂未使用) + * @return 编码后的数据(类型 I) + */ + abstract fun encode( + inData: O, + channelHandlerContext: ChannelHandlerContext, + outList: MutableList, + ): I } diff --git a/src/main/kotlin/com/mingliqiye/utils/netty/NettyBaseDecoder.kt b/src/main/kotlin/com/mingliqiye/utils/netty/NettyBaseDecoder.kt index fa25b65..f8a8062 100644 --- a/src/main/kotlin/com/mingliqiye/utils/netty/NettyBaseDecoder.kt +++ b/src/main/kotlin/com/mingliqiye/utils/netty/NettyBaseDecoder.kt @@ -53,62 +53,62 @@ import io.netty.handler.codec.MessageToMessageDecoder */ abstract class NettyBaseDecoder : MessageToMessageDecoder() { - /** - * 解码方法(Netty 框架回调) - * - * 由 Netty 在收到入站消息时自动调用 - * 将入站消息 I 转换为 O,并添加到输出列表 - * - * @param ctx ChannelHandler 上下文 - * - 可用于获取 Channel 信息 - * - 可用于触发后续事件 - * - 可用于获取 ChannelPipeline 引用 - * @param msg 入站消息(类型为 I) - * - 由 Netty 从 Channel 中读取 - * - 可能是 ByteBuf、String 或其他类型 - * @param out 输出列表(类型为 MutableList) - * - 解码后的消息(类型为 O)将被添加到此列表 - * - 列表中的消息会传递给下一个 InboundHandler - * - 可以添加多个消息,实现一对多的转换 - * - * @see #decode 抽象方法,由子类实现具体的解码逻辑 - */ - override fun decode(ctx: ChannelHandlerContext, msg: I, out: MutableList) { - // 调用子类实现的抽象解码方法,将结果添加到输出列表 - // 子类通过抽象方法返回解码后的对象,然后添加到 out 中 - out.add(decode(msg, ctx, out)) - } + /** + * 解码方法(Netty 框架回调) + * + * 由 Netty 在收到入站消息时自动调用 + * 将入站消息 I 转换为 O,并添加到输出列表 + * + * @param ctx ChannelHandler 上下文 + * - 可用于获取 Channel 信息 + * - 可用于触发后续事件 + * - 可用于获取 ChannelPipeline 引用 + * @param msg 入站消息(类型为 I) + * - 由 Netty 从 Channel 中读取 + * - 可能是 ByteBuf、String 或其他类型 + * @param out 输出列表(类型为 MutableList) + * - 解码后的消息(类型为 O)将被添加到此列表 + * - 列表中的消息会传递给下一个 InboundHandler + * - 可以添加多个消息,实现一对多的转换 + * + * @see #decode 抽象方法,由子类实现具体的解码逻辑 + */ + override fun decode(ctx: ChannelHandlerContext, msg: I, out: MutableList) { + // 调用子类实现的抽象解码方法,将结果添加到输出列表 + // 子类通过抽象方法返回解码后的对象,然后添加到 out 中 + out.add(decode(msg, ctx, out)) + } - /** - * 抽象解码方法 - * - * 子类必须实现此方法,定义从 I 到 O 的具体转换逻辑 - * - * 实现注意事项: - * 1. 此方法会在 Netty 的 EventLoop 线程中执行,避免阻塞操作 - * 2. 如果输入数据不完整,应该抛出异常或返回 null - * 3. 如果 outList 可以接收多个消息,可以多次调用 outList.add() - * 4. 注意管理 ByteBuf 的引用计数(如果 I 是 ByteBuf) - * - * @param inData 输入数据(类型 I),需要被解码 - * - 由调用方(Netty 框架)传入 - * - 不应为 null(泛型约束为 Any) - * @param channelHandlerContext ChannelHandler 上下文 - * - 可用于获取 ChannelHandlerContext 相关信息 - * - 可用于在解码过程中触发额外操作 - * @param outList 输出列表 - * - 可用于在解码过程中添加多个消息 - * - 当前设计为单一返回值,outList 暂作为扩展预留 - * - 如果需要在解码过程中输出多个消息,可以直接操作此列表并返回 null - * @return 解码后的数据(类型 O) - * - 不能返回 null(泛型约束为 Any) - * - 返回值会被自动添加到 outList 中 - * - * @see #decode 包装方法,由框架调用 - */ - abstract fun decode( - inData: I, - channelHandlerContext: ChannelHandlerContext, - outList: MutableList, - ): O + /** + * 抽象解码方法 + * + * 子类必须实现此方法,定义从 I 到 O 的具体转换逻辑 + * + * 实现注意事项: + * 1. 此方法会在 Netty 的 EventLoop 线程中执行,避免阻塞操作 + * 2. 如果输入数据不完整,应该抛出异常或返回 null + * 3. 如果 outList 可以接收多个消息,可以多次调用 outList.add() + * 4. 注意管理 ByteBuf 的引用计数(如果 I 是 ByteBuf) + * + * @param inData 输入数据(类型 I),需要被解码 + * - 由调用方(Netty 框架)传入 + * - 不应为 null(泛型约束为 Any) + * @param channelHandlerContext ChannelHandler 上下文 + * - 可用于获取 ChannelHandlerContext 相关信息 + * - 可用于在解码过程中触发额外操作 + * @param outList 输出列表 + * - 可用于在解码过程中添加多个消息 + * - 当前设计为单一返回值,outList 暂作为扩展预留 + * - 如果需要在解码过程中输出多个消息,可以直接操作此列表并返回 null + * @return 解码后的数据(类型 O) + * - 不能返回 null(泛型约束为 Any) + * - 返回值会被自动添加到 outList 中 + * + * @see #decode 包装方法,由框架调用 + */ + abstract fun decode( + inData: I, + channelHandlerContext: ChannelHandlerContext, + outList: MutableList, + ): O } diff --git a/src/main/kotlin/com/mingliqiye/utils/netty/NettyBaseEncoder.kt b/src/main/kotlin/com/mingliqiye/utils/netty/NettyBaseEncoder.kt index cdff9f0..9f99d24 100644 --- a/src/main/kotlin/com/mingliqiye/utils/netty/NettyBaseEncoder.kt +++ b/src/main/kotlin/com/mingliqiye/utils/netty/NettyBaseEncoder.kt @@ -55,76 +55,76 @@ import io.netty.handler.codec.MessageToMessageEncoder */ abstract class NettyBaseEncoder : MessageToMessageEncoder() { - /** - * 编码方法(Netty 框架回调) - * - * 由 Netty 在发送出站消息时自动调用 - * 将出站消息 I 编码为 O,并添加到输出列表 - * - * 执行流程: - * 1. 用户调用 Channel.write(msg) 发送消息 - * 2. Netty 将消息传递给 Pipeline 中的 OutboundHandler - * 3. 此方法被调用,执行编码逻辑 - * 4. 编码结果添加到 out 列表 - * 5. Netty 将 out 列表中的消息传递给下一个 OutboundHandler - * - * @param ctx ChannelHandler 上下文 - * - 可用于获取 Channel 信息 - * - 可用于触发后续写操作 - * - 可用于获取 ChannelPipeline 引用 - * @param msg 出站消息(类型为 I) - * - 由业务层调用 write 方法时传入 - * - 可能是任意类型 - * @param out 输出列表(类型为 MutableList) - * - 编码后的消息(类型为 O)将被添加到此列表 - * - 列表中的消息会传递给下一个 OutboundHandler - * - 可以添加多个消息,实现一对多的转换 - * - * @see #encode 抽象方法,由子类实现具体的编码逻辑 - */ - override fun encode(ctx: ChannelHandlerContext, msg: I, out: MutableList) { - // 调用子类实现的抽象编码方法,将结果添加到输出列表 - // 子类通过抽象方法返回编码后的对象,然后添加到 out 中 - out.add(encode(msg, ctx, out)) - } + /** + * 编码方法(Netty 框架回调) + * + * 由 Netty 在发送出站消息时自动调用 + * 将出站消息 I 编码为 O,并添加到输出列表 + * + * 执行流程: + * 1. 用户调用 Channel.write(msg) 发送消息 + * 2. Netty 将消息传递给 Pipeline 中的 OutboundHandler + * 3. 此方法被调用,执行编码逻辑 + * 4. 编码结果添加到 out 列表 + * 5. Netty 将 out 列表中的消息传递给下一个 OutboundHandler + * + * @param ctx ChannelHandler 上下文 + * - 可用于获取 Channel 信息 + * - 可用于触发后续写操作 + * - 可用于获取 ChannelPipeline 引用 + * @param msg 出站消息(类型为 I) + * - 由业务层调用 write 方法时传入 + * - 可能是任意类型 + * @param out 输出列表(类型为 MutableList) + * - 编码后的消息(类型为 O)将被添加到此列表 + * - 列表中的消息会传递给下一个 OutboundHandler + * - 可以添加多个消息,实现一对多的转换 + * + * @see #encode 抽象方法,由子类实现具体的编码逻辑 + */ + override fun encode(ctx: ChannelHandlerContext, msg: I, out: MutableList) { + // 调用子类实现的抽象编码方法,将结果添加到输出列表 + // 子类通过抽象方法返回编码后的对象,然后添加到 out 中 + out.add(encode(msg, ctx, out)) + } - /** - * 抽象编码方法 - * - * 子类必须实现此方法,定义从 I 到 O 的具体转换逻辑 - * - * 实现注意事项: - * 1. 此方法会在 Netty 的 EventLoop 线程中执行,避免阻塞操作 - * 2. 编码后的对象应该是线程安全的(可能会被多个线程访问) - * 3. 如果 outList 可以接收多个消息,可以多次调用 outList.add() - * 4. 如果 I 是 ByteBuf,注意引用计数管理 - * 5. 编码结果应该是完整的消息,不要依赖后续 handler 补充 - * - * 性能建议: - * - 尽量复用对象池中的资源(如 ByteBuf) - * - 避免在编码过程中进行大量数据复制 - * - 考虑使用 DirectBuffer 减少内存拷贝 - * - * @param inData 输入数据(类型 I),需要被编码 - * - 由调用方(业务层)传入 - * - 不应为 null(泛型约束为 Any) - * @param channelHandlerContext ChannelHandler 上下文 - * - 可用于获取 ChannelHandlerContext 相关信息 - * - 可用于在编码过程中触发额外操作 - * - 可通过 ctx.alloc() 获取 ByteBufAllocator 分配内存 - * @param outList 输出列表 - * - 可用于在编码过程中添加多个消息 - * - 当前设计为单一返回值,outList 暂作为扩展预留 - * - 如果需要在编码过程中输出多个消息,可以直接操作此列表并返回 null - * @return 编码后的数据(类型 O) - * - 不能返回 null(泛型约束为 Any) - * - 返回值会被自动添加到 outList 中 - * - * @see #encode 包装方法,由框架调用 - */ - abstract fun encode( - inData: I, - channelHandlerContext: ChannelHandlerContext, - outList: MutableList, - ): O + /** + * 抽象编码方法 + * + * 子类必须实现此方法,定义从 I 到 O 的具体转换逻辑 + * + * 实现注意事项: + * 1. 此方法会在 Netty 的 EventLoop 线程中执行,避免阻塞操作 + * 2. 编码后的对象应该是线程安全的(可能会被多个线程访问) + * 3. 如果 outList 可以接收多个消息,可以多次调用 outList.add() + * 4. 如果 I 是 ByteBuf,注意引用计数管理 + * 5. 编码结果应该是完整的消息,不要依赖后续 handler 补充 + * + * 性能建议: + * - 尽量复用对象池中的资源(如 ByteBuf) + * - 避免在编码过程中进行大量数据复制 + * - 考虑使用 DirectBuffer 减少内存拷贝 + * + * @param inData 输入数据(类型 I),需要被编码 + * - 由调用方(业务层)传入 + * - 不应为 null(泛型约束为 Any) + * @param channelHandlerContext ChannelHandler 上下文 + * - 可用于获取 ChannelHandlerContext 相关信息 + * - 可用于在编码过程中触发额外操作 + * - 可通过 ctx.alloc() 获取 ByteBufAllocator 分配内存 + * @param outList 输出列表 + * - 可用于在编码过程中添加多个消息 + * - 当前设计为单一返回值,outList 暂作为扩展预留 + * - 如果需要在编码过程中输出多个消息,可以直接操作此列表并返回 null + * @return 编码后的数据(类型 O) + * - 不能返回 null(泛型约束为 Any) + * - 返回值会被自动添加到 outList 中 + * + * @see #encode 包装方法,由框架调用 + */ + abstract fun encode( + inData: I, + channelHandlerContext: ChannelHandlerContext, + outList: MutableList, + ): O } diff --git a/src/main/kotlin/com/mingliqiye/utils/netty/NettyUtils.kt b/src/main/kotlin/com/mingliqiye/utils/netty/NettyUtils.kt index 8b27c30..77910ef 100644 --- a/src/main/kotlin/com/mingliqiye/utils/netty/NettyUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/netty/NettyUtils.kt @@ -46,7 +46,7 @@ import java.nio.charset.Charset * @return ByteBuf 转换后的Netty ByteBuf对象,该对象包装了原始的ByteBuffer */ fun ByteBuffer.toByteBuf(): ByteBuf { - return Unpooled.wrappedBuffer(this) + return Unpooled.wrappedBuffer(this) } /** @@ -58,7 +58,7 @@ fun ByteBuffer.toByteBuf(): ByteBuf { * @return ByteBuffer 转换后的java.nio.ByteBuffer对象 */ fun ByteBuf.toByteBuffer(): ByteBuffer { - return this.nioBuffer() + return this.nioBuffer() } /** @@ -70,7 +70,7 @@ fun ByteBuf.toByteBuffer(): ByteBuffer { * @return ByteArray 转换后的字节数组,包含ByteBuf中所有可读的字节数据 */ fun ByteBuf.toByteArray(): ByteArray { - return ByteBufUtil.getBytes(this) + return ByteBufUtil.getBytes(this) } /** @@ -83,7 +83,7 @@ fun ByteBuf.toByteArray(): ByteArray { * @return ByteBuf 转换后的Netty ByteBuf对象,该对象包装了原始的字节数组 */ fun ByteArray.toByteBuf(): ByteBuf { - return Unpooled.wrappedBuffer(this) + return Unpooled.wrappedBuffer(this) } /** @@ -98,12 +98,12 @@ fun ByteArray.toByteBuf(): ByteBuf { */ @JvmName("channelInit") fun ServerBootstrap.channelInitializer(funa: P1Function): ServerBootstrap { - this.childHandler(object : ChannelInitializer() { - override fun initChannel(ch: Channel) { - funa.call(ch) - } - }) - return this + this.childHandler(object : ChannelInitializer() { + override fun initChannel(ch: Channel) { + funa.call(ch) + } + }) + return this } /** @@ -118,12 +118,12 @@ fun ServerBootstrap.channelInitializer(funa: P1Function): ServerBootstr */ @JvmName("pipelineInit") fun ServerBootstrap.pipelineInitializer(funa: P1Function): ServerBootstrap { - this.childHandler(object : ChannelInitializer() { - override fun initChannel(ch: Channel) { - funa.call(ch.pipeline()) - } - }) - return this + this.childHandler(object : ChannelInitializer() { + override fun initChannel(ch: Channel) { + funa.call(ch.pipeline()) + } + }) + return this } /** @@ -138,12 +138,12 @@ fun ServerBootstrap.pipelineInitializer(funa: P1Function): Serv */ @JvmName("channelInit") fun Bootstrap.channelInitializer(funa: P1Function): Bootstrap { - this.handler(object : ChannelInitializer() { - override fun initChannel(ch: Channel) { - funa.call(ch) - } - }) - return this + this.handler(object : ChannelInitializer() { + override fun initChannel(ch: Channel) { + funa.call(ch) + } + }) + return this } /** @@ -158,12 +158,12 @@ fun Bootstrap.channelInitializer(funa: P1Function): Bootstrap { */ @JvmName("pipelineInit") fun Bootstrap.pipelineInitializer(funa: P1Function): Bootstrap { - this.handler(object : ChannelInitializer() { - override fun initChannel(ch: Channel) { - funa.call(ch.pipeline()) - } - }) - return this + this.handler(object : ChannelInitializer() { + override fun initChannel(ch: Channel) { + funa.call(ch.pipeline()) + } + }) + return this } /** @@ -174,7 +174,7 @@ fun Bootstrap.pipelineInitializer(funa: P1Function): Bootstrap * @return ByteBuf 转换后的Netty ByteBuf对象 */ fun String.toByteBuf(charset: Charset = Charsets.UTF_8): ByteBuf { - return Unpooled.wrappedBuffer(this.toByteArray(charset)) + return Unpooled.wrappedBuffer(this.toByteArray(charset)) } /** @@ -185,8 +185,8 @@ fun String.toByteBuf(charset: Charset = Charsets.UTF_8): ByteBuf { * @return String 转换后的字符串 */ fun ByteBuf.toString(charset: Charset = Charsets.UTF_8): String { - val bytes = this.toByteArray() - return String(bytes, charset) + val bytes = this.toByteArray() + return String(bytes, charset) } @@ -197,9 +197,9 @@ fun ByteBuf.toString(charset: Charset = Charsets.UTF_8): String { * @return ByteBuf 转换后的Netty ByteBuf对象,包含4字节的整数数据 */ fun Int.toByteBuf(): ByteBuf { - val buffer = Unpooled.buffer(4) - buffer.writeInt(this) - return buffer + val buffer = Unpooled.buffer(4) + buffer.writeInt(this) + return buffer } /** @@ -209,9 +209,9 @@ fun Int.toByteBuf(): ByteBuf { * @return ByteBuf 转换后的Netty ByteBuf对象,包含8字节的长整数数据 */ fun Long.toByteBuf(): ByteBuf { - val buffer = Unpooled.buffer(8) - buffer.writeLong(this) - return buffer + val buffer = Unpooled.buffer(8) + buffer.writeLong(this) + return buffer } /** @@ -221,7 +221,7 @@ fun Long.toByteBuf(): ByteBuf { * @return Int 从ByteBuf中读取的整数值 */ fun ByteBuf.toInt(): Int { - return this.readInt() + return this.readInt() } /** @@ -231,7 +231,7 @@ fun ByteBuf.toInt(): Int { * @return Long 从ByteBuf中读取的长整数值 */ fun ByteBuf.toLong(): Long { - return this.readLong() + return this.readLong() } /** @@ -241,15 +241,15 @@ fun ByteBuf.toLong(): Long { * @return ByteArray 转换后的字节数组 */ fun ByteBuf.safeToByteArray(): ByteArray { - return if (this.hasArray()) { - // 如果是堆内内存,直接获取数组 - this.array().copyOfRange(this.arrayOffset(), this.arrayOffset() + this.readableBytes()) - } else { - // 如果是堆外内存,使用readBytes - val array = ByteArray(this.readableBytes()) - this.getBytes(this.readerIndex(), array) - array - } + return if (this.hasArray()) { + // 如果是堆内内存,直接获取数组 + this.array().copyOfRange(this.arrayOffset(), this.arrayOffset() + this.readableBytes()) + } else { + // 如果是堆外内存,使用readBytes + val array = ByteArray(this.readableBytes()) + this.getBytes(this.readerIndex(), array) + array + } } /** @@ -259,8 +259,8 @@ fun ByteBuf.safeToByteArray(): ByteArray { * @return String 十六进制字符串表示 */ fun ByteBuf.toHexString(): String { - val array = this.safeToByteArray() - return array.joinToString("") { "%02x".format(it) } + val array = this.safeToByteArray() + return array.joinToString("") { "%02x".format(it) } } /** @@ -270,26 +270,26 @@ fun ByteBuf.toHexString(): String { * @return ByteBuf 合并后的ByteBuf对象 */ fun combineByteBuf(vararg byteBufs: ByteBuf): ByteBuf { - val totalCapacity = byteBufs.sumOf { it.readableBytes() } - val combined = Unpooled.buffer(totalCapacity) - byteBufs.forEach { combined.writeBytes(it.duplicate()) } - return combined + val totalCapacity = byteBufs.sumOf { it.readableBytes() } + val combined = Unpooled.buffer(totalCapacity) + byteBufs.forEach { combined.writeBytes(it.duplicate()) } + return combined } /** * 安全关闭通道 */ fun Channel.closeSafely() { - if (isOpen) { - close() - } + if (isOpen) { + close() + } } /** * 检查通道是否处于活跃状态 */ val Channel.isActived: Boolean - get() = isOpen && isActive + get() = isOpen && isActive /** * 异步写入数据到通道 @@ -297,12 +297,12 @@ val Channel.isActived: Boolean * @param data 需要写入的数据 */ fun Channel.writeAndFlushAsync(data: Any) { - writeAndFlush(data).addListener { future -> - if (!future.isSuccess) { - // 可以在这里添加错误处理逻辑 - println("Write failed: ${future.cause()}") - } - } + writeAndFlush(data).addListener { future -> + if (!future.isSuccess) { + // 可以在这里添加错误处理逻辑 + println("Write failed: ${future.cause()}") + } + } } /** @@ -312,7 +312,7 @@ fun Channel.writeAndFlushAsync(data: Any) { * @return Boolean 释放操作是否成功 */ fun ByteBuf.releaseSafely(): Boolean { - return if (refCnt() > 0) release() else true + return if (refCnt() > 0) release() else true } /** @@ -322,9 +322,9 @@ fun ByteBuf.releaseSafely(): Boolean { * @return Boolean 释放操作是否成功 */ fun ByteBuf.tryRelease(): Boolean { - return try { - refCnt() > 0 && release() - } catch (e: Exception) { - false - } + return try { + refCnt() > 0 && release() + } catch (e: Exception) { + false + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/network/NetworkAddress.kt b/src/main/kotlin/com/mingliqiye/utils/network/NetworkAddress.kt index 20f2f12..a9bb119 100644 --- a/src/main/kotlin/com/mingliqiye/utils/network/NetworkAddress.kt +++ b/src/main/kotlin/com/mingliqiye/utils/network/NetworkAddress.kt @@ -37,211 +37,211 @@ import java.util.regex.Pattern */ class NetworkAddress private constructor(domip: String) : Serializable { - /** - * IPv6标识 - */ - companion object { - const val IPV6 = 6 + /** + * IPv6标识 + */ + companion object { + const val IPV6 = 6 - /** - * IPv4标识 - */ - const val IPV4 = 4 + /** + * IPv4标识 + */ + const val IPV4 = 4 - /** - * IPv4地址正则表达式 - */ - private const val IPV4REG = - "^((2(5[0-5]|[0-4]\\d))|[0-1]?\\d{1,2})(\\.((2" + "(5[0-5]|[0-4]\\d))|[0-1]?\\d{1,2})){3}$" + /** + * IPv4地址正则表达式 + */ + private const val IPV4REG = + "^((2(5[0-5]|[0-4]\\d))|[0-1]?\\d{1,2})(\\.((2" + "(5[0-5]|[0-4]\\d))|[0-1]?\\d{1,2})){3}$" - /** - * 编译后的IPv4地址匹配模式 - */ - private val IPV4_PATTERN = Pattern.compile(IPV4REG) + /** + * 编译后的IPv4地址匹配模式 + */ + private val IPV4_PATTERN = Pattern.compile(IPV4REG) - /** - * IPv6地址正则表达式 - */ - private const val IPV6REG = - "^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$|" + "^(::([0-9a-fA-F]{1,4}:){0,6}[0-9a-fA-F]{1,4})$" + "|" + "^(::)$|" + "^([0-9a-fA-F]{1,4}::([0-9a-fA-F]{1,4}:){0,5}[0-9a-fA-F]{1,4})$|" + "^(([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4})$|" + "^(([0-9a-fA-F]{1,4}:){6}(([0-9]{1,3}\\.){3}[0-9]{1,3}))$|" + "^::([fF]{4}:)?(([0-9]{1,3}\\.){3}[0-9]{1,3})$" + /** + * IPv6地址正则表达式 + */ + private const val IPV6REG = + "^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$|" + "^(::([0-9a-fA-F]{1,4}:){0,6}[0-9a-fA-F]{1,4})$" + "|" + "^(::)$|" + "^([0-9a-fA-F]{1,4}::([0-9a-fA-F]{1,4}:){0,5}[0-9a-fA-F]{1,4})$|" + "^(([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4})$|" + "^(([0-9a-fA-F]{1,4}:){6}(([0-9]{1,3}\\.){3}[0-9]{1,3}))$|" + "^::([fF]{4}:)?(([0-9]{1,3}\\.){3}[0-9]{1,3})$" - /** - * 编译后的IPv6地址匹配模式 - */ - private val IPV6_PATTERN = Pattern.compile(IPV6REG) + /** + * 编译后的IPv6地址匹配模式 + */ + private val IPV6_PATTERN = Pattern.compile(IPV6REG) - /** - * 静态工厂方法,创建 NetworkAddress 实例。 - * - * @param domip 可能是IP地址或域名的字符串 - * @return 新建的 NetworkAddress 实例 - */ - @JvmStatic - fun of(domip: String): NetworkAddress { - return NetworkAddress(domip) - } + /** + * 静态工厂方法,创建 NetworkAddress 实例。 + * + * @param domip 可能是IP地址或域名的字符串 + * @return 新建的 NetworkAddress 实例 + */ + @JvmStatic + fun of(domip: String): NetworkAddress { + return NetworkAddress(domip) + } - @JvmStatic - fun ofIpv4(byteBuffer: ByteBuffer): NetworkAddress { - val byteArray = ByteArray(4) - byteBuffer.get(byteArray) - return ofIpv4(byteArray) - } + @JvmStatic + fun ofIpv4(byteBuffer: ByteBuffer): NetworkAddress { + val byteArray = ByteArray(4) + byteBuffer.get(byteArray) + return ofIpv4(byteArray) + } - @JvmStatic - fun ofIpv4(byteArray: ByteArray): NetworkAddress { - return of(".".join(byteArray.map { - (it.toInt() and 0xFF).toString() - })) - } + @JvmStatic + fun ofIpv4(byteArray: ByteArray): NetworkAddress { + return of(".".join(byteArray.map { + (it.toInt() and 0xFF).toString() + })) + } - /** - * 静态工厂方法,通过 InetAddress 创建 NetworkAddress 实例。 - * - * @param inetAddress InetAddress 对象 - * @return 新建的 NetworkAddress 实例 - */ - @JvmStatic - fun of(inetAddress: InetAddress): NetworkAddress { - return NetworkAddress(inetAddress.hostAddress) - } + /** + * 静态工厂方法,通过 InetAddress 创建 NetworkAddress 实例。 + * + * @param inetAddress InetAddress 对象 + * @return 新建的 NetworkAddress 实例 + */ + @JvmStatic + fun of(inetAddress: InetAddress): NetworkAddress { + return NetworkAddress(inetAddress.hostAddress) + } - /** - * 从DNS服务器解析域名获取对应的IP地址。 - * - * @param domain 域名 - * @return 解析出的第一个IP地址 - * @throws java.net.UnknownHostException 如果域名无法解析 - */ - @JvmStatic - @Throws(UnknownHostException::class) - fun getHostIp(domain: String): String { - val addresses = InetAddress.getAllByName(domain.trim()) - return addresses[0].hostAddress - } + /** + * 从DNS服务器解析域名获取对应的IP地址。 + * + * @param domain 域名 + * @return 解析出的第一个IP地址 + * @throws java.net.UnknownHostException 如果域名无法解析 + */ + @JvmStatic + @Throws(UnknownHostException::class) + fun getHostIp(domain: String): String { + val addresses = InetAddress.getAllByName(domain.trim()) + return addresses[0].hostAddress + } - /** - * 检测给定字符串是否为有效的IPv4或IPv6地址。 - * - * @param ip 要检测的IP地址字符串 - * @return 4 表示IPv4,6 表示IPv6 - * @throws NetworkException 如果IP格式无效 - */ - @JvmStatic - fun testIp(ip: String?): Int { - if (ip == null) { - throw NetworkException("IP地址不能为null") - } - val trimmedIp = ip.trim() + /** + * 检测给定字符串是否为有效的IPv4或IPv6地址。 + * + * @param ip 要检测的IP地址字符串 + * @return 4 表示IPv4,6 表示IPv6 + * @throws NetworkException 如果IP格式无效 + */ + @JvmStatic + fun testIp(ip: String?): Int { + if (ip == null) { + throw NetworkException("IP地址不能为null") + } + val trimmedIp = ip.trim() - // 判断是否匹配IPv4格式 - if (IPV4_PATTERN.matcher(trimmedIp).matches()) { - return IPV4 - } + // 判断是否匹配IPv4格式 + if (IPV4_PATTERN.matcher(trimmedIp).matches()) { + return IPV4 + } - // 判断是否匹配IPv6格式 - if (IPV6_PATTERN.matcher(trimmedIp).matches()) { - return IPV6 - } + // 判断是否匹配IPv6格式 + if (IPV6_PATTERN.matcher(trimmedIp).matches()) { + return IPV6 + } - // 不符合任一格式时抛出异常 - throw NetworkException( - "[$ip] 不是有效的IPv4或IPv6地址" - ) - } - } + // 不符合任一格式时抛出异常 + throw NetworkException( + "[$ip] 不是有效的IPv4或IPv6地址" + ) + } + } - /** - * IP地址类型:4 表示 IPv4,6 表示 IPv6 - */ - var iPv: Int = 0 - private set + /** + * IP地址类型:4 表示 IPv4,6 表示 IPv6 + */ + var iPv: Int = 0 + private set - /** - * IP地址字符串 - */ - var ip: String? = null - private set + /** + * IP地址字符串 + */ + var ip: String? = null + private set - /** - * 域名(如果输入的是域名) - */ - private var domain: String? = null + /** + * 域名(如果输入的是域名) + */ + private var domain: String? = null - /** - * 标识是否是域名解析来的IP - */ - private var isdom = false + /** + * 标识是否是域名解析来的IP + */ + private var isdom = false - /** - * 构造方法,根据传入的字符串判断是IP地址还是域名,并进行相应处理。 - * - * @param domip 可能是IP地址或域名的字符串 - */ - init { - try { - // 尝试将输入识别为IP地址 - this.iPv = testIp(domip) - this.ip = domip - } catch (e: NetworkException) { - try { - // 如果不是有效IP,则尝试作为域名解析 - val ips = getHostIp(domip) - this.iPv = testIp(ips) - this.ip = ips - this.isdom = true - this.domain = domip - } catch (ex: UnknownHostException) { - throw NetworkException(ex) - } - } - } + /** + * 构造方法,根据传入的字符串判断是IP地址还是域名,并进行相应处理。 + * + * @param domip 可能是IP地址或域名的字符串 + */ + init { + try { + // 尝试将输入识别为IP地址 + this.iPv = testIp(domip) + this.ip = domip + } catch (e: NetworkException) { + try { + // 如果不是有效IP,则尝试作为域名解析 + val ips = getHostIp(domip) + this.iPv = testIp(ips) + this.ip = ips + this.isdom = true + this.domain = domip + } catch (ex: UnknownHostException) { + throw NetworkException(ex) + } + } + } - /** - * 将IPv4地址转换为字节数组 - * - * @return 返回表示IPv4地址的4字节数组 - * @throws NetworkException 当当前地址不是IPv4地址时抛出异常 - */ - fun toIpv4ByteArray(): ByteArray { - // 验证地址类型是否为IPv4 - if (iPv != IPV4) { - throw NetworkException("该地址 不是IPv4地址") - } - // 将IP地址字符串按点分割,转换为整数并进行位运算处理,最后转为字节数组 - return ip!!.split(".").map { it.toInt() and 0xFF }.map { it.toByte() }.toByteArray() - } + /** + * 将IPv4地址转换为字节数组 + * + * @return 返回表示IPv4地址的4字节数组 + * @throws NetworkException 当当前地址不是IPv4地址时抛出异常 + */ + fun toIpv4ByteArray(): ByteArray { + // 验证地址类型是否为IPv4 + if (iPv != IPV4) { + throw NetworkException("该地址 不是IPv4地址") + } + // 将IP地址字符串按点分割,转换为整数并进行位运算处理,最后转为字节数组 + return ip!!.split(".").map { it.toInt() and 0xFF }.map { it.toByte() }.toByteArray() + } - /** - * 将IPv4地址写入到指定的ByteBuffer中 - * - * @param byteBuffer 要写入的ByteBuffer对象,IPv4地址将以字节数组形式写入到该缓冲区 - * @return 返回写入了IPv4地址的ByteBuffer对象,便于链式调用 - */ - fun writeIpv4ToByteBuffer(byteBuffer: ByteBuffer): ByteBuffer { - return byteBuffer.put(toIpv4ByteArray()) - } + /** + * 将IPv4地址写入到指定的ByteBuffer中 + * + * @param byteBuffer 要写入的ByteBuffer对象,IPv4地址将以字节数组形式写入到该缓冲区 + * @return 返回写入了IPv4地址的ByteBuffer对象,便于链式调用 + */ + fun writeIpv4ToByteBuffer(byteBuffer: ByteBuffer): ByteBuffer { + return byteBuffer.put(toIpv4ByteArray()) + } - /** - * 将当前 NetworkAddress 转换为 InetAddress 对象。 - * - * @return InetAddress 对象 - */ - fun toInetAddress(): InetAddress { - try { - return InetAddress.getByName(if (ip != null) ip else domain) - } catch (e: UnknownHostException) { - throw RuntimeException(e) - } - } + /** + * 将当前 NetworkAddress 转换为 InetAddress 对象。 + * + * @return InetAddress 对象 + */ + fun toInetAddress(): InetAddress { + try { + return InetAddress.getByName(if (ip != null) ip else domain) + } catch (e: UnknownHostException) { + throw RuntimeException(e) + } + } - /** - * 返回 NetworkAddress 的字符串表示形式。 - * - * @return 字符串表示 - */ - override fun toString(): String { - return if (isdom) "NetworkAddress(IP='$ip',type='$iPv',domain='$domain')" - else "NetworkAddress(IP='$ip',type='$iPv')" - } + /** + * 返回 NetworkAddress 的字符串表示形式。 + * + * @return 字符串表示 + */ + override fun toString(): String { + return if (isdom) "NetworkAddress(IP='$ip',type='$iPv',domain='$domain')" + else "NetworkAddress(IP='$ip',type='$iPv')" + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/network/NetworkEndpoint.kt b/src/main/kotlin/com/mingliqiye/utils/network/NetworkEndpoint.kt index 272dc8d..19a130f 100644 --- a/src/main/kotlin/com/mingliqiye/utils/network/NetworkEndpoint.kt +++ b/src/main/kotlin/com/mingliqiye/utils/network/NetworkEndpoint.kt @@ -35,181 +35,181 @@ import java.nio.ByteBuffer * @see java.net.InetSocketAddress */ class NetworkEndpoint private constructor( - val networkAddress: NetworkAddress, val networkPort: NetworkPort, + val networkAddress: NetworkAddress, val networkPort: NetworkPort, ) : Serializable, InetSocketAddress(networkAddress.toInetAddress(), networkPort.port) { - companion object { - /** - * 根据给定的InetSocketAddress对象创建NetworkEndpoint实例。 - * - * @param address InetSocketAddress对象 - * @return 新建的NetworkEndpoint实例 - * @see InetSocketAddress - */ - @JvmStatic - fun of(address: SocketAddress): NetworkEndpoint { - if (address is InetSocketAddress) { - return NetworkEndpoint( - NetworkAddress.of(address.hostString), NetworkPort(address.port) - ) - } - throw ClassCastException("${address.javaClass} cannot be cast to InetSocketAddress to NetworkEndpoint") - } + companion object { + /** + * 根据给定的InetSocketAddress对象创建NetworkEndpoint实例。 + * + * @param address InetSocketAddress对象 + * @return 新建的NetworkEndpoint实例 + * @see InetSocketAddress + */ + @JvmStatic + fun of(address: SocketAddress): NetworkEndpoint { + if (address is InetSocketAddress) { + return NetworkEndpoint( + NetworkAddress.of(address.hostString), NetworkPort(address.port) + ) + } + throw ClassCastException("${address.javaClass} cannot be cast to InetSocketAddress to NetworkEndpoint") + } - /** - * 根据主机名或IP字符串和端口号创建NetworkEndpoint实例。 - * - * @param s 主机名或IP地址字符串 - * @param i 端口号 - * @return 新建的NetworkEndpoint实例 - */ - @JvmStatic - fun of(s: String, i: Int): NetworkEndpoint { - val networkAddress = NetworkAddress.of(s) - val networkPort = NetworkPort(i) - return NetworkEndpoint(networkAddress, networkPort) - } + /** + * 根据主机名或IP字符串和端口号创建NetworkEndpoint实例。 + * + * @param s 主机名或IP地址字符串 + * @param i 端口号 + * @return 新建的NetworkEndpoint实例 + */ + @JvmStatic + fun of(s: String, i: Int): NetworkEndpoint { + val networkAddress = NetworkAddress.of(s) + val networkPort = NetworkPort(i) + return NetworkEndpoint(networkAddress, networkPort) + } - /** - * 从字节数组创建IPv4网络端点 - * - * @param byteArray 包含IPv4地址和端口信息的字节数组,前4个字节表示IP地址,后2个字节表示端口号 - * @return NetworkEndpoint对象,封装了IPv4地址和端口信息 - */ - @JvmStatic - fun ofIpv4(byteArray: ByteArray): NetworkEndpoint { - // 提取前4个字节作为IP地址 - val address = ByteArray(4) { - byteArray[it] - } - // 提取后2个字节作为端口号 - val portInt = ByteArray(2) { - byteArray[it + 4] - } - return NetworkEndpoint(NetworkAddress.ofIpv4(address), NetworkPort.of(portInt)) - } + /** + * 从字节数组创建IPv4网络端点 + * + * @param byteArray 包含IPv4地址和端口信息的字节数组,前4个字节表示IP地址,后2个字节表示端口号 + * @return NetworkEndpoint对象,封装了IPv4地址和端口信息 + */ + @JvmStatic + fun ofIpv4(byteArray: ByteArray): NetworkEndpoint { + // 提取前4个字节作为IP地址 + val address = ByteArray(4) { + byteArray[it] + } + // 提取后2个字节作为端口号 + val portInt = ByteArray(2) { + byteArray[it + 4] + } + return NetworkEndpoint(NetworkAddress.ofIpv4(address), NetworkPort.of(portInt)) + } - /** - * 从字节缓冲区创建IPv4网络端点实例 - * - * 该方法从给定的ByteBuffer中读取数据,构建一个包含IPv4地址和端口的网络端点对象。 - * 该方法按照协议顺序从缓冲区中读取IPv4地址数据和端口数据。 - * - * @param byteBuffer 包含IPv4地址和端口数据的字节缓冲区,缓冲区中的数据应按照先地址后端口的顺序排列 - * @return 返回一个NetworkEndpoint实例,包含从缓冲区解析出的IPv4地址和端口信息 - */ - @JvmStatic - fun ofIpv4(byteBuffer: ByteBuffer): NetworkEndpoint { - return NetworkEndpoint( - NetworkAddress.ofIpv4(byteBuffer), - NetworkPort.of(byteBuffer) - ) - } + /** + * 从字节缓冲区创建IPv4网络端点实例 + * + * 该方法从给定的ByteBuffer中读取数据,构建一个包含IPv4地址和端口的网络端点对象。 + * 该方法按照协议顺序从缓冲区中读取IPv4地址数据和端口数据。 + * + * @param byteBuffer 包含IPv4地址和端口数据的字节缓冲区,缓冲区中的数据应按照先地址后端口的顺序排列 + * @return 返回一个NetworkEndpoint实例,包含从缓冲区解析出的IPv4地址和端口信息 + */ + @JvmStatic + fun ofIpv4(byteBuffer: ByteBuffer): NetworkEndpoint { + return NetworkEndpoint( + NetworkAddress.ofIpv4(byteBuffer), + NetworkPort.of(byteBuffer) + ) + } - /** - * 根据"host:port"格式的字符串创建NetworkEndpoint实例。 - * 例如:"127.0.0.1:8080" - * - * @param s "host:port"格式的字符串 - * @return 新建的NetworkEndpoint实例 - */ - @JvmStatic - fun of(s: String): NetworkEndpoint { - val lastColonIndex = s.lastIndexOf(':') - return of( - s.take(lastColonIndex), s.substring(lastColonIndex + 1).toInt() - ) - } + /** + * 根据"host:port"格式的字符串创建NetworkEndpoint实例。 + * 例如:"127.0.0.1:8080" + * + * @param s "host:port"格式的字符串 + * @return 新建的NetworkEndpoint实例 + */ + @JvmStatic + fun of(s: String): NetworkEndpoint { + val lastColonIndex = s.lastIndexOf(':') + return of( + s.take(lastColonIndex), s.substring(lastColonIndex + 1).toInt() + ) + } - val SocketAddress.networkAddress: NetworkEndpoint - get() = of(this) - val SocketAddress.hostPortString: String - get() = networkAddress.toHostPortString() - } + val SocketAddress.networkAddress: NetworkEndpoint + get() = of(this) + val SocketAddress.hostPortString: String + get() = networkAddress.toHostPortString() + } - /** - * 将当前NetworkEndpoint转换为InetSocketAddress对象。 - * - * @return 对应的InetSocketAddress对象 - * @see InetSocketAddress - */ - fun toInetSocketAddress(): InetSocketAddress { - return InetSocketAddress( - networkAddress.toInetAddress(), networkPort.port - ) - } + /** + * 将当前NetworkEndpoint转换为InetSocketAddress对象。 + * + * @return 对应的InetSocketAddress对象 + * @see InetSocketAddress + */ + fun toInetSocketAddress(): InetSocketAddress { + return InetSocketAddress( + networkAddress.toInetAddress(), networkPort.port + ) + } - /** - * 将当前NetworkEndpoint转换为"host:port"格式的字符串。 - * 例如:"127.0.0.1:25563" - * - * @return 格式化后的字符串 - */ - fun toHostPortString(): String { - return "${networkAddress.ip}:${networkPort.port}" - } + /** + * 将当前NetworkEndpoint转换为"host:port"格式的字符串。 + * 例如:"127.0.0.1:25563" + * + * @return 格式化后的字符串 + */ + fun toHostPortString(): String { + return "${networkAddress.ip}:${networkPort.port}" + } - /** - * 返回NetworkEndpoint的详细字符串表示形式。 - * 格式:NetworkEndpoint(IP=...,Port=...,Endpoint=...) - * - * @return 包含详细信息的字符串 - */ - override fun toString(): String { - return "NetworkEndpoint(IP=${networkAddress.ip},Port=${networkPort.port})" - } + /** + * 返回NetworkEndpoint的详细字符串表示形式。 + * 格式:NetworkEndpoint(IP=...,Port=...,Endpoint=...) + * + * @return 包含详细信息的字符串 + */ + override fun toString(): String { + return "NetworkEndpoint(IP=${networkAddress.ip},Port=${networkPort.port})" + } - /** - * 获取主机名或IP地址字符串。 - * - * @return 主机名或IP地址 - */ - fun host(): String { - return networkAddress.ip ?: "" - } + /** + * 获取主机名或IP地址字符串。 + * + * @return 主机名或IP地址 + */ + fun host(): String { + return networkAddress.ip ?: "" + } - /** - * 获取端口号。 - * - * @return 端口号 - */ - fun port(): Int { - return networkPort.port - } + /** + * 获取端口号。 + * + * @return 端口号 + */ + fun port(): Int { + return networkPort.port + } - /** - * 将网络地址和端口转换为IPv4字节数组 - * - * 该函数将当前对象的网络地址转换为IPv4字节数组,并与端口字节数组合并, - * 生成一个包含6个字节的数组,其中前4个字节为IPv4地址,后2个字节为端口号 - * - * @return ByteArray 包含6个字节的数组,前4个字节为IPv4地址,后2个字节为端口号 - */ - fun toIpv4ByteArray(): ByteArray { - val ipv4ByteArray = networkAddress.toIpv4ByteArray() - val portByteArray = networkPort.toByteArray() - // 构建包含IPv4地址和端口的6字节数组 - val byteArray = ByteArray(6) { - if (it < 4) { - ipv4ByteArray[it] - } else { - portByteArray[it - 4] - } - } - return byteArray - } + /** + * 将网络地址和端口转换为IPv4字节数组 + * + * 该函数将当前对象的网络地址转换为IPv4字节数组,并与端口字节数组合并, + * 生成一个包含6个字节的数组,其中前4个字节为IPv4地址,后2个字节为端口号 + * + * @return ByteArray 包含6个字节的数组,前4个字节为IPv4地址,后2个字节为端口号 + */ + fun toIpv4ByteArray(): ByteArray { + val ipv4ByteArray = networkAddress.toIpv4ByteArray() + val portByteArray = networkPort.toByteArray() + // 构建包含IPv4地址和端口的6字节数组 + val byteArray = ByteArray(6) { + if (it < 4) { + ipv4ByteArray[it] + } else { + portByteArray[it - 4] + } + } + return byteArray + } - /** - * 将IPv4地址和端口信息写入字节缓冲区 - * - * 该函数依次将网络地址的IPv4表示和网络端口写入到指定的字节缓冲区中 - * - * @param byteBuffer 要写入数据的目标字节缓冲区 - */ - fun writeIpv4toByteBuffer(byteBuffer: ByteBuffer): ByteBuffer { - networkAddress.writeIpv4ToByteBuffer(byteBuffer) - networkPort.writeToByteBuffer(byteBuffer) - return byteBuffer - } + /** + * 将IPv4地址和端口信息写入字节缓冲区 + * + * 该函数依次将网络地址的IPv4表示和网络端口写入到指定的字节缓冲区中 + * + * @param byteBuffer 要写入数据的目标字节缓冲区 + */ + fun writeIpv4toByteBuffer(byteBuffer: ByteBuffer): ByteBuffer { + networkAddress.writeIpv4ToByteBuffer(byteBuffer) + networkPort.writeToByteBuffer(byteBuffer) + return byteBuffer + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/network/NetworkException.kt b/src/main/kotlin/com/mingliqiye/utils/network/NetworkException.kt index c1362f3..8a7ae65 100644 --- a/src/main/kotlin/com/mingliqiye/utils/network/NetworkException.kt +++ b/src/main/kotlin/com/mingliqiye/utils/network/NetworkException.kt @@ -23,17 +23,17 @@ package com.mingliqiye.utils.network class NetworkException : RuntimeException { - /** - * 构造一个带有指定详细消息的网络异常 - * - * @param message 异常的详细消息 - */ - constructor(message: String?) : super(message) + /** + * 构造一个带有指定详细消息的网络异常 + * + * @param message 异常的详细消息 + */ + constructor(message: String?) : super(message) - /** - * 构造一个网络异常,指定原因异常 - * - * @param e 导致此异常的原因异常 - */ - constructor(e: Exception?) : super(e) + /** + * 构造一个网络异常,指定原因异常 + * + * @param e 导致此异常的原因异常 + */ + constructor(e: Exception?) : super(e) } diff --git a/src/main/kotlin/com/mingliqiye/utils/network/NetworkPort.kt b/src/main/kotlin/com/mingliqiye/utils/network/NetworkPort.kt index 5ff3368..a5ad008 100644 --- a/src/main/kotlin/com/mingliqiye/utils/network/NetworkPort.kt +++ b/src/main/kotlin/com/mingliqiye/utils/network/NetworkPort.kt @@ -26,66 +26,66 @@ import java.io.Serializable import java.nio.ByteBuffer class NetworkPort : Serializable { - val port: Int + val port: Int - constructor(port: Int) { - testPort(port) - this.port = port - } + constructor(port: Int) { + testPort(port) + this.port = port + } - fun toByteArray(): ByteArray { - val byteArray = ByteArray(2) - byteArray[0] = (port shr 8 and 0xFF).toByte() - byteArray[1] = (port and 0xFF).toByte() - return byteArray - } + fun toByteArray(): ByteArray { + val byteArray = ByteArray(2) + byteArray[0] = (port shr 8 and 0xFF).toByte() + byteArray[1] = (port and 0xFF).toByte() + return byteArray + } - fun writeToByteBuffer(byteBuffer: ByteBuffer): ByteBuffer { - return byteBuffer.put(toByteArray()) - } + fun writeToByteBuffer(byteBuffer: ByteBuffer): ByteBuffer { + return byteBuffer.put(toByteArray()) + } - companion object { + companion object { - /** - * 创建NetworkPort实例 - * @param port 端口号 - * @return NetworkPort实例 - */ - @JvmStatic - fun of(port: Int): NetworkPort { - return NetworkPort(port) - } + /** + * 创建NetworkPort实例 + * @param port 端口号 + * @return NetworkPort实例 + */ + @JvmStatic + fun of(port: Int): NetworkPort { + return NetworkPort(port) + } - /** - * 从字节数组创建NetworkPort实例 - * @param byteArray 包含端口信息的字节数组(长度至少为2) - * @return NetworkPort实例 - */ - @JvmStatic - fun of(byteArray: ByteArray): NetworkPort { - // 将字节数组的前两个字节转换为端口号 - val port = ((byteArray[0].toInt() and 0xFF) shl 8) or (byteArray[1].toInt() and 0xFF) - return of(port) - } + /** + * 从字节数组创建NetworkPort实例 + * @param byteArray 包含端口信息的字节数组(长度至少为2) + * @return NetworkPort实例 + */ + @JvmStatic + fun of(byteArray: ByteArray): NetworkPort { + // 将字节数组的前两个字节转换为端口号 + val port = ((byteArray[0].toInt() and 0xFF) shl 8) or (byteArray[1].toInt() and 0xFF) + return of(port) + } - /** - * 从ByteBuffer创建NetworkPort实例 - * @param byteBuffer 包含端口信息的ByteBuffer - * @return NetworkPort实例 - */ - @JvmStatic - fun of(byteBuffer: ByteBuffer): NetworkPort { - val byteArray = ByteArray(2) - byteBuffer.get(byteArray) - return of(byteArray) - } + /** + * 从ByteBuffer创建NetworkPort实例 + * @param byteBuffer 包含端口信息的ByteBuffer + * @return NetworkPort实例 + */ + @JvmStatic + fun of(byteBuffer: ByteBuffer): NetworkPort { + val byteArray = ByteArray(2) + byteBuffer.get(byteArray) + return of(byteArray) + } - @JvmStatic - fun testPort(port: Int) { - // 验证端口号范围是否在0-65535之间 - if (port !in 0..65535) { - throw NetworkException("$port 不是正确的端口号") - } - } - } + @JvmStatic + fun testPort(port: Int) { + // 验证端口号范围是否在0-65535之间 + if (port !in 0..65535) { + throw NetworkException("$port 不是正确的端口号") + } + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/objects/BooleanUtils.kt b/src/main/kotlin/com/mingliqiye/utils/objects/BooleanUtils.kt index fa223fd..c59d9c9 100644 --- a/src/main/kotlin/com/mingliqiye/utils/objects/BooleanUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/objects/BooleanUtils.kt @@ -24,17 +24,17 @@ package com.mingliqiye.utils.objects class BooleanIfFunction(private val boolean: Boolean) { - fun elses(function: () -> Unit): Boolean { - if (boolean) { - function() - } - return !boolean - } + fun elses(function: () -> Unit): Boolean { + if (boolean) { + function() + } + return !boolean + } } inline fun Boolean.ifs(function: () -> Unit): BooleanIfFunction { - return if (this) { - function() - BooleanIfFunction(false) - } else BooleanIfFunction(true) + return if (this) { + function() + BooleanIfFunction(false) + } else BooleanIfFunction(true) } diff --git a/src/main/kotlin/com/mingliqiye/utils/objects/NullUtils.kt b/src/main/kotlin/com/mingliqiye/utils/objects/NullUtils.kt index b367040..69694b5 100644 --- a/src/main/kotlin/com/mingliqiye/utils/objects/NullUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/objects/NullUtils.kt @@ -28,26 +28,26 @@ import kotlin.contracts.contract @OptIn(ExperimentalContracts::class) fun Any?.isNotNull(): Boolean { - contract { - returns(true) implies (this@isNotNull != null) - } - return !isNull() + contract { + returns(true) implies (this@isNotNull != null) + } + return !isNull() } @OptIn(ExperimentalContracts::class) fun Any?.isNull(): Boolean { - contract { - returns(false) implies (this@isNull != null) - } - return this == null + contract { + returns(false) implies (this@isNull != null) + } + return this == null } fun areEquals(a: Any?, b: Any?) = (a == null && b == null) || (a == b) @OptIn(ExperimentalContracts::class) fun areEqualsNoNull(a: Any?, b: Any?): Boolean { - contract { - returns(true) implies (a != null && b != null) - } - return a != null && b != null && a == b + contract { + returns(true) implies (a != null && b != null) + } + return a != null && b != null && a == b } diff --git a/src/main/kotlin/com/mingliqiye/utils/path/OsPath.kt b/src/main/kotlin/com/mingliqiye/utils/path/OsPath.kt index 8a731fc..b46c490 100644 --- a/src/main/kotlin/com/mingliqiye/utils/path/OsPath.kt +++ b/src/main/kotlin/com/mingliqiye/utils/path/OsPath.kt @@ -31,73 +31,73 @@ import java.util.* import java.util.function.Consumer class OsPath private constructor(private val path: Path) : Path by path { - override fun forEach(action: Consumer?) { - path.forEach(action) - } + override fun forEach(action: Consumer?) { + path.forEach(action) + } - override fun spliterator(): Spliterator { - return path.spliterator() - } + override fun spliterator(): Spliterator { + return path.spliterator() + } - override fun startsWith(other: String): Boolean { - return path.startsWith(other) - } + override fun startsWith(other: String): Boolean { + return path.startsWith(other) + } - override fun endsWith(other: String): Boolean { - return path.endsWith(other) - } + override fun endsWith(other: String): Boolean { + return path.endsWith(other) + } - override fun resolve(other: String): Path { - return path.resolve(other) - } + override fun resolve(other: String): Path { + return path.resolve(other) + } - override fun resolveSibling(other: Path): Path { - return path.resolveSibling(other) - } + override fun resolveSibling(other: Path): Path { + return path.resolveSibling(other) + } - override fun resolveSibling(other: String): Path { - return path.resolveSibling(other) - } + override fun resolveSibling(other: String): Path { + return path.resolveSibling(other) + } - override fun toFile(): File { - return path.toFile() - } + override fun toFile(): File { + return path.toFile() + } - override fun register( - watcher: WatchService, - vararg events: WatchEvent.Kind<*>, - ): WatchKey { - return path.register(watcher, *events) - } + override fun register( + watcher: WatchService, + vararg events: WatchEvent.Kind<*>, + ): WatchKey { + return path.register(watcher, *events) + } - override fun iterator(): MutableIterator { - return path.iterator() - } + override fun iterator(): MutableIterator { + return path.iterator() + } - companion object { - @JvmStatic - fun of(path: String): OsPath { - return of(Paths.get(path)) - } + companion object { + @JvmStatic + fun of(path: String): OsPath { + return of(Paths.get(path)) + } - @JvmStatic - fun of(path: Path): OsPath { - return OsPath(path) - } + @JvmStatic + fun of(path: Path): OsPath { + return OsPath(path) + } - @JvmStatic - fun of(uri: URI): OsPath { - return OsPath(Paths.get(uri)) - } + @JvmStatic + fun of(uri: URI): OsPath { + return OsPath(Paths.get(uri)) + } - @JvmStatic - fun of(file: File): OsPath { - return OsPath(file.toPath()) - } + @JvmStatic + fun of(file: File): OsPath { + return OsPath(file.toPath()) + } - @JvmStatic - fun getCwd(): OsPath { - return OsPath(Paths.get("")) - } - } + @JvmStatic + fun getCwd(): OsPath { + return OsPath(Paths.get("")) + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/pool/ObjectPool.kt b/src/main/kotlin/com/mingliqiye/utils/pool/ObjectPool.kt index 8703f2f..357d953 100644 --- a/src/main/kotlin/com/mingliqiye/utils/pool/ObjectPool.kt +++ b/src/main/kotlin/com/mingliqiye/utils/pool/ObjectPool.kt @@ -42,165 +42,165 @@ import kotlin.concurrent.withLock * @property initialSize 初始化时预热的对象数量,必须 >= [minSize] 且 <= [maxSize] */ abstract class ObjectPool( - private val maxSize: Int = Int.MAX_VALUE, - private val minSize: Int = 0, - private val initialSize: Int = 1, + private val maxSize: Int = Int.MAX_VALUE, + private val minSize: Int = 0, + private val initialSize: Int = 1, ) : Pool { - /** - * 已创建(含空闲与借出)对象的总数,用于容量控制。 - * 所有读写均在 [lock] 内完成,保证与 [borrowedCount]、[pool] 一致。 - */ - private var createdCount: Int = 0 + /** + * 已创建(含空闲与借出)对象的总数,用于容量控制。 + * 所有读写均在 [lock] 内完成,保证与 [borrowedCount]、[pool] 一致。 + */ + private var createdCount: Int = 0 - /** 当前已借出、尚未归还的对象数量([lock] 保护) */ - private var borrowedCount: Int = 0 + /** 当前已借出、尚未归还的对象数量([lock] 保护) */ + private var borrowedCount: Int = 0 - /** - * 空闲对象队列。全部访问均在 [lock] 内完成, - * 因此 [ArrayDeque.size] 即为精确空闲数。 - */ - private val pool = ArrayDeque>() + /** + * 空闲对象队列。全部访问均在 [lock] 内完成, + * 因此 [ArrayDeque.size] 即为精确空闲数。 + */ + private val pool = ArrayDeque>() - /** 池是否已关闭 */ - private val isClosed = AtomicBoolean(false) + /** 池是否已关闭 */ + private val isClosed = AtomicBoolean(false) - private val lock = ReentrantLock() - private val notEmpty: Condition = lock.newCondition() - private val notFull: Condition = lock.newCondition() + private val lock = ReentrantLock() + private val notEmpty: Condition = lock.newCondition() + private val notFull: Condition = lock.newCondition() - init { - require(maxSize >= minSize) - require(initialSize >= minSize) - require(initialSize <= maxSize) - require(maxSize > 0) - repeat(initialSize) { - pool.addLast(init(createdCount++)) - } - } + init { + require(maxSize >= minSize) + require(initialSize >= minSize) + require(initialSize <= maxSize) + require(maxSize > 0) + repeat(initialSize) { + pool.addLast(init(createdCount++)) + } + } - /** - * 关闭对象池:销毁所有空闲对象,唤醒所有等待者。 - * 已借出的对象在归还时会被直接销毁。 - */ - override fun close() { - lock.withLock { - if (!isClosed.compareAndSet(false, true)) { - return - } - while (pool.isNotEmpty()) { - val data = pool.removeFirst() - runCatching { destroy(data) } - createdCount-- - } - notEmpty.signalAll() - notFull.signalAll() - } - } + /** + * 关闭对象池:销毁所有空闲对象,唤醒所有等待者。 + * 已借出的对象在归还时会被直接销毁。 + */ + override fun close() { + lock.withLock { + if (!isClosed.compareAndSet(false, true)) { + return + } + while (pool.isNotEmpty()) { + val data = pool.removeFirst() + runCatching { destroy(data) } + createdCount-- + } + notEmpty.signalAll() + notFull.signalAll() + } + } - /** - * 从池中借出一个对象。 - * - * 若池中有空闲对象则直接返回;否则在未达 [maxSize] 时新建; - * 达到上限时根据 [timeoutMillis] 阻塞等待归还,超时抛出 [IllegalStateException]。 - * - * @param timeoutMillis 等待超时(毫秒)。<= 0 表示无限等待。 - */ - override fun borrow(timeoutMillis: Long): ObjectPoolData { - lock.withLock { - var remainingNanos = if (timeoutMillis > 0) TimeUnit.MILLISECONDS.toNanos(timeoutMillis) else -1L + /** + * 从池中借出一个对象。 + * + * 若池中有空闲对象则直接返回;否则在未达 [maxSize] 时新建; + * 达到上限时根据 [timeoutMillis] 阻塞等待归还,超时抛出 [IllegalStateException]。 + * + * @param timeoutMillis 等待超时(毫秒)。<= 0 表示无限等待。 + */ + override fun borrow(timeoutMillis: Long): ObjectPoolData { + lock.withLock { + var remainingNanos = if (timeoutMillis > 0) TimeUnit.MILLISECONDS.toNanos(timeoutMillis) else -1L - while (true) { - if (isClosed.get()) { - throw IllegalStateException("Object pool closed") - } + while (true) { + if (isClosed.get()) { + throw IllegalStateException("Object pool closed") + } - // 1. 优先取空闲对象 - if (pool.isNotEmpty()) { - val data = pool.removeFirst() - borrowedCount++ - return data - } + // 1. 优先取空闲对象 + if (pool.isNotEmpty()) { + val data = pool.removeFirst() + borrowedCount++ + return data + } - // 2. 池未满则创建新对象 - if (createdCount < maxSize) { - val id = createdCount++ - val data = try { - init(id) - } catch (e: Throwable) { - createdCount-- - throw e - } - borrowedCount++ - return data - } + // 2. 池未满则创建新对象 + if (createdCount < maxSize) { + val id = createdCount++ + val data = try { + init(id) + } catch (e: Throwable) { + createdCount-- + throw e + } + borrowedCount++ + return data + } - // 3. 池已满且无空闲,等待归还 - if (remainingNanos < 0) { - notEmpty.await() - } else if (remainingNanos == 0L) { - throw IllegalStateException("Timeout waiting for object from pool") - } else { - remainingNanos = notEmpty.awaitNanos(remainingNanos) - if (remainingNanos <= 0L) { - throw IllegalStateException("Timeout waiting for object from pool") - } - } - } - } - } + // 3. 池已满且无空闲,等待归还 + if (remainingNanos < 0) { + notEmpty.await() + } else if (remainingNanos == 0L) { + throw IllegalStateException("Timeout waiting for object from pool") + } else { + remainingNanos = notEmpty.awaitNanos(remainingNanos) + if (remainingNanos <= 0L) { + throw IllegalStateException("Timeout waiting for object from pool") + } + } + } + } + } - /** - * 归还对象到池中。 - * 若池已关闭或对象不属于当前池,则直接销毁;否则回填到空闲队列并唤醒等待者。 - */ - override fun returnObject(obj: ObjectPoolData) { - lock.withLock { - borrowedCount-- + /** + * 归还对象到池中。 + * 若池已关闭或对象不属于当前池,则直接销毁;否则回填到空闲队列并唤醒等待者。 + */ + override fun returnObject(obj: ObjectPoolData) { + lock.withLock { + borrowedCount-- - if (isClosed.get() || obj.objectPool !== this) { - runCatching { destroy(obj) } - createdCount-- - notFull.signal() - return - } + if (isClosed.get() || obj.objectPool !== this) { + runCatching { destroy(obj) } + createdCount-- + notFull.signal() + return + } - pool.addLast(obj) - notEmpty.signal() - } - } + pool.addLast(obj) + notEmpty.signal() + } + } - /** - * 当前空闲对象数量(精确值)。 - * 通过短暂持锁读取,与 [activeSize]/[totalSize] 各自独立但均为调用瞬间的真实值。 - */ - fun idleSize(): Int = lock.withLock { pool.size } + /** + * 当前空闲对象数量(精确值)。 + * 通过短暂持锁读取,与 [activeSize]/[totalSize] 各自独立但均为调用瞬间的真实值。 + */ + fun idleSize(): Int = lock.withLock { pool.size } - /** 当前已借出、尚未归还的对象数量(精确值) */ - fun activeSize(): Int = lock.withLock { borrowedCount } + /** 当前已借出、尚未归还的对象数量(精确值) */ + fun activeSize(): Int = lock.withLock { borrowedCount } - /** 已创建对象总数,含空闲与借出(精确值) */ - fun totalSize(): Int = lock.withLock { createdCount } + /** 已创建对象总数,含空闲与借出(精确值) */ + fun totalSize(): Int = lock.withLock { createdCount } - /** 池是否已关闭 */ - fun closed(): Boolean = isClosed.get() + /** 池是否已关闭 */ + fun closed(): Boolean = isClosed.get() - /** - * 一次性读取空闲 / 借出 / 总数 的一致快照(同一把锁内)。 - * - * 相比分别调用三个方法,可避免三者之间因并发导致的不自洽 - * (例如 `idle + active != total`)。 - */ - fun snapshot(): PoolSnapshot = lock.withLock { - PoolSnapshot(idle = pool.size, active = borrowedCount, total = createdCount, closed = isClosed.get()) - } + /** + * 一次性读取空闲 / 借出 / 总数 的一致快照(同一把锁内)。 + * + * 相比分别调用三个方法,可避免三者之间因并发导致的不自洽 + * (例如 `idle + active != total`)。 + */ + fun snapshot(): PoolSnapshot = lock.withLock { + PoolSnapshot(idle = pool.size, active = borrowedCount, total = createdCount, closed = isClosed.get()) + } - /** - * 池状态快照。 - * @property idle 空闲对象数 - * @property active 已借出对象数 - * @property total 已创建对象总数(= idle + active) - * @property closed 池是否已关闭 - */ - data class PoolSnapshot(val idle: Int, val active: Int, val total: Int, val closed: Boolean) + /** + * 池状态快照。 + * @property idle 空闲对象数 + * @property active 已借出对象数 + * @property total 已创建对象总数(= idle + active) + * @property closed 池是否已关闭 + */ + data class PoolSnapshot(val idle: Int, val active: Int, val total: Int, val closed: Boolean) } diff --git a/src/main/kotlin/com/mingliqiye/utils/pool/ObjectPoolData.kt b/src/main/kotlin/com/mingliqiye/utils/pool/ObjectPoolData.kt index 90fd1a1..ce0e0c3 100644 --- a/src/main/kotlin/com/mingliqiye/utils/pool/ObjectPoolData.kt +++ b/src/main/kotlin/com/mingliqiye/utils/pool/ObjectPoolData.kt @@ -31,11 +31,11 @@ package com.mingliqiye.utils.pool * @property name 可选的名称,用于日志/调试 */ data class ObjectPoolData( - val obj: T, - val objectPool: ObjectPool, - val id: Int = obj.hashCode(), - val name: String = "", + val obj: T, + val objectPool: ObjectPool, + val id: Int = obj.hashCode(), + val name: String = "", ) { - /** 语法糖:归还到所属池 */ - fun release() = objectPool.returnObject(this) + /** 语法糖:归还到所属池 */ + fun release() = objectPool.returnObject(this) } diff --git a/src/main/kotlin/com/mingliqiye/utils/pool/Pool.kt b/src/main/kotlin/com/mingliqiye/utils/pool/Pool.kt index a6ae6c0..650792f 100644 --- a/src/main/kotlin/com/mingliqiye/utils/pool/Pool.kt +++ b/src/main/kotlin/com/mingliqiye/utils/pool/Pool.kt @@ -26,48 +26,48 @@ package com.mingliqiye.utils.pool * 对象池通用接口。 */ interface Pool { - /** 关闭池并释放全部资源 */ - fun close() + /** 关闭池并释放全部资源 */ + fun close() - /** 借出一个对象,[timeoutMillis] <= 0 表示无限等待 */ - fun borrow(timeoutMillis: Long): ObjectPoolData + /** 借出一个对象,[timeoutMillis] <= 0 表示无限等待 */ + fun borrow(timeoutMillis: Long): ObjectPoolData - /** 无限等待地借出一个对象 */ - fun borrow(): ObjectPoolData = borrow(0) + /** 无限等待地借出一个对象 */ + fun borrow(): ObjectPoolData = borrow(0) - /** 归还对象 */ - fun returnObject(obj: ObjectPoolData) + /** 归还对象 */ + fun returnObject(obj: ObjectPoolData) - /** 使用默认超时执行 [funs] */ - fun use(funs: (ObjectPoolData) -> Unit) = use(0, funs) + /** 使用默认超时执行 [funs] */ + fun use(funs: (ObjectPoolData) -> Unit) = use(0, funs) - /** 创建一个新的池对象 */ - fun init(id: Int): ObjectPoolData + /** 创建一个新的池对象 */ + fun init(id: Int): ObjectPoolData - /** 销毁池对象 */ - fun destroy(data: ObjectPoolData) + /** 销毁池对象 */ + fun destroy(data: ObjectPoolData) - /** - * 借出对象执行 [funs],无论是否抛出异常都会自动归还。 - */ - fun use(timeoutMillis: Long, funs: (ObjectPoolData) -> Unit) { - val data = borrow(timeoutMillis) - try { - funs(data) - } finally { - runCatching { returnObject(data) } - } - } + /** + * 借出对象执行 [funs],无论是否抛出异常都会自动归还。 + */ + fun use(timeoutMillis: Long, funs: (ObjectPoolData) -> Unit) { + val data = borrow(timeoutMillis) + try { + funs(data) + } finally { + runCatching { returnObject(data) } + } + } - /** - * 借出对象执行 [funs] 并返回其结果,无论是否抛出异常都会自动归还。 - */ - fun useResult(timeoutMillis: Long = 0, funs: (ObjectPoolData) -> R): R { - val data = borrow(timeoutMillis) - try { - return funs(data) - } finally { - runCatching { returnObject(data) } - } - } + /** + * 借出对象执行 [funs] 并返回其结果,无论是否抛出异常都会自动归还。 + */ + fun useResult(timeoutMillis: Long = 0, funs: (ObjectPoolData) -> R): R { + val data = borrow(timeoutMillis) + try { + return funs(data) + } finally { + runCatching { returnObject(data) } + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/random/Random.kt b/src/main/kotlin/com/mingliqiye/utils/random/Random.kt index 5462b93..7b09436 100644 --- a/src/main/kotlin/com/mingliqiye/utils/random/Random.kt +++ b/src/main/kotlin/com/mingliqiye/utils/random/Random.kt @@ -32,277 +32,277 @@ import kotlin.random.nextLong * 使用SecureRandom确保密码学安全,同时提供便捷的随机数生成接口 */ object Random { - /** - * 安全随机数生成器 - 使用系统强随机算法 - * 通过lazy委托延迟初始化,提高性能 - */ - private val secureRandom: SecureRandom by lazy { - SecureRandom.getInstanceStrong() - } + /** + * 安全随机数生成器 - 使用系统强随机算法 + * 通过lazy委托延迟初始化,提高性能 + */ + private val secureRandom: SecureRandom by lazy { + SecureRandom.getInstanceStrong() + } - /** - * 标准随机数生成器 - Kotlin标准库提供的随机数生成器 - * 通过lazy委托延迟初始化 - */ - private val random: Random by lazy { - Random.Default - } + /** + * 标准随机数生成器 - Kotlin标准库提供的随机数生成器 + * 通过lazy委托延迟初始化 + */ + private val random: Random by lazy { + Random.Default + } - /** - * 生成指定长度的随机字节数组 - * @param size 要生成的字节数组长度 - * @return 包含随机字节的ByteArray - */ - @JvmStatic - fun nextBytes(size: Int): ByteArray = ByteArray(size).also { secureRandom.nextBytes(it) } + /** + * 生成指定长度的随机字节数组 + * @param size 要生成的字节数组长度 + * @return 包含随机字节的ByteArray + */ + @JvmStatic + fun nextBytes(size: Int): ByteArray = ByteArray(size).also { secureRandom.nextBytes(it) } - /** - * 生成单个随机字节 - * @return 随机字节值(0-255) - */ - @JvmStatic - fun nextByte(): Byte = nextInt(0, 256).toByte() + /** + * 生成单个随机字节 + * @return 随机字节值(0-255) + */ + @JvmStatic + fun nextByte(): Byte = nextInt(0, 256).toByte() - /** - * 生成无符号随机字节 - * @return 无符号随机字节值(0-255) - */ - @JvmStatic - fun nextUByte(): UByte = nextInt(0, 256).toUByte() + /** + * 生成无符号随机字节 + * @return 无符号随机字节值(0-255) + */ + @JvmStatic + fun nextUByte(): UByte = nextInt(0, 256).toUByte() - /** - * 生成小于指定最大值的随机字节 - * @param max 最大值(包含) - * @return 在Byte.MIN_VALUE到max范围内的随机字节 - */ - @JvmStatic - fun nextByte(max: Byte): Byte = nextInt(Byte.MIN_VALUE.toInt(), max.toInt()).toByte() + /** + * 生成小于指定最大值的随机字节 + * @param max 最大值(包含) + * @return 在Byte.MIN_VALUE到max范围内的随机字节 + */ + @JvmStatic + fun nextByte(max: Byte): Byte = nextInt(Byte.MIN_VALUE.toInt(), max.toInt()).toByte() - /** - * 生成指定范围内的随机字节 - * @param min 最小值(包含) - * @param max 最大值(包含) - * @return 在min到max范围内的随机字节 - */ - @JvmStatic - fun nextByte(min: Byte, max: Byte): Byte = nextInt(min.toInt(), max.toInt() + 1).toByte() + /** + * 生成指定范围内的随机字节 + * @param min 最小值(包含) + * @param max 最大值(包含) + * @return 在min到max范围内的随机字节 + */ + @JvmStatic + fun nextByte(min: Byte, max: Byte): Byte = nextInt(min.toInt(), max.toInt() + 1).toByte() - /** - * 生成指定范围内的无符号随机字节 - * @param min 最小值(包含) - * @param max 最大值(包含) - * @return 在min到max范围内的无符号随机字节 - */ - @JvmStatic - fun nextByte(min: UByte, max: UByte): UByte = nextInt(min.toInt(), max.toInt() + 1).toUByte() + /** + * 生成指定范围内的无符号随机字节 + * @param min 最小值(包含) + * @param max 最大值(包含) + * @return 在min到max范围内的无符号随机字节 + */ + @JvmStatic + fun nextByte(min: UByte, max: UByte): UByte = nextInt(min.toInt(), max.toInt() + 1).toUByte() - /** - * 生成指定IntRange范围内的随机字节 - * @param range 指定的整数范围 - * @return 在范围内转换为字节的随机值 - */ - @JvmStatic - fun nextByte(range: IntRange): Byte = nextByte(range.first.toByte(), range.last.toByte()) + /** + * 生成指定IntRange范围内的随机字节 + * @param range 指定的整数范围 + * @return 在范围内转换为字节的随机值 + */ + @JvmStatic + fun nextByte(range: IntRange): Byte = nextByte(range.first.toByte(), range.last.toByte()) - /** - * 生成指定UIntRange范围内的无符号随机字节 - * @param range 指定的无符号整数范围 - * @return 在范围内转换为无符号字节的随机值 - */ - @JvmStatic - fun nextByte(range: UIntRange): UByte = nextByte(range.first.toUByte(), range.last.toUByte()) + /** + * 生成指定UIntRange范围内的无符号随机字节 + * @param range 指定的无符号整数范围 + * @return 在范围内转换为无符号字节的随机值 + */ + @JvmStatic + fun nextByte(range: UIntRange): UByte = nextByte(range.first.toUByte(), range.last.toUByte()) - /** - * 生成随机整数 - * @return 随机整数值 - */ - @JvmStatic - fun nextInt(): Int = secureRandom.nextInt() + /** + * 生成随机整数 + * @return 随机整数值 + */ + @JvmStatic + fun nextInt(): Int = secureRandom.nextInt() - /** - * 生成小于指定最大值的随机整数 - * @param max 最大值(不包含) - * @return 0到max-1范围内的随机整数 - */ - @JvmStatic - fun nextInt(max: Int): Int = secureRandom.nextInt(max) + /** + * 生成小于指定最大值的随机整数 + * @param max 最大值(不包含) + * @return 0到max-1范围内的随机整数 + */ + @JvmStatic + fun nextInt(max: Int): Int = secureRandom.nextInt(max) - /** - * 生成指定范围内的随机整数 - * @param min 最小值(包含) - * @param max 最大值(包含) - * @return 在min到max范围内的随机整数 - */ - @JvmStatic - fun nextInt(min: Int, max: Int): Int = random.nextInt(min..max) + /** + * 生成指定范围内的随机整数 + * @param min 最小值(包含) + * @param max 最大值(包含) + * @return 在min到max范围内的随机整数 + */ + @JvmStatic + fun nextInt(min: Int, max: Int): Int = random.nextInt(min..max) - /** - * 生成指定IntRange范围内的随机整数 - * @param range 指定的整数范围 - * @return 在范围内的随机整数 - */ - @JvmStatic - fun nextInt(range: IntRange): Int = random.nextInt(range) + /** + * 生成指定IntRange范围内的随机整数 + * @param range 指定的整数范围 + * @return 在范围内的随机整数 + */ + @JvmStatic + fun nextInt(range: IntRange): Int = random.nextInt(range) - /** - * 生成随机短整数 - * @return 在Short范围内的随机短整数 - */ - @JvmStatic - fun nextShort(): Short = secureRandom.nextInt(Short.MIN_VALUE.toInt(), Short.MAX_VALUE.toInt()).toShort() + /** + * 生成随机短整数 + * @return 在Short范围内的随机短整数 + */ + @JvmStatic + fun nextShort(): Short = secureRandom.nextInt(Short.MIN_VALUE.toInt(), Short.MAX_VALUE.toInt()).toShort() - /** - * 生成小于指定最大值的随机短整数 - * @param max 最大值(包含) - * @return 在Short.MIN_VALUE到max范围内的随机短整数 - */ - @JvmStatic - fun nextShort(max: Short): Short = secureRandom.nextInt(Short.MIN_VALUE.toInt(), max.toInt()).toShort() + /** + * 生成小于指定最大值的随机短整数 + * @param max 最大值(包含) + * @return 在Short.MIN_VALUE到max范围内的随机短整数 + */ + @JvmStatic + fun nextShort(max: Short): Short = secureRandom.nextInt(Short.MIN_VALUE.toInt(), max.toInt()).toShort() - /** - * 生成指定范围内的随机短整数 - * @param min 最小值(包含) - * @param max 最大值(包含) - * @return 在min到max范围内的随机短整数 - */ - @JvmStatic - fun nextShort(min: Short, max: Short): Short = secureRandom.nextInt(min.toInt(), max.toInt()).toShort() + /** + * 生成指定范围内的随机短整数 + * @param min 最小值(包含) + * @param max 最大值(包含) + * @return 在min到max范围内的随机短整数 + */ + @JvmStatic + fun nextShort(min: Short, max: Short): Short = secureRandom.nextInt(min.toInt(), max.toInt()).toShort() - /** - * 生成指定IntRange范围内的随机短整数 - * @param range 指定的整数范围 - * @return 在范围内转换为短整数的随机值 - */ - @JvmStatic - fun nextShort(range: IntRange): Short = secureRandom.nextInt(range.first, range.last).toShort() + /** + * 生成指定IntRange范围内的随机短整数 + * @param range 指定的整数范围 + * @return 在范围内转换为短整数的随机值 + */ + @JvmStatic + fun nextShort(range: IntRange): Short = secureRandom.nextInt(range.first, range.last).toShort() - /** - * 生成随机长整数 - * @return 随机长整数值 - */ - @JvmStatic - fun nextLong(): Long = secureRandom.nextLong() + /** + * 生成随机长整数 + * @return 随机长整数值 + */ + @JvmStatic + fun nextLong(): Long = secureRandom.nextLong() - /** - * 生成小于指定最大值的随机长整数 - * @param max 最大值(不包含) - * @return 0到max-1范围内的随机长整数 - */ - @JvmStatic - fun nextLong(max: Long): Long = secureRandom.nextLong(max) + /** + * 生成小于指定最大值的随机长整数 + * @param max 最大值(不包含) + * @return 0到max-1范围内的随机长整数 + */ + @JvmStatic + fun nextLong(max: Long): Long = secureRandom.nextLong(max) - /** - * 生成指定范围内的随机长整数 - * @param min 最小值(包含) - * @param max 最大值(包含) - * @return 在min到max范围内的随机长整数 - */ - @JvmStatic - fun nextLong(min: Long, max: Long): Long = random.nextLong(min..max) + /** + * 生成指定范围内的随机长整数 + * @param min 最小值(包含) + * @param max 最大值(包含) + * @return 在min到max范围内的随机长整数 + */ + @JvmStatic + fun nextLong(min: Long, max: Long): Long = random.nextLong(min..max) - /** - * 生成指定LongRange范围内的随机长整数 - * @param range 指定的长整数范围 - * @return 在范围内的随机长整数 - */ - @JvmStatic - fun nextLong(range: LongRange): Long = random.nextLong(range) + /** + * 生成指定LongRange范围内的随机长整数 + * @param range 指定的长整数范围 + * @return 在范围内的随机长整数 + */ + @JvmStatic + fun nextLong(range: LongRange): Long = random.nextLong(range) - /** - * 生成随机布尔值 - * @return 随机true或false - */ - @JvmStatic - fun nextBoolean(): Boolean = secureRandom.nextBoolean() + /** + * 生成随机布尔值 + * @return 随机true或false + */ + @JvmStatic + fun nextBoolean(): Boolean = secureRandom.nextBoolean() - /** - * String类型的扩展函数 - 从字符串中随机选择字符生成指定长度的新字符串 - * @param length 要生成的字符串长度 - * @return 由原字符串中随机字符组成的新字符串 - */ - @JvmStatic - fun String.randomString(length: Int): String = String(CharArray(length) { - this[nextInt(indices)] - }) + /** + * String类型的扩展函数 - 从字符串中随机选择字符生成指定长度的新字符串 + * @param length 要生成的字符串长度 + * @return 由原字符串中随机字符组成的新字符串 + */ + @JvmStatic + fun String.randomString(length: Int): String = String(CharArray(length) { + this[nextInt(indices)] + }) - /** - * 生成包含数字和字母的随机字符串 - * @param length 要生成的字符串长度 - * @return 包含0-9、a-z、A-Z字符的随机字符串 - */ - @JvmStatic - fun randomString(length: Int): String = - "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".randomString(length) + /** + * 生成包含数字和字母的随机字符串 + * @param length 要生成的字符串长度 + * @return 包含0-9、a-z、A-Z字符的随机字符串 + */ + @JvmStatic + fun randomString(length: Int): String = + "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".randomString(length) - /** - * Array类型的扩展函数 - 从数组中随机选择一个元素 - * @param T 数组元素类型 - * @return 数组中的随机元素 - */ - @JvmStatic - fun Array.randomItem(): T = this[nextInt(indices)] + /** + * Array类型的扩展函数 - 从数组中随机选择一个元素 + * @param T 数组元素类型 + * @return 数组中的随机元素 + */ + @JvmStatic + fun Array.randomItem(): T = this[nextInt(indices)] - /** - * ByteArray类型的扩展函数 - 从字节数组中随机选择一个元素 - * @return 字节数组中的随机字节 - */ - @JvmStatic - fun ByteArray.randomItem(): Byte = this[nextInt(indices)] + /** + * ByteArray类型的扩展函数 - 从字节数组中随机选择一个元素 + * @return 字节数组中的随机字节 + */ + @JvmStatic + fun ByteArray.randomItem(): Byte = this[nextInt(indices)] - /** - * IntArray类型的扩展函数 - 从整数数组中随机选择一个元素 - * @return 整数数组中的随机整数 - */ - @JvmStatic - fun IntArray.randomItem(): Int = this[nextInt(indices)] + /** + * IntArray类型的扩展函数 - 从整数数组中随机选择一个元素 + * @return 整数数组中的随机整数 + */ + @JvmStatic + fun IntArray.randomItem(): Int = this[nextInt(indices)] - /** - * LongArray类型的扩展函数 - 从长整数数组中随机选择一个元素 - * @return 长整数数组中的随机长整数 - */ - @JvmStatic - fun LongArray.randomItem(): Long = this[nextInt(indices)] + /** + * LongArray类型的扩展函数 - 从长整数数组中随机选择一个元素 + * @return 长整数数组中的随机长整数 + */ + @JvmStatic + fun LongArray.randomItem(): Long = this[nextInt(indices)] - /** - * FloatArray类型的扩展函数 - 从浮点数数组中随机选择一个元素 - * @return 浮点数数组中的随机浮点数 - */ - @JvmStatic - fun FloatArray.randomItem(): Float = this[nextInt(indices)] + /** + * FloatArray类型的扩展函数 - 从浮点数数组中随机选择一个元素 + * @return 浮点数数组中的随机浮点数 + */ + @JvmStatic + fun FloatArray.randomItem(): Float = this[nextInt(indices)] - /** - * DoubleArray类型的扩展函数 - 从双精度浮点数数组中随机选择一个元素 - * @return 双精度浮点数数组中的随机双精度浮点数 - */ - @JvmStatic - fun DoubleArray.randomItem(): Double = this[nextInt(indices)] + /** + * DoubleArray类型的扩展函数 - 从双精度浮点数数组中随机选择一个元素 + * @return 双精度浮点数数组中的随机双精度浮点数 + */ + @JvmStatic + fun DoubleArray.randomItem(): Double = this[nextInt(indices)] - /** - * BooleanArray类型的扩展函数 - 从布尔数组中随机选择一个元素 - * @return 布尔数组中的随机布尔值 - */ - @JvmStatic - fun BooleanArray.randomItem(): Boolean = this[nextInt(indices)] + /** + * BooleanArray类型的扩展函数 - 从布尔数组中随机选择一个元素 + * @return 布尔数组中的随机布尔值 + */ + @JvmStatic + fun BooleanArray.randomItem(): Boolean = this[nextInt(indices)] - /** - * CharArray类型的扩展函数 - 从字符数组中随机选择一个元素 - * @return 字符数组中的随机字符 - */ - @JvmStatic - fun CharArray.randomItem(): Char = this[nextInt(indices)] + /** + * CharArray类型的扩展函数 - 从字符数组中随机选择一个元素 + * @return 字符数组中的随机字符 + */ + @JvmStatic + fun CharArray.randomItem(): Char = this[nextInt(indices)] - /** - * ShortArray类型的扩展函数 - 从短整数数组中随机选择一个元素 - * @return 短整数数组中的随机短整数 - */ - @JvmStatic - fun ShortArray.randomItem(): Short = this[nextInt(indices)] + /** + * ShortArray类型的扩展函数 - 从短整数数组中随机选择一个元素 + * @return 短整数数组中的随机短整数 + */ + @JvmStatic + fun ShortArray.randomItem(): Short = this[nextInt(indices)] - /** - * Collection类型的扩展函数 - 从集合中随机选择一个元素 - * @param T 集合元素类型 - * @return 集合中的随机元素 - */ - @JvmStatic - fun Collection.randomItem(): T = this.elementAt(nextInt(indices)) + /** + * Collection类型的扩展函数 - 从集合中随机选择一个元素 + * @param T 集合元素类型 + * @return 集合中的随机元素 + */ + @JvmStatic + fun Collection.randomItem(): T = this.elementAt(nextInt(indices)) } diff --git a/src/main/kotlin/com/mingliqiye/utils/reflect/ReflectUtils.kt b/src/main/kotlin/com/mingliqiye/utils/reflect/ReflectUtils.kt index 380963b..d8c7b60 100644 --- a/src/main/kotlin/com/mingliqiye/utils/reflect/ReflectUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/reflect/ReflectUtils.kt @@ -31,26 +31,26 @@ import kotlin.reflect.KProperty import kotlin.reflect.jvm.javaMethod object ReflectUtils { - private val walker: StackWalker = StackWalker.getInstance(StackWalker.Option.RETAIN_CLASS_REFERENCE) - inline fun T.ktClass(): KClass = T::class + private val walker: StackWalker = StackWalker.getInstance(StackWalker.Option.RETAIN_CLASS_REFERENCE) + inline fun T.ktClass(): KClass = T::class - var KMutableProperty.value: T - get() = this.getter.call() - set(t: T) = this.setter.call(t) + var KMutableProperty.value: T + get() = this.getter.call() + set(t: T) = this.setter.call(t) - val KProperty.javaGetter: Method - get() = this.getter.javaMethod!! + val KProperty.javaGetter: Method + get() = this.getter.javaMethod!! - val KMutableProperty.javaSetter: Method - get() = this.getter.javaMethod!! - val KFunction.java: Method - get() = this.javaMethod!! + val KMutableProperty.javaSetter: Method + get() = this.getter.javaMethod!! + val KFunction.java: Method + get() = this.javaMethod!! - fun getStackFrame(skip: Long = 0, limit: Long = 0): List { - return walker.walk { - it.skip(skip + 2).ifOr(limit == 0L) { - limit(limit) - }.toList() - } - } + fun getStackFrame(skip: Long = 0, limit: Long = 0): List { + return walker.walk { + it.skip(skip + 2).ifOr(limit == 0L) { + limit(limit) + }.toList() + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/require/RequireLayzExceptionConstructor.kt b/src/main/kotlin/com/mingliqiye/utils/require/RequireLayzExceptionConstructor.kt index 977c7c6..0fa3216 100644 --- a/src/main/kotlin/com/mingliqiye/utils/require/RequireLayzExceptionConstructor.kt +++ b/src/main/kotlin/com/mingliqiye/utils/require/RequireLayzExceptionConstructor.kt @@ -24,5 +24,5 @@ package com.mingliqiye.utils.require @FunctionalInterface fun interface RequireLayzExceptionConstructor { - fun call(): Throwable + fun call(): Throwable } diff --git a/src/main/kotlin/com/mingliqiye/utils/require/RequireLayzMessageConstructor.kt b/src/main/kotlin/com/mingliqiye/utils/require/RequireLayzMessageConstructor.kt index b19741a..3389346 100644 --- a/src/main/kotlin/com/mingliqiye/utils/require/RequireLayzMessageConstructor.kt +++ b/src/main/kotlin/com/mingliqiye/utils/require/RequireLayzMessageConstructor.kt @@ -24,5 +24,5 @@ package com.mingliqiye.utils.require @FunctionalInterface fun interface RequireLayzMessageConstructor { - fun call(): String + fun call(): String } diff --git a/src/main/kotlin/com/mingliqiye/utils/require/RequireTrue.kt b/src/main/kotlin/com/mingliqiye/utils/require/RequireTrue.kt index 11cb623..bcc90bf 100644 --- a/src/main/kotlin/com/mingliqiye/utils/require/RequireTrue.kt +++ b/src/main/kotlin/com/mingliqiye/utils/require/RequireTrue.kt @@ -30,196 +30,196 @@ const val DEFAULT_MESSAGE = "required fail" class Required(private val newException: (message: String) -> T) { - @OptIn(ExperimentalContracts::class) - fun requireTrue(value: Boolean, message: String) { - contract { - returns() implies value - } - requireTrue(value) { message } - } + @OptIn(ExperimentalContracts::class) + fun requireTrue(value: Boolean, message: String) { + contract { + returns() implies value + } + requireTrue(value) { message } + } - @OptIn(ExperimentalContracts::class) - fun requireTrue(value: Boolean) { - contract { - returns() implies value - } - requireTrue(value) { DEFAULT_MESSAGE } - } + @OptIn(ExperimentalContracts::class) + fun requireTrue(value: Boolean) { + contract { + returns() implies value + } + requireTrue(value) { DEFAULT_MESSAGE } + } - @OptIn(ExperimentalContracts::class) - fun requireTrue(value: Boolean, lazyMessage: () -> String) { - contract { - returns() implies value - } - if (!value) { - throw newException(lazyMessage()) - } - } + @OptIn(ExperimentalContracts::class) + fun requireTrue(value: Boolean, lazyMessage: () -> String) { + contract { + returns() implies value + } + if (!value) { + throw newException(lazyMessage()) + } + } } fun newRequired(clazz: Class): Required { - return Required { - newException(clazz, it) - } + return Required { + newException(clazz, it) + } } fun newRequired(): Required { - return newRequired() + return newRequired() } @JvmName("newRequiredInline") inline fun newRequired(): Required { - return newRequired(T::class.java) + return newRequired(T::class.java) } fun newException(clazz: Class, msg: String): T = try { - val constructor = clazz.getConstructor(String::class.java).also { - check(!java.lang.reflect.Modifier.isAbstract(clazz.modifiers)) { - "${clazz.name} 是抽象类,无法实例化" - } - } - constructor.newInstance(msg) + val constructor = clazz.getConstructor(String::class.java).also { + check(!java.lang.reflect.Modifier.isAbstract(clazz.modifiers)) { + "${clazz.name} 是抽象类,无法实例化" + } + } + constructor.newInstance(msg) } catch (e: ReflectiveOperationException) { - throw IllegalStateException("无法实例化 ${clazz.name}", e) + throw IllegalStateException("无法实例化 ${clazz.name}", e) } @OptIn(ExperimentalContracts::class) @JvmName("requireTrueDef") fun requireTrue(value: Boolean, clazz: Class, lazyMessage: () -> String) { - contract { - returns() implies value - } - if (!value) { - throw newException(clazz, lazyMessage()) - } + contract { + returns() implies value + } + if (!value) { + throw newException(clazz, lazyMessage()) + } } @OptIn(ExperimentalContracts::class) @JvmName("requireTrueInline") inline fun requireTrue(value: Boolean, noinline lazyMessage: () -> String) { - contract { - returns() implies value - } - requireTrue(value, T::class.java, lazyMessage) + contract { + returns() implies value + } + requireTrue(value, T::class.java, lazyMessage) } @OptIn(ExperimentalContracts::class) @JvmName("requireTrueOnBoolean") fun Boolean.requireTrue(clazz: Class, lazyMessage: () -> String) { - contract { - returns() implies this@requireTrue - } - requireTrue(this, clazz, lazyMessage) + contract { + returns() implies this@requireTrue + } + requireTrue(this, clazz, lazyMessage) } @OptIn(ExperimentalContracts::class) @JvmName("requireTrueOnBoolean") fun Boolean.requireTrue(clazz: Class, message: String) { - contract { - returns() implies this@requireTrue - } - requireTrue(this, clazz) { - message - } + contract { + returns() implies this@requireTrue + } + requireTrue(this, clazz) { + message + } } @OptIn(ExperimentalContracts::class) fun requireTrue(value: Boolean, clazz: Class, message: String) { - contract { - returns() implies value - } - requireTrue(value, clazz) { message } + contract { + returns() implies value + } + requireTrue(value, clazz) { message } } @OptIn(ExperimentalContracts::class) @JvmName("requireTrueInline") inline fun requireTrue(value: Boolean, message: String) { - contract { - returns() implies value - } - requireTrue(value, T::class.java) { message } + contract { + returns() implies value + } + requireTrue(value, T::class.java) { message } } @OptIn(ExperimentalContracts::class) @JvmName("requireTrueOnBoolean") inline fun Boolean.requireTrue(noinline lazyMessage: () -> String) { - contract { - returns() implies this@requireTrue - } - requireTrue(this, T::class.java, lazyMessage) + contract { + returns() implies this@requireTrue + } + requireTrue(this, T::class.java, lazyMessage) } @OptIn(ExperimentalContracts::class) @JvmName("requireTrueOnBoolean") inline fun Boolean.requireTrue(message: String) { - contract { - returns() implies this@requireTrue - } - requireTrue(this, T::class.java, message) + contract { + returns() implies this@requireTrue + } + requireTrue(this, T::class.java, message) } @OptIn(ExperimentalContracts::class) fun requireTrue(value: Boolean, clazz: Class) { - contract { - returns() implies value - } - requireTrue(value, clazz) { DEFAULT_MESSAGE } + contract { + returns() implies value + } + requireTrue(value, clazz) { DEFAULT_MESSAGE } } @OptIn(ExperimentalContracts::class) @JvmName("requireTrueInline") inline fun requireTrue(value: Boolean) { - contract { - returns() implies value - } - requireTrue(value, T::class.java) { DEFAULT_MESSAGE } + contract { + returns() implies value + } + requireTrue(value, T::class.java) { DEFAULT_MESSAGE } } @OptIn(ExperimentalContracts::class) fun requireTrue(value: Boolean) { - contract { - returns() implies value - } - requireTrue(value, IllegalArgumentException::class.java) { DEFAULT_MESSAGE } + contract { + returns() implies value + } + requireTrue(value, IllegalArgumentException::class.java) { DEFAULT_MESSAGE } } @OptIn(ExperimentalContracts::class) fun requireTrue(value: Boolean, message: String) { - contract { - returns() implies value - } - requireTrue(value, IllegalArgumentException::class.java) { message } + contract { + returns() implies value + } + requireTrue(value, IllegalArgumentException::class.java) { message } } @OptIn(ExperimentalContracts::class) fun requireTrue(value: Boolean, lazyMessage: () -> String) { - contract { - returns() implies value - } - requireTrue(value, IllegalArgumentException::class.java, lazyMessage) + contract { + returns() implies value + } + requireTrue(value, IllegalArgumentException::class.java, lazyMessage) } @OptIn(ExperimentalContracts::class) @JvmName("requireTrueOnBoolean") fun Boolean.requireTrue(clazz: Class) { - contract { - returns() implies this@requireTrue - } - requireTrue(this, clazz) { DEFAULT_MESSAGE } + contract { + returns() implies this@requireTrue + } + requireTrue(this, clazz) { DEFAULT_MESSAGE } } @OptIn(ExperimentalContracts::class) @JvmName("requireTrueOnBoolean") inline fun Boolean.requireTrue() { - contract { - returns() implies this@requireTrue - } - requireTrue(this, T::class.java) { DEFAULT_MESSAGE } + contract { + returns() implies this@requireTrue + } + requireTrue(this, T::class.java) { DEFAULT_MESSAGE } } diff --git a/src/main/kotlin/com/mingliqiye/utils/resource/ResourceUtils.kt b/src/main/kotlin/com/mingliqiye/utils/resource/ResourceUtils.kt index 1310586..ade6ab5 100644 --- a/src/main/kotlin/com/mingliqiye/utils/resource/ResourceUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/resource/ResourceUtils.kt @@ -27,131 +27,131 @@ import java.nio.charset.Charset object ResourceUtils { - /** - * 从类路径中读取资源文件并返回字节数组(使用 reified 类型参数) - * - * 这是一个内联扩展函数,利用 reified 关键字在编译时获取具体类型 T 的 Class 对象 - * - * @param T 用于获取 ClassLoader 的类型参数(通常传入调用方的类) - * @param path 资源文件的路径(相对于 T 所在的包,或以 / 开头的绝对路径) - * @return 资源的字节数组 - * @throws NotFoundResourceException 当资源不存在时抛出 - * - * 使用示例: - * ```kotlin - * // 在当前类的包下查找 config.json - * val data = getResourceAsByteArray("config.json") - * - * // 使用绝对路径(从 classpath 根目录) - * val data = getResourceAsByteArray("/assets/config.json") - * ``` - */ - inline fun getResourceAsByteArray(path: String): ByteArray { - // 将 reified T 的 KClass 转换为 Java 的 Class 对象,传递给重载方法 - return getResourceAsByteArray(path, T::class.java) - } + /** + * 从类路径中读取资源文件并返回字节数组(使用 reified 类型参数) + * + * 这是一个内联扩展函数,利用 reified 关键字在编译时获取具体类型 T 的 Class 对象 + * + * @param T 用于获取 ClassLoader 的类型参数(通常传入调用方的类) + * @param path 资源文件的路径(相对于 T 所在的包,或以 / 开头的绝对路径) + * @return 资源的字节数组 + * @throws NotFoundResourceException 当资源不存在时抛出 + * + * 使用示例: + * ```kotlin + * // 在当前类的包下查找 config.json + * val data = getResourceAsByteArray("config.json") + * + * // 使用绝对路径(从 classpath 根目录) + * val data = getResourceAsByteArray("/assets/config.json") + * ``` + */ + inline fun getResourceAsByteArray(path: String): ByteArray { + // 将 reified T 的 KClass 转换为 Java 的 Class 对象,传递给重载方法 + return getResourceAsByteArray(path, T::class.java) + } - /** - * 从类路径中读取资源文件并返回字符串(使用 reified 类型参数) - * - * @param T 用于获取 ClassLoader 的类型参数 - * @param resource 资源文件路径 - * @param charset 字符编码,默认为系统默认字符集 - * @return 资源文件的字符串内容 - * @throws NotFoundResourceException 当资源不存在时抛出 - * - * 使用示例: - * ```kotlin - * // 读取文本文件,使用默认编码 - * val content = getResourceAsString("data.txt") - * - * // 指定 UTF-8 编码 - * val content = getResourceAsString("data.txt", Charsets.UTF_8) - * ``` - */ - inline fun getResourceAsString( - resource: String, - charset: Charset = Charset.defaultCharset(), - ): String { - // 将 reified T 的 Class 对象传递给重载方法 - return getResourceAsString(resource, charset, T::class.java) - } + /** + * 从类路径中读取资源文件并返回字符串(使用 reified 类型参数) + * + * @param T 用于获取 ClassLoader 的类型参数 + * @param resource 资源文件路径 + * @param charset 字符编码,默认为系统默认字符集 + * @return 资源文件的字符串内容 + * @throws NotFoundResourceException 当资源不存在时抛出 + * + * 使用示例: + * ```kotlin + * // 读取文本文件,使用默认编码 + * val content = getResourceAsString("data.txt") + * + * // 指定 UTF-8 编码 + * val content = getResourceAsString("data.txt", Charsets.UTF_8) + * ``` + */ + inline fun getResourceAsString( + resource: String, + charset: Charset = Charset.defaultCharset(), + ): String { + // 将 reified T 的 Class 对象传递给重载方法 + return getResourceAsString(resource, charset, T::class.java) + } - /** - * 从类路径中读取资源文件并返回字符串(Java 友好重载版本) - * - * 此方法标记为 @JvmStatic,使其可以在 Java 代码中以静态方法形式调用 - * - * @param path 资源文件路径 - * @param charset 字符编码 - * @param clazz 用于获取 ClassLoader 的参考类 - * @return 资源文件的字符串内容 - * @throws NotFoundResourceException 当资源不存在时抛出 - * - * Java 调用示例: - * ```java - * // 在 Java 中调用 - * String content = YourClass.getResourceAsString("config.json", StandardCharsets.UTF_8, MyClass.class); - * ``` - */ - @JvmStatic - fun getResourceAsString(path: String, charset: Charset, clazz: Class<*>): String { - // 先读取为字节数组,再按指定字符集解码为字符串 - return String(getResourceAsByteArray(path, clazz), charset) - } + /** + * 从类路径中读取资源文件并返回字符串(Java 友好重载版本) + * + * 此方法标记为 @JvmStatic,使其可以在 Java 代码中以静态方法形式调用 + * + * @param path 资源文件路径 + * @param charset 字符编码 + * @param clazz 用于获取 ClassLoader 的参考类 + * @return 资源文件的字符串内容 + * @throws NotFoundResourceException 当资源不存在时抛出 + * + * Java 调用示例: + * ```java + * // 在 Java 中调用 + * String content = YourClass.getResourceAsString("config.json", StandardCharsets.UTF_8, MyClass.class); + * ``` + */ + @JvmStatic + fun getResourceAsString(path: String, charset: Charset, clazz: Class<*>): String { + // 先读取为字节数组,再按指定字符集解码为字符串 + return String(getResourceAsByteArray(path, clazz), charset) + } - /** - * 从类路径中读取资源文件并返回字符串(使用默认字符集,Java 友好重载) - * - * @param path 资源文件路径 - * @param clazz 用于获取 ClassLoader 的参考类 - * @return 资源文件的字符串内容 - * @throws NotFoundResourceException 当资源不存在时抛出 - */ - @JvmStatic - fun getResourceAsString(path: String, clazz: Class<*>): String { - // 委托给上面的方法,使用系统默认字符集 - return getResourceAsString(path, Charset.defaultCharset(), clazz) - } + /** + * 从类路径中读取资源文件并返回字符串(使用默认字符集,Java 友好重载) + * + * @param path 资源文件路径 + * @param clazz 用于获取 ClassLoader 的参考类 + * @return 资源文件的字符串内容 + * @throws NotFoundResourceException 当资源不存在时抛出 + */ + @JvmStatic + fun getResourceAsString(path: String, clazz: Class<*>): String { + // 委托给上面的方法,使用系统默认字符集 + return getResourceAsString(path, Charset.defaultCharset(), clazz) + } - /** - * 从类路径中读取资源文件并返回字节数组(核心实现方法) - * - * 这是所有方法的核心实现,负责实际的资源查找和读取工作 - * - * @param path 资源文件路径 - * - 如果以 "/" 开头:表示从 classpath 根目录查找 - * - 如果不以 "/" 开头:表示相对于 clazz 所在包的路径 - * @param clazz 参考类,用于确定相对路径的基准包 - * @return 资源的完整字节数组(使用 readAllBytes() 一次性读取) - * @throws NotFoundResourceException 当资源文件不存在时抛出,错误信息会显示完整的查找路径 - * - * 资源查找规则说明: - * 1. 如果 path = "config.properties" 且 clazz = com.example.MyClass - * 实际查找路径:/com/example/config.properties - * - * 2. 如果 path = "/config.properties" - * 实际查找路径:/config.properties(classpath 根目录) - * - * 异常消息示例: - * - 找不到文件时抛出:"/com/example/config.properties is not found" - */ - @JvmStatic - fun getResourceAsByteArray(path: String, clazz: Class<*>): ByteArray { - // 尝试从类路径中获取资源的输入流 - val stream = clazz.getResourceAsStream(path) - ?: throw NotFoundResourceException( - // 构建详细的错误信息:显示实际查找的完整路径 - // 如果 path 不以 "/" 开头,则拼接类的包路径(将包名中的点替换为斜杠) - (if (!path.startsWith("/")) - "/${clazz.packageName.replace(".", "/")}/$path" // 相对路径:相对于 clazz 的包 - else - path // 绝对路径:直接使用原路径 - ) + " is not found" // 添加 " is not found" 后缀 - ) + /** + * 从类路径中读取资源文件并返回字节数组(核心实现方法) + * + * 这是所有方法的核心实现,负责实际的资源查找和读取工作 + * + * @param path 资源文件路径 + * - 如果以 "/" 开头:表示从 classpath 根目录查找 + * - 如果不以 "/" 开头:表示相对于 clazz 所在包的路径 + * @param clazz 参考类,用于确定相对路径的基准包 + * @return 资源的完整字节数组(使用 readAllBytes() 一次性读取) + * @throws NotFoundResourceException 当资源文件不存在时抛出,错误信息会显示完整的查找路径 + * + * 资源查找规则说明: + * 1. 如果 path = "config.properties" 且 clazz = com.example.MyClass + * 实际查找路径:/com/example/config.properties + * + * 2. 如果 path = "/config.properties" + * 实际查找路径:/config.properties(classpath 根目录) + * + * 异常消息示例: + * - 找不到文件时抛出:"/com/example/config.properties is not found" + */ + @JvmStatic + fun getResourceAsByteArray(path: String, clazz: Class<*>): ByteArray { + // 尝试从类路径中获取资源的输入流 + val stream = clazz.getResourceAsStream(path) + ?: throw NotFoundResourceException( + // 构建详细的错误信息:显示实际查找的完整路径 + // 如果 path 不以 "/" 开头,则拼接类的包路径(将包名中的点替换为斜杠) + (if (!path.startsWith("/")) + "/${clazz.packageName.replace(".", "/")}/$path" // 相对路径:相对于 clazz 的包 + else + path // 绝对路径:直接使用原路径 + ) + " is not found" // 添加 " is not found" 后缀 + ) - // 读取输入流中的所有字节并返回 - // Kotlin 的扩展函数,等同于 Java 9+ 的 InputStream.readAllBytes() - return stream.readAllBytes() - } + // 读取输入流中的所有字节并返回 + // Kotlin 的扩展函数,等同于 Java 9+ 的 InputStream.readAllBytes() + return stream.readAllBytes() + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/security/AesUtils.kt b/src/main/kotlin/com/mingliqiye/utils/security/AesUtils.kt index d3b7263..3579bb0 100644 --- a/src/main/kotlin/com/mingliqiye/utils/security/AesUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/security/AesUtils.kt @@ -33,22 +33,20 @@ const val AES_GCM_NO_PADDING_IV_LENGTH = 12 const val AES_GCM_NO_PADDING_TAG_LENGTH = 16 fun encryptAesGcmNoPadding(src: ByteArray, key: ByteArray, iv: ByteArray): ByteArray { - val secretKeySpec = createSecretKeySpec(ALGORITHM, key) - val cipher = Cipher.getInstance(AES_GCM_NO_PADDING) - val gcmParameterSpec = GCMParameterSpec( - AES_GCM_NO_PADDING_TAG_LENGTH * 8, - iv - ) - cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, gcmParameterSpec) - return cipher.doFinal(src) + val secretKeySpec = createSecretKeySpec(ALGORITHM, key) + val cipher = Cipher.getInstance(AES_GCM_NO_PADDING) + val gcmParameterSpec = GCMParameterSpec( + AES_GCM_NO_PADDING_TAG_LENGTH * 8, + iv + ) + cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, gcmParameterSpec) + return cipher.doFinal(src) } fun encryptAesGcmNoPadding(src: ByteArray, key: String, iv: ByteArray): ByteArray { - return encryptAesGcmNoPadding(src, key.toByteArray(), iv) + return encryptAesGcmNoPadding(src, key.toByteArray(), iv) } fun encryptAesGcmNoPadding(src: String, key: String, iv: ByteArray): ByteArray { - return encryptAesGcmNoPadding(src.toByteArray(), key.toByteArray(), iv) + return encryptAesGcmNoPadding(src.toByteArray(), key.toByteArray(), iv) } - - diff --git a/src/main/kotlin/com/mingliqiye/utils/security/SecureUtils.kt b/src/main/kotlin/com/mingliqiye/utils/security/SecureUtils.kt index e6bc3d0..5540de2 100644 --- a/src/main/kotlin/com/mingliqiye/utils/security/SecureUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/security/SecureUtils.kt @@ -41,9 +41,9 @@ internal val SECURE_RANDOM = SecureRandom() * @return 包含随机字节的 ByteArray。 */ fun getRandomBytes(length: Int): ByteArray { - val bytes = ByteArray(length) - SECURE_RANDOM.nextBytes(bytes) - return bytes + val bytes = ByteArray(length) + SECURE_RANDOM.nextBytes(bytes) + return bytes } /** @@ -54,8 +54,8 @@ fun getRandomBytes(length: Int): ByteArray { * @return 经过哈希处理后的密钥字节数组。 */ fun createSecretKey(algorithm: String, data: ByteArray): ByteArray { - val md = MessageDigest.getInstance(algorithm) - return md.digest(data) + val md = MessageDigest.getInstance(algorithm) + return md.digest(data) } /** @@ -66,7 +66,7 @@ fun createSecretKey(algorithm: String, data: ByteArray): ByteArray { * @return 经过哈希处理后的密钥字节数组。 */ fun createSecretKey(algorithm: String, data: String): ByteArray { - return createSecretKey(algorithm, data.toByteArray()) + return createSecretKey(algorithm, data.toByteArray()) } /** @@ -77,7 +77,7 @@ fun createSecretKey(algorithm: String, data: String): ByteArray { * @return 根据输入数据和算法生成的 SecretKey 对象。 */ fun createSecretKeySpec(algorithm: String, data: String): SecretKey { - return SecretKeySpec(createSecretKey(algorithm, data), algorithm) + return SecretKeySpec(createSecretKey(algorithm, data), algorithm) } /** @@ -88,5 +88,5 @@ fun createSecretKeySpec(algorithm: String, data: String): SecretKey { * @return 根据输入数据和算法生成的 SecretKey 对象。 */ fun createSecretKeySpec(algorithm: String, data: ByteArray): SecretKey { - return SecretKeySpec(createSecretKey(algorithm, data), algorithm) + return SecretKeySpec(createSecretKey(algorithm, data), algorithm) } diff --git a/src/main/kotlin/com/mingliqiye/utils/sleep/SleepUtils.kt b/src/main/kotlin/com/mingliqiye/utils/sleep/SleepUtils.kt index c1dd433..6416e59 100644 --- a/src/main/kotlin/com/mingliqiye/utils/sleep/SleepUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/sleep/SleepUtils.kt @@ -28,52 +28,52 @@ import java.util.concurrent.TimeUnit */ object SleepUtils { - /** - * 基于 Thread.sleep 的等待,单位毫秒 - * - * @param millis 等待时间(毫秒) - * @throws RuntimeException 当线程被中断时抛出 - */ - @JvmStatic - fun sleep(millis: Long) { - try { - Thread.sleep(millis) - } catch (e: InterruptedException) { - Thread.currentThread().interrupt() - throw RuntimeException("Sleep interrupted", e) - } - } + /** + * 基于 Thread.sleep 的等待,单位毫秒 + * + * @param millis 等待时间(毫秒) + * @throws RuntimeException 当线程被中断时抛出 + */ + @JvmStatic + fun sleep(millis: Long) { + try { + Thread.sleep(millis) + } catch (e: InterruptedException) { + Thread.currentThread().interrupt() + throw RuntimeException("Sleep interrupted", e) + } + } - /** - * 基于 Thread.sleep 的等待,单位毫秒 - * - * @param millis 等待时间(毫秒) - * @throws RuntimeException 当线程被中断时抛出 - */ - @JvmStatic - fun sleep(millis: Int) { - try { - Thread.sleep(millis.toLong()) - } catch (e: InterruptedException) { - Thread.currentThread().interrupt() - throw RuntimeException("Sleep interrupted", e) - } - } + /** + * 基于 Thread.sleep 的等待,单位毫秒 + * + * @param millis 等待时间(毫秒) + * @throws RuntimeException 当线程被中断时抛出 + */ + @JvmStatic + fun sleep(millis: Int) { + try { + Thread.sleep(millis.toLong()) + } catch (e: InterruptedException) { + Thread.currentThread().interrupt() + throw RuntimeException("Sleep interrupted", e) + } + } - /** - * 基于 TimeUnit 的等待 - * - * @param timeout 等待时间 - * @param unit 时间单位 - * @throws RuntimeException 当线程被中断时抛出 - */ - @JvmStatic - fun sleep(timeout: Long, unit: TimeUnit) { - try { - unit.sleep(timeout) - } catch (e: InterruptedException) { - Thread.currentThread().interrupt() - throw RuntimeException("Sleep interrupted", e) - } - } + /** + * 基于 TimeUnit 的等待 + * + * @param timeout 等待时间 + * @param unit 时间单位 + * @throws RuntimeException 当线程被中断时抛出 + */ + @JvmStatic + fun sleep(timeout: Long, unit: TimeUnit) { + try { + unit.sleep(timeout) + } catch (e: InterruptedException) { + Thread.currentThread().interrupt() + throw RuntimeException("Sleep interrupted", e) + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/springboot/annotation/ApplicationDestroyedRunner.kt b/src/main/kotlin/com/mingliqiye/utils/springboot/annotation/ApplicationDestroyedRunner.kt index 7b90037..a774d51 100644 --- a/src/main/kotlin/com/mingliqiye/utils/springboot/annotation/ApplicationDestroyedRunner.kt +++ b/src/main/kotlin/com/mingliqiye/utils/springboot/annotation/ApplicationDestroyedRunner.kt @@ -24,5 +24,5 @@ package com.mingliqiye.utils.springboot.annotation @Target(AnnotationTarget.FUNCTION) annotation class ApplicationDestroyedRunner( - val order: Int = Int.MIN_VALUE + val order: Int = Int.MIN_VALUE, ) diff --git a/src/main/kotlin/com/mingliqiye/utils/springboot/annotation/ApplicationStartedRunner.kt b/src/main/kotlin/com/mingliqiye/utils/springboot/annotation/ApplicationStartedRunner.kt index 991a2f5..a766072 100644 --- a/src/main/kotlin/com/mingliqiye/utils/springboot/annotation/ApplicationStartedRunner.kt +++ b/src/main/kotlin/com/mingliqiye/utils/springboot/annotation/ApplicationStartedRunner.kt @@ -24,5 +24,5 @@ package com.mingliqiye.utils.springboot.annotation @Target(AnnotationTarget.FUNCTION) annotation class ApplicationStartedRunner( - val order: Int = Int.MIN_VALUE, + val order: Int = Int.MIN_VALUE, ) diff --git a/src/main/kotlin/com/mingliqiye/utils/springboot/annotation/Listener.kt b/src/main/kotlin/com/mingliqiye/utils/springboot/annotation/Listener.kt index 1d06c02..9e138fe 100644 --- a/src/main/kotlin/com/mingliqiye/utils/springboot/annotation/Listener.kt +++ b/src/main/kotlin/com/mingliqiye/utils/springboot/annotation/Listener.kt @@ -27,6 +27,6 @@ import org.springframework.stereotype.Component @Component annotation class Listener( - @get:AliasFor(annotation = Component::class) - val value: String = "" + @get:AliasFor(annotation = Component::class) + val value: String = "", ) diff --git a/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/AutoConfiguration.kt b/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/AutoConfiguration.kt index 9e26b16..e4b7fe7 100644 --- a/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/AutoConfiguration.kt +++ b/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/AutoConfiguration.kt @@ -32,18 +32,18 @@ import org.springframework.context.annotation.ComponentScan */ @AutoConfiguration @ComponentScan( - "com.mingliqiye.utils.springboot.bean", - "com.mingliqiye.utils.springboot.converters", - "com.mingliqiye.utils.springboot.listener", + "com.mingliqiye.utils.springboot.bean", + "com.mingliqiye.utils.springboot.converters", + "com.mingliqiye.utils.springboot.listener", ) open class AutoConfiguration { - /** - * 初始化块,在类实例化时执行。 - * - * 调用printBanner方法打印启动横幅,并记录日志表示自动配置成功。 - */ - init { - com.mingliqiye.utils.main.Main.printb() - } + /** + * 初始化块,在类实例化时执行。 + * + * 调用printBanner方法打印启动横幅,并记录日志表示自动配置成功。 + */ + init { + com.mingliqiye.utils.main.Main.printb() + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/Jackson3AutoConfiguration.kt b/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/Jackson3AutoConfiguration.kt index c0e1827..a67971e 100644 --- a/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/Jackson3AutoConfiguration.kt +++ b/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/Jackson3AutoConfiguration.kt @@ -36,37 +36,37 @@ import org.springframework.context.annotation.Bean @AutoConfigureAfter(name = ["org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration"]) open class Jackson3AutoConfiguration { - private val logger = MingLiLoggerFactory.getLogger() + private val logger = MingLiLoggerFactory.getLogger() - /** - * 注册 UUID 的 Jackson 3 序列化/反序列化模块。 - * - * 如需替换 UUID 处理逻辑,注册名为 [UUIDJsonConverterJsonMapperCustomizer] - * 的 [JsonMapperBuilderCustomizer] Bean 即可,本 Bean 将自动跳过。 - */ - @Bean("UUIDJsonConverterJsonMapperCustomizer") - @ConditionalOnMissingBean(name = ["UUIDJsonConverterJsonMapperCustomizer"]) - open fun getUUIDJsonConverterJsonMapperCustomizer(): JsonMapperBuilderCustomizer { - return JsonMapperBuilderCustomizer { builder -> - builder.addModule(UUIDJsonConverter.getJsonConverter().getJackson3Module()) - }.also { - logger.info("MingliUtils Jackson3 UUID Serializers created") - } - } + /** + * 注册 UUID 的 Jackson 3 序列化/反序列化模块。 + * + * 如需替换 UUID 处理逻辑,注册名为 [UUIDJsonConverterJsonMapperCustomizer] + * 的 [JsonMapperBuilderCustomizer] Bean 即可,本 Bean 将自动跳过。 + */ + @Bean("UUIDJsonConverterJsonMapperCustomizer") + @ConditionalOnMissingBean(name = ["UUIDJsonConverterJsonMapperCustomizer"]) + open fun getUUIDJsonConverterJsonMapperCustomizer(): JsonMapperBuilderCustomizer { + return JsonMapperBuilderCustomizer { builder -> + builder.addModule(UUIDJsonConverter.getJsonConverter().getJackson3Module()) + }.also { + logger.info("MingliUtils Jackson3 UUID Serializers created") + } + } - /** - * 注册日期时间的 Jackson 3 序列化/反序列化模块。 - * - * 如需替换日期时间处理逻辑,注册名为 [DateTimeJsonConverterJsonMapperCustomizer] - * 的 [JsonMapperBuilderCustomizer] Bean 即可,本 Bean 将自动跳过。 - */ - @Bean("DateTimeJsonConverterJsonMapperCustomizer") - @ConditionalOnMissingBean(name = ["DateTimeJsonConverterJsonMapperCustomizer"]) - open fun getDateTimeJsonConverterJsonMapperCustomizer(): JsonMapperBuilderCustomizer { - return JsonMapperBuilderCustomizer { builder -> - builder.addModule(DateTimeJsonConverter.getJsonConverter().getJackson3Module()) - }.also { - logger.info("MingliUtils Jackson3 DateTime Serializers created") - } - } + /** + * 注册日期时间的 Jackson 3 序列化/反序列化模块。 + * + * 如需替换日期时间处理逻辑,注册名为 [DateTimeJsonConverterJsonMapperCustomizer] + * 的 [JsonMapperBuilderCustomizer] Bean 即可,本 Bean 将自动跳过。 + */ + @Bean("DateTimeJsonConverterJsonMapperCustomizer") + @ConditionalOnMissingBean(name = ["DateTimeJsonConverterJsonMapperCustomizer"]) + open fun getDateTimeJsonConverterJsonMapperCustomizer(): JsonMapperBuilderCustomizer { + return JsonMapperBuilderCustomizer { builder -> + builder.addModule(DateTimeJsonConverter.getJsonConverter().getJackson3Module()) + }.also { + logger.info("MingliUtils Jackson3 DateTime Serializers created") + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/Jackson3JsonApiAutoConfiguration.kt b/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/Jackson3JsonApiAutoConfiguration.kt index a718e1a..8d119b5 100644 --- a/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/Jackson3JsonApiAutoConfiguration.kt +++ b/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/Jackson3JsonApiAutoConfiguration.kt @@ -66,42 +66,42 @@ import tools.jackson.databind.json.JsonMapper @AutoConfigureAfter(name = ["com.mingliqiye.utils.springboot.autoconfigure.Jackson3AutoConfiguration"]) open class Jackson3JsonApiAutoConfiguration { - companion object { - private val logger = MingLiLoggerFactory.getLogger() - } + companion object { + private val logger = MingLiLoggerFactory.getLogger() + } - /** - * 创建并注册默认的 [JsonApi] Bean。 - * - * 使用容器中的 [JsonMapper] 构造 [Jackson3JsonApi]。读取器直接返回该 [JsonMapper]; - * 写入器被设计为抛出 [JsonException],即本实现不允许通过 [JsonApi] 替换底层 - * `JsonMapper`,底层实例由 Spring 容器统一管理。 - * - * 创建完成后会尝试初始化全局 [JSONA]: - * - 若 [JSONA] 尚未设置,则设置为本实例; - * - 若已设置,则保留既有实现。 - * - * 该 Bean 仅在容器中不存在其他 [JsonApi] 时创建。 - * - * @param jsonMapper 容器中的 Jackson 3 映射器 - * @return 基于 Jackson 3 的 JSON 访问门面 - */ - @Bean - @ConditionalOnMissingBean(JsonApi::class) - open fun jsonApi(jsonMapper: JsonMapper): JsonApi { - return Jackson3JsonApi( - get = { jsonMapper }, - set = { throw JsonException("JSON API set method is not allowed.") }) - .also { - logger.info("JsonApi Bean Auto Configuration Success") - try { - JSONA.getJsonApi() - } catch (_: NullPointerException) { - JSONA.setJsonApi(it) - logger.info( - "JSONA Using {}", it.javaClass.name - ) - } - } - } + /** + * 创建并注册默认的 [JsonApi] Bean。 + * + * 使用容器中的 [JsonMapper] 构造 [Jackson3JsonApi]。读取器直接返回该 [JsonMapper]; + * 写入器被设计为抛出 [JsonException],即本实现不允许通过 [JsonApi] 替换底层 + * `JsonMapper`,底层实例由 Spring 容器统一管理。 + * + * 创建完成后会尝试初始化全局 [JSONA]: + * - 若 [JSONA] 尚未设置,则设置为本实例; + * - 若已设置,则保留既有实现。 + * + * 该 Bean 仅在容器中不存在其他 [JsonApi] 时创建。 + * + * @param jsonMapper 容器中的 Jackson 3 映射器 + * @return 基于 Jackson 3 的 JSON 访问门面 + */ + @Bean + @ConditionalOnMissingBean(JsonApi::class) + open fun jsonApi(jsonMapper: JsonMapper): JsonApi { + return Jackson3JsonApi( + get = { jsonMapper }, + set = { throw JsonException("JSON API set method is not allowed.") }) + .also { + logger.info("JsonApi Bean Auto Configuration Success") + try { + JSONA.getJsonApi() + } catch (_: NullPointerException) { + JSONA.setJsonApi(it) + logger.info( + "JSONA Using {}", it.javaClass.name + ) + } + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/JacksonJsonApiAutoConfiguration.kt b/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/JacksonJsonApiAutoConfiguration.kt index 3604c7f..1da40f8 100644 --- a/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/JacksonJsonApiAutoConfiguration.kt +++ b/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/JacksonJsonApiAutoConfiguration.kt @@ -46,32 +46,32 @@ import org.springframework.context.annotation.Primary open class JacksonJsonApiAutoConfiguration { - companion object { - private val log: Logger = MingLiLoggerFactory.getLogger("MingliUtils-JacksonAutoConfiguration") - } + companion object { + private val log: Logger = MingLiLoggerFactory.getLogger("MingliUtils-JacksonAutoConfiguration") + } - /* - * 创建并返回一个 JsonApi Bean 实例。 - * 该方法会在没有其他 JsonApi Bean 存在时被调用,并将创建的 JacksonJsonApi 实例设置为全局默认的 JSON API。 - * - * @param objectMapper 用于 JSON 操作的 ObjectMapper 实例。 - * @return 返回配置好的 JsonApi 实例。 - */ - @Bean - @Primary - @ConditionalOnMissingBean(JsonApi::class) - open fun jsonApi(objectMapper: ObjectMapper): JsonApi { - return JacksonJsonApi(objectMapper).also { - log.info("JsonApi Bean Auto Configuration Success") - try { - JSONA.getJsonApi() - } catch (_: NullPointerException) { - JSONA.setJsonApi(it) - log.info( - "JSONA Using {}", it.javaClass.name - ) - } - } - } + /* + * 创建并返回一个 JsonApi Bean 实例。 + * 该方法会在没有其他 JsonApi Bean 存在时被调用,并将创建的 JacksonJsonApi 实例设置为全局默认的 JSON API。 + * + * @param objectMapper 用于 JSON 操作的 ObjectMapper 实例。 + * @return 返回配置好的 JsonApi 实例。 + */ + @Bean + @Primary + @ConditionalOnMissingBean(JsonApi::class) + open fun jsonApi(objectMapper: ObjectMapper): JsonApi { + return JacksonJsonApi(objectMapper).also { + log.info("JsonApi Bean Auto Configuration Success") + try { + JSONA.getJsonApi() + } catch (_: NullPointerException) { + JSONA.setJsonApi(it) + log.info( + "JSONA Using {}", it.javaClass.name + ) + } + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/JacksonJsonAutoConfiguration.kt b/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/JacksonJsonAutoConfiguration.kt index 008a816..3ee6df0 100644 --- a/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/JacksonJsonAutoConfiguration.kt +++ b/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/JacksonJsonAutoConfiguration.kt @@ -63,30 +63,30 @@ import org.springframework.context.annotation.Bean @AutoConfigureAfter(name = ["org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration"]) open class JacksonJsonAutoConfiguration { - companion object { - private val log = MingLiLoggerFactory.getLogger() - } + companion object { + private val log = MingLiLoggerFactory.getLogger() + } - @Bean("DateTimeJsonConverterJackson2ObjectMapperBuilderCustomizer") - @ConditionalOnMissingBean(name = ["DateTimeJsonConverterJackson2ObjectMapperBuilderCustomizer"]) - fun getDateTimeJsonConverterJackson2ObjectMapperBuilderCustomizer() = Jackson2ObjectMapperBuilderCustomizer { - log.info( - "MingliUtils Jackson2 DateTime Serializers created" - ) - it.modulesToInstall { modules -> - modules.add(DateTimeJsonConverter.getJsonConverter().getJacksonModule()) - } - } + @Bean("DateTimeJsonConverterJackson2ObjectMapperBuilderCustomizer") + @ConditionalOnMissingBean(name = ["DateTimeJsonConverterJackson2ObjectMapperBuilderCustomizer"]) + fun getDateTimeJsonConverterJackson2ObjectMapperBuilderCustomizer() = Jackson2ObjectMapperBuilderCustomizer { + log.info( + "MingliUtils Jackson2 DateTime Serializers created" + ) + it.modulesToInstall { modules -> + modules.add(DateTimeJsonConverter.getJsonConverter().getJacksonModule()) + } + } - @Bean("UUIDJsonConverterJackson2ObjectMapperBuilderCustomizer") - @ConditionalOnMissingBean(name = ["UUIDJsonConverterJackson2ObjectMapperBuilderCustomizer"]) - fun getUUIDJsonConverterJackson2ObjectMapperBuilderCustomizer() = Jackson2ObjectMapperBuilderCustomizer { - log.info( - "MingliUtils Jackson2 UUID Serializers created" - ) - it.modulesToInstall { modules -> - modules.add(UUIDJsonConverter.getJsonConverter().getJacksonModule()) - } - } + @Bean("UUIDJsonConverterJackson2ObjectMapperBuilderCustomizer") + @ConditionalOnMissingBean(name = ["UUIDJsonConverterJackson2ObjectMapperBuilderCustomizer"]) + fun getUUIDJsonConverterJackson2ObjectMapperBuilderCustomizer() = Jackson2ObjectMapperBuilderCustomizer { + log.info( + "MingliUtils Jackson2 UUID Serializers created" + ) + it.modulesToInstall { modules -> + modules.add(UUIDJsonConverter.getJsonConverter().getJacksonModule()) + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/Okhttp3AutoConfiguration.kt b/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/Okhttp3AutoConfiguration.kt index e0b936e..20467d8 100644 --- a/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/Okhttp3AutoConfiguration.kt +++ b/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/Okhttp3AutoConfiguration.kt @@ -61,63 +61,63 @@ import org.springframework.context.event.EventListener @ConditionalOnClass(name = ["okhttp3.OkHttpClient"]) open class Okhttp3AutoConfiguration { - companion object { - val log: Logger = MingLiLoggerFactory.getLogger() - } + companion object { + val log: Logger = MingLiLoggerFactory.getLogger() + } - /** - * 由本配置创建并注册的 [okhttp3.OkHttpClient] 实例,供上下文关闭时清理使用。 - * - * 当调用方自行声明了 `OkHttpClient` Bean 时,本配置的 Bean 方法不会执行, - * 该字段保持 `null`,关闭时的清理逻辑也会相应跳过。 - */ - var okhttp: okhttp3.OkHttpClient? = null + /** + * 由本配置创建并注册的 [okhttp3.OkHttpClient] 实例,供上下文关闭时清理使用。 + * + * 当调用方自行声明了 `OkHttpClient` Bean 时,本配置的 Bean 方法不会执行, + * 该字段保持 `null`,关闭时的清理逻辑也会相应跳过。 + */ + var okhttp: okhttp3.OkHttpClient? = null - /** - * 创建默认的 [okhttp3.OkHttpClient] Bean。 - * - * 依次应用容器中所有 [OkhttpBuilder] 定制器后构建客户端。没有任何定制器时 - * 也能正常构建([ObjectProvider] 允许零个元素)。 - * - * 该 Bean 仅在容器中不存在其他 `OkHttpClient` 时创建;若调用方已自行声明, - * 本方法不会被调用。 - * - * @param builders 容器中的 OkHttp 构建定制器,按 `@Order` 排序后依次应用 - * @return 构建完成的 OkHttp 客户端 - */ - @Bean - @ConditionalOnMissingBean - open fun okHttpClient(builders: ObjectProvider): okhttp3.OkHttpClient { - var connt = 0 - return okhttp3.OkHttpClient.Builder().let { builder -> - var b = builder - builders.orderedStream().forEach { - b = it.customize(b) - connt++ - } - b.build() - }.also { - okhttp = it - log.info("load $connt OkhttpBuilder initialized OkHttpClient successfully") - } - } + /** + * 创建默认的 [okhttp3.OkHttpClient] Bean。 + * + * 依次应用容器中所有 [OkhttpBuilder] 定制器后构建客户端。没有任何定制器时 + * 也能正常构建([ObjectProvider] 允许零个元素)。 + * + * 该 Bean 仅在容器中不存在其他 `OkHttpClient` 时创建;若调用方已自行声明, + * 本方法不会被调用。 + * + * @param builders 容器中的 OkHttp 构建定制器,按 `@Order` 排序后依次应用 + * @return 构建完成的 OkHttp 客户端 + */ + @Bean + @ConditionalOnMissingBean + open fun okHttpClient(builders: ObjectProvider): okhttp3.OkHttpClient { + var connt = 0 + return okhttp3.OkHttpClient.Builder().let { builder -> + var b = builder + builders.orderedStream().forEach { + b = it.customize(b) + connt++ + } + b.build() + }.also { + okhttp = it + log.info("load $connt OkhttpBuilder initialized OkHttpClient successfully") + } + } - /** - * 在 Spring 上下文关闭时清理本配置创建的 OkHttp 客户端。 - * - * 执行两步清理: - * 1. [okhttp3.ConnectionPool.evictAll] 立即关闭连接池中的空闲连接; - * 2. 关闭 [okhttp3.Dispatcher] 的线程池,中断未完成的任务。 - * - * 仅当 [okhttp] 字段非空(即客户端由本配置创建)时执行; - * 调用方自行声明的客户端不会被清理。 - */ - @EventListener(ContextClosedEvent::class) - open fun handleContextClosed() { - okhttp?.let { - log.info("Context closed, cleaning up OkHttpClient...") - it.connectionPool.evictAll() - it.dispatcher.executorService.shutdownNow() - } - } + /** + * 在 Spring 上下文关闭时清理本配置创建的 OkHttp 客户端。 + * + * 执行两步清理: + * 1. [okhttp3.ConnectionPool.evictAll] 立即关闭连接池中的空闲连接; + * 2. 关闭 [okhttp3.Dispatcher] 的线程池,中断未完成的任务。 + * + * 仅当 [okhttp] 字段非空(即客户端由本配置创建)时执行; + * 调用方自行声明的客户端不会被清理。 + */ + @EventListener(ContextClosedEvent::class) + open fun handleContextClosed() { + okhttp?.let { + log.info("Context closed, cleaning up OkHttpClient...") + it.connectionPool.evictAll() + it.dispatcher.executorService.shutdownNow() + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/builder/OkhttpBuilder.kt b/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/builder/OkhttpBuilder.kt index c4f61cc..a0dd950 100644 --- a/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/builder/OkhttpBuilder.kt +++ b/src/main/kotlin/com/mingliqiye/utils/springboot/autoconfigure/builder/OkhttpBuilder.kt @@ -26,5 +26,5 @@ import okhttp3.OkHttpClient @FunctionalInterface fun interface OkhttpBuilder { - fun customize(builder: OkHttpClient.Builder): OkHttpClient.Builder + fun customize(builder: OkHttpClient.Builder): OkHttpClient.Builder } diff --git a/src/main/kotlin/com/mingliqiye/utils/springboot/bean/SpringBeanUtils.kt b/src/main/kotlin/com/mingliqiye/utils/springboot/bean/SpringBeanUtils.kt index da27278..90d3b62 100644 --- a/src/main/kotlin/com/mingliqiye/utils/springboot/bean/SpringBeanUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/springboot/bean/SpringBeanUtils.kt @@ -35,75 +35,75 @@ import org.springframework.stereotype.Component @Component class SpringBeanUtils : ApplicationContextAware { - companion object { + companion object { - @JvmStatic - val applicationContext: ApplicationContext - get() = applicationContextBase - ?: throw ApplicationContextException("applicationContext isn't ContextInitialized ?") + @JvmStatic + val applicationContext: ApplicationContext + get() = applicationContextBase + ?: throw ApplicationContextException("applicationContext isn't ContextInitialized ?") - private var applicationContextBase: ApplicationContext? = null + private var applicationContextBase: ApplicationContext? = null - inline fun lazyBean(): Lazy = lazy(::getBean) + inline fun lazyBean(): Lazy = lazy(::getBean) - inline fun lazyBean(name: String): Lazy = lazy { - getBean(name, T::class.java) - } + inline fun lazyBean(name: String): Lazy = lazy { + getBean(name, T::class.java) + } - @Throws(BeansException::class) - inline fun getBean() = getBean(T::class.java) + @Throws(BeansException::class) + inline fun getBean() = getBean(T::class.java) - /** - * 根据Bean名称获取Bean实例 - * - * @param name Bean的名称 - * @return 指定名称的Bean实例 - * @throws BeansException 当获取Bean失败时抛出 - * @throws ClassCastException 当类型转换失败时抛出 - */ - @JvmStatic - @Throws(BeansException::class) - @Suppress("UNCHECKED_CAST") - fun getBean(name: String): Any = applicationContext.getBean(name) + /** + * 根据Bean名称获取Bean实例 + * + * @param name Bean的名称 + * @return 指定名称的Bean实例 + * @throws BeansException 当获取Bean失败时抛出 + * @throws ClassCastException 当类型转换失败时抛出 + */ + @JvmStatic + @Throws(BeansException::class) + @Suppress("UNCHECKED_CAST") + fun getBean(name: String): Any = applicationContext.getBean(name) - /** - * 根据Bean类型获取Bean实例 - * - * @param clazz Bean的类型 - * @return 指定类型的Bean实例 - * @throws BeansException 当获取Bean失败时抛出 - */ - @JvmStatic - @Throws(BeansException::class) - fun getBean(clazz: Class): T { - return applicationContext.getBean(clazz) - } + /** + * 根据Bean类型获取Bean实例 + * + * @param clazz Bean的类型 + * @return 指定类型的Bean实例 + * @throws BeansException 当获取Bean失败时抛出 + */ + @JvmStatic + @Throws(BeansException::class) + fun getBean(clazz: Class): T { + return applicationContext.getBean(clazz) + } - /** - * 根据Bean名称和类型获取Bean实例 - * - * @param name Bean的名称 - * @param clazz Bean的类型 - * @return 指定名称和类型的Bean实例 - * @throws BeansException 当获取Bean失败时抛出 - */ - @JvmStatic - @Throws(BeansException::class) - fun getBean(name: String, clazz: Class): T { - return applicationContext.getBean(name, clazz) - } - } + /** + * 根据Bean名称和类型获取Bean实例 + * + * @param name Bean的名称 + * @param clazz Bean的类型 + * @return 指定名称和类型的Bean实例 + * @throws BeansException 当获取Bean失败时抛出 + */ + @JvmStatic + @Throws(BeansException::class) + fun getBean(name: String, clazz: Class): T { + return applicationContext.getBean(name, clazz) + } + } - /** - * 设置Spring的应用上下文 - * - * @param applicationContext Spring的应用上下文 - * @throws BeansException 当设置应用上下文失败时抛出 - */ - @Throws(BeansException::class) - override fun setApplicationContext(applicationContext: ApplicationContext) { - applicationContextBase = applicationContext - } + /** + * 设置Spring的应用上下文 + * + * @param applicationContext Spring的应用上下文 + * @throws BeansException 当设置应用上下文失败时抛出 + */ + @Throws(BeansException::class) + override fun setApplicationContext(applicationContext: ApplicationContext) { + applicationContextBase = applicationContext + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/springboot/converters/DateTimeToStringConverter.kt b/src/main/kotlin/com/mingliqiye/utils/springboot/converters/DateTimeToStringConverter.kt index 506fe78..8af8f9a 100644 --- a/src/main/kotlin/com/mingliqiye/utils/springboot/converters/DateTimeToStringConverter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/springboot/converters/DateTimeToStringConverter.kt @@ -29,7 +29,7 @@ import org.springframework.stereotype.Component @Component class DateTimeToStringConverter : Converter { - override fun convert(source: DateTime): String { - return source.format(Formatter.STANDARD_DATETIME) - } + override fun convert(source: DateTime): String { + return source.format(Formatter.STANDARD_DATETIME) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/springboot/converters/StringToDateTimeConverter.kt b/src/main/kotlin/com/mingliqiye/utils/springboot/converters/StringToDateTimeConverter.kt index 02e1da5..bbbdd48 100644 --- a/src/main/kotlin/com/mingliqiye/utils/springboot/converters/StringToDateTimeConverter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/springboot/converters/StringToDateTimeConverter.kt @@ -29,7 +29,7 @@ import org.springframework.stereotype.Component @Component class StringToDateTimeConverter : Converter { - override fun convert(source: String): DateTime { - return DateTime.parse(source, Formatter.STANDARD_DATETIME_MILLISECOUND7, true) - } + override fun convert(source: String): DateTime { + return DateTime.parse(source, Formatter.STANDARD_DATETIME_MILLISECOUND7, true) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/springboot/converters/StringToUUIDConverter.kt b/src/main/kotlin/com/mingliqiye/utils/springboot/converters/StringToUUIDConverter.kt index 6e55306..4655774 100644 --- a/src/main/kotlin/com/mingliqiye/utils/springboot/converters/StringToUUIDConverter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/springboot/converters/StringToUUIDConverter.kt @@ -28,7 +28,7 @@ import org.springframework.stereotype.Component @Component class StringToUUIDConverter : Converter { - override fun convert(source: String): UUID { - return UUID.of(source) - } + override fun convert(source: String): UUID { + return UUID.of(source) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/springboot/converters/UUIDToStringConverter.kt b/src/main/kotlin/com/mingliqiye/utils/springboot/converters/UUIDToStringConverter.kt index 0e4fc25..ddd46f3 100644 --- a/src/main/kotlin/com/mingliqiye/utils/springboot/converters/UUIDToStringConverter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/springboot/converters/UUIDToStringConverter.kt @@ -28,7 +28,7 @@ import org.springframework.stereotype.Component @Component class UUIDToStringConverter : Converter { - override fun convert(source: UUID): String { - return source.getString() - } + override fun convert(source: UUID): String { + return source.getString() + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/springboot/listener/ApplicationListener.kt b/src/main/kotlin/com/mingliqiye/utils/springboot/listener/ApplicationListener.kt index 8b34202..c47a6ae 100644 --- a/src/main/kotlin/com/mingliqiye/utils/springboot/listener/ApplicationListener.kt +++ b/src/main/kotlin/com/mingliqiye/utils/springboot/listener/ApplicationListener.kt @@ -36,70 +36,70 @@ import org.springframework.context.event.EventListener @Listener class ApplicationListener { - val runningMap = HashMap>() + val runningMap = HashMap>() - companion object { - private val log = MingLiLoggerFactory.getLogger() - } + companion object { + private val log = MingLiLoggerFactory.getLogger() + } - fun init(applicationContext: ListableBeanFactory) { - runningMap.clear() - for (beanName in applicationContext.beanDefinitionNames) { - val bean: Any = applicationContext.getBean(beanName) - val beanClass: Class<*> = bean.javaClass - if (beanClass.getName().startsWith("org.springframework")) { - continue - } - for (method in beanClass.getDeclaredMethods()) { - val annotation: Any = - method.getAnnotation(ApplicationStartedRunner::class.java) ?: method.getAnnotation( - ApplicationDestroyedRunner::class.java - ) ?: continue - var order: Int - var key: Class - when (annotation) { - is ApplicationStartedRunner -> { - order = annotation.order - key = ApplicationStartedRunner::class.java - } + fun init(applicationContext: ListableBeanFactory) { + runningMap.clear() + for (beanName in applicationContext.beanDefinitionNames) { + val bean: Any = applicationContext.getBean(beanName) + val beanClass: Class<*> = bean.javaClass + if (beanClass.getName().startsWith("org.springframework")) { + continue + } + for (method in beanClass.getDeclaredMethods()) { + val annotation: Any = + method.getAnnotation(ApplicationStartedRunner::class.java) ?: method.getAnnotation( + ApplicationDestroyedRunner::class.java + ) ?: continue + var order: Int + var key: Class + when (annotation) { + is ApplicationStartedRunner -> { + order = annotation.order + key = ApplicationStartedRunner::class.java + } - is ApplicationDestroyedRunner -> { - order = annotation.order - key = ApplicationDestroyedRunner::class.java - } + is ApplicationDestroyedRunner -> { + order = annotation.order + key = ApplicationDestroyedRunner::class.java + } - else -> continue - } - log.debug("ApplicationListener Scaned [{} - {}] order: {} ", bean.javaClass.name, method, order) - val d = runningMap.getOrPut(key.name) { - ArrayList() - } - d.add( - ApplicationRunnerData( - beanName = beanName, order = order, bean = bean, method = method - ) - ) - } - } - runningMap.forEach { (string, data) -> - data.sortWith(compareBy(ApplicationRunnerData::order)) - } - } + else -> continue + } + log.debug("ApplicationListener Scaned [{} - {}] order: {} ", bean.javaClass.name, method, order) + val d = runningMap.getOrPut(key.name) { + ArrayList() + } + d.add( + ApplicationRunnerData( + beanName = beanName, order = order, bean = bean, method = method + ) + ) + } + } + runningMap.forEach { (string, data) -> + data.sortWith(compareBy(ApplicationRunnerData::order)) + } + } - @EventListener(ApplicationStartedEvent::class) - fun applicationStarted(event: ApplicationStartedEvent) { - init(event.applicationContext) - runningMap[ApplicationStartedRunner::class.java.name]?.forEach { - log.debug("Started Event Running {} {} {} - {}", it.beanName, it.bean, it.method, it.order) - it.run() - } - } + @EventListener(ApplicationStartedEvent::class) + fun applicationStarted(event: ApplicationStartedEvent) { + init(event.applicationContext) + runningMap[ApplicationStartedRunner::class.java.name]?.forEach { + log.debug("Started Event Running {} {} {} - {}", it.beanName, it.bean, it.method, it.order) + it.run() + } + } - @EventListener(ContextClosedEvent::class) - fun applicationClosed() { - runningMap[ApplicationDestroyedRunner::class.java.name]?.forEach { - log.debug("Closed Event Running {} {} {} - {}", it.beanName, it.bean, it.method, it.order) - it.run() - } - } + @EventListener(ContextClosedEvent::class) + fun applicationClosed() { + runningMap[ApplicationDestroyedRunner::class.java.name]?.forEach { + log.debug("Closed Event Running {} {} {} - {}", it.beanName, it.bean, it.method, it.order) + it.run() + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/springboot/listener/ApplicationRunnerData.kt b/src/main/kotlin/com/mingliqiye/utils/springboot/listener/ApplicationRunnerData.kt index bdef2b7..00f842a 100644 --- a/src/main/kotlin/com/mingliqiye/utils/springboot/listener/ApplicationRunnerData.kt +++ b/src/main/kotlin/com/mingliqiye/utils/springboot/listener/ApplicationRunnerData.kt @@ -25,9 +25,9 @@ package com.mingliqiye.utils.springboot.listener import java.lang.reflect.Method data class ApplicationRunnerData( - val beanName: String, val order: Int, val bean: Any, val method: Method + val beanName: String, val order: Int, val bean: Any, val method: Method, ) { - fun run() { - method.invoke(bean) - } + fun run() { + method.invoke(bean) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/stream/SuprtStreamUtils.kt b/src/main/kotlin/com/mingliqiye/utils/stream/SuprtStreamUtils.kt index 9c725a8..aba672c 100644 --- a/src/main/kotlin/com/mingliqiye/utils/stream/SuprtStreamUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/stream/SuprtStreamUtils.kt @@ -39,95 +39,95 @@ import java.util.stream.Stream */ object SuperStreamUtils { - /** - * 将 Java [Stream] 转换为 [SuperStream]。 - * - * @param T 流中元素的类型,必须是不可空类型。 - * @return 包装当前 [Stream] 的 [SuperStream]。 - */ - fun Stream.toSuperStream() = SuperStream.of(this) + /** + * 将 Java [Stream] 转换为 [SuperStream]。 + * + * @param T 流中元素的类型,必须是不可空类型。 + * @return 包装当前 [Stream] 的 [SuperStream]。 + */ + fun Stream.toSuperStream() = SuperStream.of(this) - /** - * 将 [ByteArray] 转换为 [SuperStream]。 - * - * @param parallel 是否创建并行流,默认为 `false`(串行)。 - * @return 由当前数组元素构成的 [SuperStream]。 - */ - fun ByteArray.toSuperStream(parallel: Boolean = false) = SuperStream.of(this.toList(), parallel) + /** + * 将 [ByteArray] 转换为 [SuperStream]。 + * + * @param parallel 是否创建并行流,默认为 `false`(串行)。 + * @return 由当前数组元素构成的 [SuperStream]。 + */ + fun ByteArray.toSuperStream(parallel: Boolean = false) = SuperStream.of(this.toList(), parallel) - /** - * 将 [ShortArray] 转换为 [SuperStream]。 - * - * @param parallel 是否创建并行流,默认为 `false`(串行)。 - * @return 由当前数组元素构成的 [SuperStream]。 - */ - fun ShortArray.toSuperStream(parallel: Boolean = false) = SuperStream.of(this.toList(), parallel) + /** + * 将 [ShortArray] 转换为 [SuperStream]。 + * + * @param parallel 是否创建并行流,默认为 `false`(串行)。 + * @return 由当前数组元素构成的 [SuperStream]。 + */ + fun ShortArray.toSuperStream(parallel: Boolean = false) = SuperStream.of(this.toList(), parallel) - /** - * 将 [IntArray] 转换为 [SuperStream]。 - * - * @param parallel 是否创建并行流,默认为 `false`(串行)。 - * @return 由当前数组元素构成的 [SuperStream]。 - */ - fun IntArray.toSuperStream(parallel: Boolean = false) = SuperStream.of(this.toList(), parallel) + /** + * 将 [IntArray] 转换为 [SuperStream]。 + * + * @param parallel 是否创建并行流,默认为 `false`(串行)。 + * @return 由当前数组元素构成的 [SuperStream]。 + */ + fun IntArray.toSuperStream(parallel: Boolean = false) = SuperStream.of(this.toList(), parallel) - /** - * 将 [LongArray] 转换为 [SuperStream]。 - * - * @param parallel 是否创建并行流,默认为 `false`(串行)。 - * @return 由当前数组元素构成的 [SuperStream]。 - */ - fun LongArray.toSuperStream(parallel: Boolean = false) = SuperStream.of(this.toList(), parallel) + /** + * 将 [LongArray] 转换为 [SuperStream]。 + * + * @param parallel 是否创建并行流,默认为 `false`(串行)。 + * @return 由当前数组元素构成的 [SuperStream]。 + */ + fun LongArray.toSuperStream(parallel: Boolean = false) = SuperStream.of(this.toList(), parallel) - /** - * 将 [FloatArray] 转换为 [SuperStream]。 - * - * @param parallel 是否创建并行流,默认为 `false`(串行)。 - * @return 由当前数组元素构成的 [SuperStream]。 - */ - fun FloatArray.toSuperStream(parallel: Boolean = false) = SuperStream.of(this.toList(), parallel) + /** + * 将 [FloatArray] 转换为 [SuperStream]。 + * + * @param parallel 是否创建并行流,默认为 `false`(串行)。 + * @return 由当前数组元素构成的 [SuperStream]。 + */ + fun FloatArray.toSuperStream(parallel: Boolean = false) = SuperStream.of(this.toList(), parallel) - /** - * 将 [DoubleArray] 转换为 [SuperStream]。 - * - * @param parallel 是否创建并行流,默认为 `false`(串行)。 - * @return 由当前数组元素构成的 [SuperStream]。 - */ - fun DoubleArray.toSuperStream(parallel: Boolean = false) = SuperStream.of(this.toList(), parallel) + /** + * 将 [DoubleArray] 转换为 [SuperStream]。 + * + * @param parallel 是否创建并行流,默认为 `false`(串行)。 + * @return 由当前数组元素构成的 [SuperStream]。 + */ + fun DoubleArray.toSuperStream(parallel: Boolean = false) = SuperStream.of(this.toList(), parallel) - /** - * 将 [BooleanArray] 转换为 [SuperStream]。 - * - * @param parallel 是否创建并行流,默认为 `false`(串行)。 - * @return 由当前数组元素构成的 [SuperStream]。 - */ - fun BooleanArray.toSuperStream(parallel: Boolean = false) = SuperStream.of(this.toList(), parallel) + /** + * 将 [BooleanArray] 转换为 [SuperStream]。 + * + * @param parallel 是否创建并行流,默认为 `false`(串行)。 + * @return 由当前数组元素构成的 [SuperStream]。 + */ + fun BooleanArray.toSuperStream(parallel: Boolean = false) = SuperStream.of(this.toList(), parallel) - /** - * 将对象数组 [Array] 转换为 [SuperStream]。 - * - * @param T 数组元素类型,必须是不可空类型。 - * @param parallel 是否创建并行流,默认为 `false`(串行)。 - * @return 由当前数组元素构成的 [SuperStream]。 - */ - fun Array.toSuperStream(parallel: Boolean = false) = SuperStream.of(this, parallel) + /** + * 将对象数组 [Array] 转换为 [SuperStream]。 + * + * @param T 数组元素类型,必须是不可空类型。 + * @param parallel 是否创建并行流,默认为 `false`(串行)。 + * @return 由当前数组元素构成的 [SuperStream]。 + */ + fun Array.toSuperStream(parallel: Boolean = false) = SuperStream.of(this, parallel) - /** - * 将 [Collection] 转换为 [SuperStream]。 - * - * @param T 集合元素类型,必须是不可空类型。 - * @param parallel 是否创建并行流,默认为 `false`(串行)。 - * @return 由当前集合元素构成的 [SuperStream]。 - */ - fun Collection.toSuperStream(parallel: Boolean = false) = SuperStream.of(this, parallel) + /** + * 将 [Collection] 转换为 [SuperStream]。 + * + * @param T 集合元素类型,必须是不可空类型。 + * @param parallel 是否创建并行流,默认为 `false`(串行)。 + * @return 由当前集合元素构成的 [SuperStream]。 + */ + fun Collection.toSuperStream(parallel: Boolean = false) = SuperStream.of(this, parallel) - /** - * 将 [Map] 转换为 [SuperStream],流中元素为键值对 [Map.Entry]。 - * - * @param K 键的类型。 - * @param V 值的类型。 - * @param parallel 是否创建并行流,默认为 `false`(串行)。 - * @return 由当前映射的条目构成的 [SuperStream]。 - */ - fun Map.toSuperStream(parallel: Boolean = false) = SuperStream.of(this, parallel) + /** + * 将 [Map] 转换为 [SuperStream],流中元素为键值对 [Map.Entry]。 + * + * @param K 键的类型。 + * @param V 值的类型。 + * @param parallel 是否创建并行流,默认为 `false`(串行)。 + * @return 由当前映射的条目构成的 [SuperStream]。 + */ + fun Map.toSuperStream(parallel: Boolean = false) = SuperStream.of(this, parallel) } diff --git a/src/main/kotlin/com/mingliqiye/utils/string/StringUtils.kt b/src/main/kotlin/com/mingliqiye/utils/string/StringUtils.kt index 5bb2a9f..b9233a3 100644 --- a/src/main/kotlin/com/mingliqiye/utils/string/StringUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/string/StringUtils.kt @@ -48,10 +48,10 @@ val NULLISH_STRINGS = setOf("null", "NaN", "undefined", "None", "none") @OptIn(ExperimentalContracts::class) @JvmName("isEmpty") fun String?.isNullish(): Boolean { - contract { - returns(false) implies (this@isNullish != null) - } - return this.isNullOrBlank() || this in NULLISH_STRINGS + contract { + returns(false) implies (this@isNullish != null) + } + return this.isNullOrBlank() || this in NULLISH_STRINGS } @JvmName("__Formatde") @@ -67,53 +67,53 @@ fun String.formatd(vararg args: Any) = com.mingliqiye.utils.string.format(this, * @return 格式化后的字符串 */ fun format(str: String, vararg args: Any?): String { - var argIndex = 0 - val result = StringBuilder() - var lastIndex = 0 + var argIndex = 0 + val result = StringBuilder() + var lastIndex = 0 - // 匹配所有非转义的 {} - val pattern = Regex("(? = unicode.split("\\\\u".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray() - // 从索引1开始遍历,因为分割后的第一个元素是转义符前面的内容(可能为空) - for (i in 1.. = unicode.split("\\\\u".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray() + // 从索引1开始遍历,因为分割后的第一个元素是转义符前面的内容(可能为空) + for (i in 1.. { - return str.split(separator) + return str.split(separator) } /** @@ -210,16 +210,16 @@ fun split(str: String, separator: String): List { * @return 连接后的字符串 */ fun List.join(separator: String, getstring: (T) -> String = { it.toString() }): String { - // 使用StringBuilder构建结果字符串 - val sb = StringBuilder() - for (i in this.indices) { - sb.append(this[i]) - // 除了最后一个元素外,都在后面添加分隔符 - if (i != this.size - 1) { - sb.append(separator) - } - } - return sb.toString() + // 使用StringBuilder构建结果字符串 + val sb = StringBuilder() + for (i in this.indices) { + sb.append(this[i]) + // 除了最后一个元素外,都在后面添加分隔符 + if (i != this.size - 1) { + sb.append(separator) + } + } + return sb.toString() } /** @@ -229,49 +229,49 @@ fun List.join(separator: String, getstring: (T) -> String = { it.toString * @return 连接后的字符串 */ fun String.join(list: List, getstring: (T) -> String = { it.toString() }): String { - // 使用StringBuilder构建结果字符串 - val sb = StringBuilder() - for (i in list.indices) { - sb.append(getstring(list[i])) - // 除了最后一个元素外,都在后面添加当前字符串作为分隔符 - if (i != list.size - 1) { - sb.append(this) - } - } - return sb.toString() + // 使用StringBuilder构建结果字符串 + val sb = StringBuilder() + for (i in list.indices) { + sb.append(getstring(list[i])) + // 除了最后一个元素外,都在后面添加当前字符串作为分隔符 + if (i != list.size - 1) { + sb.append(this) + } + } + return sb.toString() } fun String.join(array: Array, getstring: (T) -> String = { it.toString() }): String { - // 使用StringBuilder构建结果字符串 - val sb = StringBuilder() - for (i in array.indices) { - sb.append(getstring(array[i])) - // 除了最后一个元素外,都在后面添加当前字符串作为分隔符 - if (i != array.size - 1) { - sb.append(this) - } - } - return sb.toString() + // 使用StringBuilder构建结果字符串 + val sb = StringBuilder() + for (i in array.indices) { + sb.append(getstring(array[i])) + // 除了最后一个元素外,都在后面添加当前字符串作为分隔符 + if (i != array.size - 1) { + sb.append(this) + } + } + return sb.toString() } fun String?.parserTemplate(template: String): List? { - if (this == null) return null - val regex: Regex = Regex( - "^" + - template - .replace("\\", "\\\\") - .replace("(", "\\(") - .replace(")", "\\)") - .replace("[", "\\[") - .replace("]", "\\]") - .replace("+", "\\+") - .replace("=", "\\=") - .replace("{}", "((?s).*)") + "$".toRegex() - ) - val datas = regex.find(this)?.groupValues ?: return null - return List(datas.size - 1) { - datas[it + 1] - } + if (this == null) return null + val regex: Regex = Regex( + "^" + + template + .replace("\\", "\\\\") + .replace("(", "\\(") + .replace(")", "\\)") + .replace("[", "\\[") + .replace("]", "\\]") + .replace("+", "\\+") + .replace("=", "\\=") + .replace("{}", "((?s).*)") + "$".toRegex() + ) + val datas = regex.find(this)?.groupValues ?: return null + return List(datas.size - 1) { + datas[it + 1] + } } @@ -280,24 +280,24 @@ fun String.urlDecode() = URLDecoder.decode(this, Charsets.UTF_8.name()) fun String.hmacSHA256String(keyS: String): String { - val instance = Mac.getInstance("HmacSHA256") - val key = keyS.toByteArray() - instance.init(SecretKeySpec(key, 0, key.size, "HmacSHA256")) - val bytes = instance.doFinal(this.toByteArray()) - return BASE16.encode(bytes) + val instance = Mac.getInstance("HmacSHA256") + val key = keyS.toByteArray() + instance.init(SecretKeySpec(key, 0, key.size, "HmacSHA256")) + val bytes = instance.doFinal(this.toByteArray()) + return BASE16.encode(bytes) } fun String.md5String(): String { - val instance = MessageDigest.getInstance("MD5") - instance.update(this.toByteArray()) - val bytes = instance.digest() - return BASE16.encode(bytes) + val instance = MessageDigest.getInstance("MD5") + instance.update(this.toByteArray()) + val bytes = instance.digest() + return BASE16.encode(bytes) } fun String.hmacMd5String(keyS: String): String { - val instance = Mac.getInstance("HmacMD5") - val key = keyS.toByteArray() - instance.init(SecretKeySpec(key, 0, key.size, "HmacSHA256")) - val bytes = instance.doFinal(this.toByteArray()) - return BASE16.encode(bytes) + val instance = Mac.getInstance("HmacMD5") + val key = keyS.toByteArray() + instance.init(SecretKeySpec(key, 0, key.size, "HmacSHA256")) + val bytes = instance.doFinal(this.toByteArray()) + return BASE16.encode(bytes) } diff --git a/src/main/kotlin/com/mingliqiye/utils/system/SystemUtil.kt b/src/main/kotlin/com/mingliqiye/utils/system/SystemUtil.kt index 57c855b..dde9d17 100644 --- a/src/main/kotlin/com/mingliqiye/utils/system/SystemUtil.kt +++ b/src/main/kotlin/com/mingliqiye/utils/system/SystemUtil.kt @@ -36,36 +36,36 @@ private fun Enumeration?.toList(): List = if (this == null) emptyList( * 操作系统名称属性,延迟初始化 */ val osName: String? by lazy { - runCatching { System.getProperty("os.name") }.getOrNull() + runCatching { System.getProperty("os.name") }.getOrNull() } /** * 判断当前操作系统是否为 Windows */ val isWindows: Boolean by lazy { - osName?.startsWith("Windows") == true + osName?.startsWith("Windows") == true } /** * 判断当前操作系统是否为 Mac */ val isMac: Boolean by lazy { - osName?.startsWith("Mac") == true + osName?.startsWith("Mac") == true } /** * 判断当前操作系统是否为 Unix/Linux(含 macOS) */ val isUnix: Boolean by lazy { - val name = osName ?: return@lazy false - UNIX_PREFIXES.any { name.startsWith(it) } + val name = osName ?: return@lazy false + UNIX_PREFIXES.any { name.startsWith(it) } } /** * JDK 版本号属性,延迟初始化 */ val jdkVersion: String? by lazy { - runCatching { System.getProperty("java.specification.version") }.getOrNull() + runCatching { System.getProperty("java.specification.version") }.getOrNull() } /** @@ -76,22 +76,22 @@ val jdkVersion: String? by lazy { * @throws IllegalStateException 无法解析出整数版本时抛出 */ val javaVersionAsInteger: Int by lazy { - val version = jdkVersion - if (version.isNullOrBlank()) { - throw IllegalStateException( - "Unable to determine Java version from property 'java.specification.version'" - ) - } - val normalized = if (version.startsWith("1.")) version.substring(2) else version - val major = normalized.substringBefore('.').substringBefore('-') - major.toIntOrNull() ?: throw IllegalStateException("Invalid Java version format: $version") + val version = jdkVersion + if (version.isNullOrBlank()) { + throw IllegalStateException( + "Unable to determine Java version from property 'java.specification.version'" + ) + } + val normalized = if (version.startsWith("1.")) version.substring(2) else version + val major = normalized.substringBefore('.').substringBefore('-') + major.toIntOrNull() ?: throw IllegalStateException("Invalid Java version format: $version") } /** * 判断当前 JDK 版本是否大于 8 */ val isJdk8Plus: Boolean by lazy { - javaVersionAsInteger > 8 + javaVersionAsInteger > 8 } /** @@ -100,12 +100,12 @@ val isJdk8Plus: Boolean by lazy { * @throws RuntimeException 网络接口枚举失败时抛出 */ val localIps: Array by lazy { - try { - activeNetworkInterfaces().flatMap { it.inetAddresses.toList() }.filterIsInstance() - .mapNotNull { it.hostAddress }.toList().toTypedArray() - } catch (e: SocketException) { - throw RuntimeException("Failed to get local IP addresses", e) - } + try { + activeNetworkInterfaces().flatMap { it.inetAddresses.toList() }.filterIsInstance() + .mapNotNull { it.hostAddress }.toList().toTypedArray() + } catch (e: SocketException) { + throw RuntimeException("Failed to get local IP addresses", e) + } } /** @@ -117,12 +117,12 @@ val localIpsByList: List by lazy { localIps.toList() } * 本地回环地址数组;枚举失败时至少包含 `127.0.0.1` */ val loopbackIps: Array by lazy { - try { - NetworkInterface.getNetworkInterfaces().toList().asSequence().filter { it.isLoopback && it.isUp } - .flatMap { it.inetAddresses.toList().asSequence() }.mapNotNull { it.hostAddress }.toList().toTypedArray() - } catch (_: SocketException) { - arrayOf("127.0.0.1") - } + try { + NetworkInterface.getNetworkInterfaces().toList().asSequence().filter { it.isLoopback && it.isUp } + .flatMap { it.inetAddresses.toList().asSequence() }.mapNotNull { it.hostAddress }.toList().toTypedArray() + } catch (_: SocketException) { + arrayOf("127.0.0.1") + } } /** @@ -134,35 +134,35 @@ val loopbackIpsByList: List by lazy { loopbackIps.toList() } * 当前进程 PID;获取失败返回 -1 */ val getPid: Long by lazy { - runCatching { ProcessHandle.current().pid() }.getOrElse { -1L } + runCatching { ProcessHandle.current().pid() }.getOrElse { -1L } } /** * 当前进程 PID 字符串;获取失败返回 "-1" */ val pidAsString: String by lazy { - val pid = getPid - if (pid == -1L) "-1" else pid.toString() + val pid = getPid + if (pid == -1L) "-1" else pid.toString() } /** * 计算机名;获取失败返回 "unknown" */ val computerName: String by lazy { - getEnvVar("COMPUTERNAME") ?: getEnvVar("HOSTNAME") - ?: runCatching { InetAddress.getLocalHost().hostName }.getOrNull()?.takeIf { it.isNotBlank() } ?: "unknown" + getEnvVar("COMPUTERNAME") ?: getEnvVar("HOSTNAME") + ?: runCatching { InetAddress.getLocalHost().hostName }.getOrNull()?.takeIf { it.isNotBlank() } ?: "unknown" } /** * 当前用户名;获取失败返回 "unknown" */ val userName: String by lazy { - getEnvVar("USERNAME") ?: getEnvVar("USER") ?: runCatching { System.getProperty("user.name") }.getOrNull() - ?.takeIf { it.isNotBlank() } ?: "unknown" + getEnvVar("USERNAME") ?: getEnvVar("USER") ?: runCatching { System.getProperty("user.name") }.getOrNull() + ?.takeIf { it.isNotBlank() } ?: "unknown" } private fun getEnvVar(name: String): String? = runCatching { - System.getenv(name)?.takeIf { it.isNotBlank() } + System.getenv(name)?.takeIf { it.isNotBlank() } }.getOrNull() /** @@ -171,69 +171,69 @@ private fun getEnvVar(name: String): String? = runCatching { * 未找到可用网卡时回退为 6 字节随机数,避免下游拿到空数组导致错误。 */ val macAddressBytes: ByteArray by lazy { - val found = try { - activeNetworkInterfaces().mapNotNull { runCatching { it.hardwareAddress }.getOrNull() } - .firstOrNull { it.isNotEmpty() } - } catch (_: SocketException) { - null - } - found ?: randomByte(6) + val found = try { + activeNetworkInterfaces().mapNotNull { runCatching { it.hardwareAddress }.getOrNull() } + .firstOrNull { it.isNotEmpty() } + } catch (_: SocketException) { + null + } + found ?: randomByte(6) } /** * 本机 MAC 地址的十六进制字符串列表(大写) */ val macAddressStringList: List by lazy { - macAddressBytes.map { HEX_UPPER[it.toInt() and 0xFF] } + macAddressBytes.map { HEX_UPPER[it.toInt() and 0xFF] } } /** * 本机 MAC 地址的格式化字符串,如 `00:11:22:33:44:55` */ val macAddressFormattedString: String by lazy { - macAddressBytes.joinToString(":") { HEX_UPPER[it.toInt() and 0xFF] } + macAddressBytes.joinToString(":") { HEX_UPPER[it.toInt() and 0xFF] } } /** * 所有非回环、非虚拟网卡的 MAC 地址映射,key 为网卡名 */ val allMacAddresses: Map by lazy { - try { - NetworkInterface.getNetworkInterfaces().toList().asSequence().filter { !it.isLoopback && !it.isVirtual } - .mapNotNull { ni -> - val mac = runCatching { ni.hardwareAddress }.getOrNull() - if (mac != null && mac.isNotEmpty()) ni.name to mac else null - }.toMap() - } catch (_: SocketException) { - emptyMap() - } + try { + NetworkInterface.getNetworkInterfaces().toList().asSequence().filter { !it.isLoopback && !it.isVirtual } + .mapNotNull { ni -> + val mac = runCatching { ni.hardwareAddress }.getOrNull() + if (mac != null && mac.isNotEmpty()) ni.name to mac else null + }.toMap() + } catch (_: SocketException) { + emptyMap() + } } /** * 所有网卡 MAC 地址的十六进制字符串列表映射 */ val allMacAddressesStringList: Map> by lazy { - allMacAddresses.mapValues { (_, bytes) -> bytes.map { HEX_UPPER[it.toInt() and 0xFF] } } + allMacAddresses.mapValues { (_, bytes) -> bytes.map { HEX_UPPER[it.toInt() and 0xFF] } } } /** * 可用处理器数量 */ val availableProcessors: Int by lazy { - Runtime.getRuntime().availableProcessors() + Runtime.getRuntime().availableProcessors() } private fun activeNetworkInterfaces(): Sequence = - NetworkInterface.getNetworkInterfaces().toList().asSequence().filter { !it.isLoopback && !it.isVirtual && it.isUp } + NetworkInterface.getNetworkInterfaces().toList().asSequence().filter { !it.isLoopback && !it.isVirtual && it.isUp } private val protocol: String by lazy { - val target = ProtocolAnchor::class.java - val resourceName = target.simpleName + ".class" - val resource: URL = target.getResource(resourceName) ?: throw IllegalStateException( - "Unable to locate resource '$resourceName' for class ${target.name}" - ) - resource.protocol + val target = ProtocolAnchor::class.java + val resourceName = target.simpleName + ".class" + val resource: URL = target.getResource(resourceName) ?: throw IllegalStateException( + "Unable to locate resource '$resourceName' for class ${target.name}" + ) + resource.protocol } @@ -262,7 +262,7 @@ val isJswarMode: Boolean get() = protocol == "jswar" val isNotJswarMode: Boolean get() = protocol != "jswar" val lineSeparator - get() = System.lineSeparator() + get() = System.lineSeparator() const val lineSeparatorLF = "\n" diff --git a/src/main/kotlin/com/mingliqiye/utils/thread/AsyncTasks.kt b/src/main/kotlin/com/mingliqiye/utils/thread/AsyncTasks.kt index 65e3e52..f76299b 100644 --- a/src/main/kotlin/com/mingliqiye/utils/thread/AsyncTasks.kt +++ b/src/main/kotlin/com/mingliqiye/utils/thread/AsyncTasks.kt @@ -22,11 +22,7 @@ package com.mingliqiye.utils.thread -import java.util.concurrent.Callable -import java.util.concurrent.ExecutorService -import java.util.concurrent.Future -import java.util.concurrent.ScheduledFuture -import java.util.concurrent.TimeUnit +import java.util.concurrent.* // ---- 并行执行 ---- @@ -43,50 +39,50 @@ import java.util.concurrent.TimeUnit * ``` */ fun runParallel( - vararg tasks: () -> T, - executor: ExecutorService = GlobalThreadPool.io, + vararg tasks: () -> T, + executor: ExecutorService = GlobalThreadPool.io, ): List = executor.invokeAllAndGet(tasks.map { Callable(it) }) /** * 并行执行全部任务,阻塞等待所有完成,按输入顺序返回结果 */ fun runParallel( - tasks: Collection<() -> T>, - executor: ExecutorService = GlobalThreadPool.io, + tasks: Collection<() -> T>, + executor: ExecutorService = GlobalThreadPool.io, ): List = executor.invokeAllAndGet(tasks.map { Callable(it) }) /** * 并行执行全部任务,任一任务在超时时间内未完成则抛出 [java.util.concurrent.TimeoutException] */ fun runParallelWithin( - timeout: Long, - unit: TimeUnit = TimeUnit.MILLISECONDS, - executor: ExecutorService = GlobalThreadPool.io, - tasks: Collection<() -> T>, + timeout: Long, + unit: TimeUnit = TimeUnit.MILLISECONDS, + executor: ExecutorService = GlobalThreadPool.io, + tasks: Collection<() -> T>, ): List { - val futures = tasks.map { executor.submit(Callable(it)) } - val deadline = System.nanoTime() + unit.toNanos(timeout) - return futures.map { future -> - val remaining = deadline - System.nanoTime() - if (remaining <= 0) throw java.util.concurrent.TimeoutException("runParallel timeout $timeout $unit") - future.get(remaining, TimeUnit.NANOSECONDS) - } + val futures = tasks.map { executor.submit(Callable(it)) } + val deadline = System.nanoTime() + unit.toNanos(timeout) + return futures.map { future -> + val remaining = deadline - System.nanoTime() + if (remaining <= 0) throw java.util.concurrent.TimeoutException("runParallel timeout $timeout $unit") + future.get(remaining, TimeUnit.NANOSECONDS) + } } /** * 执行全部任务,返回第一个成功完成的任务结果,其余任务取消。 */ fun firstCompleted( - vararg tasks: () -> T, - executor: ExecutorService = GlobalThreadPool.io, + vararg tasks: () -> T, + executor: ExecutorService = GlobalThreadPool.io, ): T = executor.invokeAny(tasks.map { Callable(it) }) /** * 执行全部任务,返回第一个成功完成的任务结果,其余任务取消 */ fun firstCompleted( - tasks: Collection<() -> T>, - executor: ExecutorService = GlobalThreadPool.io, + tasks: Collection<() -> T>, + executor: ExecutorService = GlobalThreadPool.io, ): T = executor.invokeAny(tasks.map { Callable(it) }) // ---- 集合工具 ---- @@ -100,13 +96,13 @@ fun awaitAll(futures: Collection>): List = futures.map { it.awa * 提交全部 Callable 并阻塞等待所有完成,任一失败抛出原始异常 */ fun ExecutorService.invokeAllAndGet(tasks: Collection>): List = - invokeAll(tasks).map { it.await() } + invokeAll(tasks).map { it.await() } /** * 等待所有 Future 完成,失败的任务返回 null(不中断整体流程) */ fun awaitAllOrNull(futures: Collection>): List = - futures.map { it.getOrNull() } + futures.map { it.getOrNull() } // ---- 重试 ---- @@ -121,33 +117,33 @@ fun awaitAllOrNull(futures: Collection>): List = * @param delayMillis 每次重试前的等待毫秒数 */ fun callWithRetry( - times: Int, - delayMillis: Long = 0, - task: () -> T, + times: Int, + delayMillis: Long = 0, + task: () -> T, ): T { - require(times >= 1) { "times must be >= 1: $times" } - var last: Throwable? = null - repeat(times) { attempt -> - try { - return task() - } catch (t: Throwable) { - last = t - // 最后一次失败不再等待 - if (attempt < times - 1 && delayMillis > 0) { - Thread.sleep(delayMillis) - } - } - } - throw last ?: IllegalStateException("unreachable") + require(times >= 1) { "times must be >= 1: $times" } + var last: Throwable? = null + repeat(times) { attempt -> + try { + return task() + } catch (t: Throwable) { + last = t + // 最后一次失败不再等待 + if (attempt < times - 1 && delayMillis > 0) { + Thread.sleep(delayMillis) + } + } + } + throw last ?: IllegalStateException("unreachable") } /** * 在全局 IO 池中带重试执行任务 */ fun callAsyncWithRetry( - times: Int, - delayMillis: Long = 0, - task: () -> T, + times: Int, + delayMillis: Long = 0, + task: () -> T, ): Future = GlobalThreadPool.io.submit(Callable { callWithRetry(times, delayMillis, task) }) // ---- 定时任务 ---- @@ -160,29 +156,29 @@ fun callAsyncWithRetry( * ``` */ fun delayRun( - delay: Long, - unit: TimeUnit = TimeUnit.MILLISECONDS, - action: () -> Unit, + delay: Long, + unit: TimeUnit = TimeUnit.MILLISECONDS, + action: () -> Unit, ): ScheduledFuture<*> = GlobalThreadPool.scheduled.schedule(action, delay, unit) /** * 以固定频率执行任务(周期 = 任务耗时 + [period]),全局定时池 */ fun scheduleWithFixedDelay( - period: Long, - unit: TimeUnit = TimeUnit.MILLISECONDS, - initialDelay: Long = 0, - action: () -> Unit, + period: Long, + unit: TimeUnit = TimeUnit.MILLISECONDS, + initialDelay: Long = 0, + action: () -> Unit, ): ScheduledFuture<*> = - GlobalThreadPool.scheduled.scheduleWithFixedDelay(action, initialDelay, period, unit) + GlobalThreadPool.scheduled.scheduleWithFixedDelay(action, initialDelay, period, unit) /** * 以固定频率执行任务(周期恒定为 [period]),全局定时池 */ fun scheduleAtFixedRate( - period: Long, - unit: TimeUnit = TimeUnit.MILLISECONDS, - initialDelay: Long = 0, - action: () -> Unit, + period: Long, + unit: TimeUnit = TimeUnit.MILLISECONDS, + initialDelay: Long = 0, + action: () -> Unit, ): ScheduledFuture<*> = - GlobalThreadPool.scheduled.scheduleAtFixedRate(action, initialDelay, period, unit) + GlobalThreadPool.scheduled.scheduleAtFixedRate(action, initialDelay, period, unit) diff --git a/src/main/kotlin/com/mingliqiye/utils/thread/GlobalThreadPool.kt b/src/main/kotlin/com/mingliqiye/utils/thread/GlobalThreadPool.kt index 72ead19..3ed0fab 100644 --- a/src/main/kotlin/com/mingliqiye/utils/thread/GlobalThreadPool.kt +++ b/src/main/kotlin/com/mingliqiye/utils/thread/GlobalThreadPool.kt @@ -40,58 +40,58 @@ import java.util.concurrent.ThreadPoolExecutor */ object GlobalThreadPool { - /** IO 密集型全局池:线程多、队列有界,适合网络/磁盘等阻塞任务 */ - val io: ThreadPoolExecutor by lazy { - threadPool("MingLiGlobalIO") { - corePoolSize = availableProcessors * 2 - maximumPoolSize = availableProcessors * 4 - boundedQueue(1024) - allowCoreThreadTimeout = true - daemon = true - } - } + /** IO 密集型全局池:线程多、队列有界,适合网络/磁盘等阻塞任务 */ + val io: ThreadPoolExecutor by lazy { + threadPool("MingLiGlobalIO") { + corePoolSize = availableProcessors * 2 + maximumPoolSize = availableProcessors * 4 + boundedQueue(1024) + allowCoreThreadTimeout = true + daemon = true + } + } - /** CPU 密集型全局池:线程数等于核数,适合纯计算任务 */ - val cpu: ThreadPoolExecutor by lazy { - threadPool("MingLiGlobalCPU") { - corePoolSize = availableProcessors - maximumPoolSize = availableProcessors - daemon = true - } - } + /** CPU 密集型全局池:线程数等于核数,适合纯计算任务 */ + val cpu: ThreadPoolExecutor by lazy { + threadPool("MingLiGlobalCPU") { + corePoolSize = availableProcessors + maximumPoolSize = availableProcessors + daemon = true + } + } - /** 全局定时任务池 */ - val scheduled: ScheduledThreadPoolExecutor by lazy { - // 包装一层将定时线程设为守护线程,避免阻塞 JVM 退出 - val base = NamedThreadFactory.of("MingLiGlobalScheduled") - ScheduledThreadPoolExecutor( - (availableProcessors / 2).coerceAtLeast(1), - ) { runnable -> base.newThread(runnable).apply { isDaemon = true } } - } + /** 全局定时任务池 */ + val scheduled: ScheduledThreadPoolExecutor by lazy { + // 包装一层将定时线程设为守护线程,避免阻塞 JVM 退出 + val base = NamedThreadFactory.of("MingLiGlobalScheduled") + ScheduledThreadPoolExecutor( + (availableProcessors / 2).coerceAtLeast(1), + ) { runnable -> base.newThread(runnable).apply { isDaemon = true } } + } - // ---- 便捷提交 ---- + // ---- 便捷提交 ---- - @JvmStatic - fun execute(runnable: Runnable): Future<*> = io.submit(runnable) + @JvmStatic + fun execute(runnable: Runnable): Future<*> = io.submit(runnable) - @JvmStatic - fun submit(callable: Callable): Future = io.submit(callable) + @JvmStatic + fun submit(callable: Callable): Future = io.submit(callable) - @JvmStatic - fun submit(runnable: Runnable): Future<*> = io.submit(runnable) + @JvmStatic + fun submit(runnable: Runnable): Future<*> = io.submit(runnable) - @JvmStatic - fun submit(runnable: Runnable, result: T): Future = io.submit(runnable, result) + @JvmStatic + fun submit(runnable: Runnable, result: T): Future = io.submit(runnable, result) - /** - * 优雅关闭全部线程池(先正常关闭,超时后强制关闭) - */ - @JvmStatic - fun shutdownAll() { - io.shutdownGracefully() - cpu.shutdownGracefully() - scheduled.shutdownGracefully() - } + /** + * 优雅关闭全部线程池(先正常关闭,超时后强制关闭) + */ + @JvmStatic + fun shutdownAll() { + io.shutdownGracefully() + cpu.shutdownGracefully() + scheduled.shutdownGracefully() + } } /** @@ -113,7 +113,7 @@ fun computeAsync(block: () -> T): Future = GlobalThreadPool.cpu.submit(Ca * 在全局 IO 池执行任务并阻塞等待完成 */ fun runAsyncAwait(block: () -> Unit) { - GlobalThreadPool.io.submit(block).get() + GlobalThreadPool.io.submit(block).get() } /** diff --git a/src/main/kotlin/com/mingliqiye/utils/thread/ThreadEvent.kt b/src/main/kotlin/com/mingliqiye/utils/thread/ThreadEvent.kt index 8edeebb..11abcd6 100644 --- a/src/main/kotlin/com/mingliqiye/utils/thread/ThreadEvent.kt +++ b/src/main/kotlin/com/mingliqiye/utils/thread/ThreadEvent.kt @@ -36,127 +36,127 @@ import kotlin.reflect.KProperty */ open class ThreadEvent : ReadWriteProperty { - private var latch = CountDownLatch(1) + private var latch = CountDownLatch(1) - @Volatile - private var data: T + @Volatile + private var data: T - constructor(data: T) { - this.data = data - } + constructor(data: T) { + this.data = data + } - /** - * 获取当前事件状态 - * - * @return 当前事件的数据值,如果未设置则返回null - */ - fun get(): T = data + /** + * 获取当前事件状态 + * + * @return 当前事件的数据值,如果未设置则返回null + */ + fun get(): T = data - /** - * 设置事件数据并释放等待的线程 - * - * @param data 要设置的事件数据 - */ - @Synchronized - fun set(data: T) { - this.data = data - latch.countDown() - } + /** + * 设置事件数据并释放等待的线程 + * + * @param data 要设置的事件数据 + */ + @Synchronized + fun set(data: T) { + this.data = data + latch.countDown() + } - /** - * 重置事件状态,重新初始化CountDownLatch - */ - @Synchronized - fun reset() { - latch = CountDownLatch(1) - } + /** + * 重置事件状态,重新初始化CountDownLatch + */ + @Synchronized + fun reset() { + latch = CountDownLatch(1) + } - /** - * 等待事件被设置,阻塞当前线程直到事件被触发 - */ - fun await() { - latch.await() - } + /** + * 等待事件被设置,阻塞当前线程直到事件被触发 + */ + fun await() { + latch.await() + } - /** - * 等待事件被设置并获取数据 - * - * @return 事件数据,当事件被设置后返回对应的数据 - */ - fun awaitAndGet(): T { - await() - return data - } + /** + * 等待事件被设置并获取数据 + * + * @return 事件数据,当事件被设置后返回对应的数据 + */ + fun awaitAndGet(): T { + await() + return data + } - /** - * 在指定超时时间内等待事件被设置并获取数据 - * - * @param timeout 等待超时时间 - * @param unit 时间单位 - * @return 事件数据,如果在超时时间内事件被设置则返回数据,否则返回null - */ - fun awaitAndGet(timeout: Long, unit: TimeUnit): T? { - await(timeout, unit) - return data - } + /** + * 在指定超时时间内等待事件被设置并获取数据 + * + * @param timeout 等待超时时间 + * @param unit 时间单位 + * @return 事件数据,如果在超时时间内事件被设置则返回数据,否则返回null + */ + fun awaitAndGet(timeout: Long, unit: TimeUnit): T? { + await(timeout, unit) + return data + } - /** - * 等待事件被设置并获取数据,超时返回 null - * - * @param timeout 等待超时时间 - * @param unit 时间单位 - * @return 事件数据;超时未触发则返回 null - */ - fun awaitAndGetOrNull(timeout: Long, unit: TimeUnit): T? = - if (await(timeout, unit)) data else null + /** + * 等待事件被设置并获取数据,超时返回 null + * + * @param timeout 等待超时时间 + * @param unit 时间单位 + * @return 事件数据;超时未触发则返回 null + */ + fun awaitAndGetOrNull(timeout: Long, unit: TimeUnit): T? = + if (await(timeout, unit)) data else null - /** - * 在指定超时时间内等待事件被设置 - * - * @param timeout 等待超时时间 - * @param unit 时间单位 - * @return 如果在超时时间内事件被设置则返回true,否则返回false - */ - fun await(timeout: Long, unit: TimeUnit): Boolean { - return latch.await(timeout, unit) - } + /** + * 在指定超时时间内等待事件被设置 + * + * @param timeout 等待超时时间 + * @param unit 时间单位 + * @return 如果在超时时间内事件被设置则返回true,否则返回false + */ + fun await(timeout: Long, unit: TimeUnit): Boolean { + return latch.await(timeout, unit) + } - /** - * 事件是否已被设置(自上次 [reset] 以来) - */ - fun isSet(): Boolean = latch.count == 0L + /** + * 事件是否已被设置(自上次 [reset] 以来) + */ + fun isSet(): Boolean = latch.count == 0L - fun setAndReset(data: T) { - set(data) - reset() - } + fun setAndReset(data: T) { + set(data) + reset() + } - // ---- Kotlin 便捷语法 ---- + // ---- Kotlin 便捷语法 ---- - /** 读取事件数据:`val d = event()` */ - operator fun invoke(): T = data + /** 读取事件数据:`val d = event()` */ + operator fun invoke(): T = data - /** 设置事件数据并唤醒等待线程:`event(newData)` */ - operator fun invoke(data: T) = set(data) + /** 设置事件数据并唤醒等待线程:`event(newData)` */ + operator fun invoke(data: T) = set(data) - /** 支持属性委托:`var value by event` */ - override operator fun getValue(thisRef: Any?, property: KProperty<*>): T = data + /** 支持属性委托:`var value by event` */ + override operator fun getValue(thisRef: Any?, property: KProperty<*>): T = data - /** 支持属性委托:`value = newData` 等价于 [set] */ - override operator fun setValue(thisRef: Any?, property: KProperty<*>, value: T) = set(value) + /** 支持属性委托:`value = newData` 等价于 [set] */ + override operator fun setValue(thisRef: Any?, property: KProperty<*>, value: T) = set(value) - /** - * 以自身为委托,返回属性委托视图 - */ - fun asDelegate(): ReadWriteProperty = this + /** + * 以自身为委托,返回属性委托视图 + */ + fun asDelegate(): ReadWriteProperty = this - companion object { - /** - * 创建事件实例 - * - * @param data 初始数据 - */ - @JvmStatic - fun of(data: T): ThreadEvent = ThreadEvent(data) - } + companion object { + /** + * 创建事件实例 + * + * @param data 初始数据 + */ + @JvmStatic + fun of(data: T): ThreadEvent = ThreadEvent(data) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/thread/ThreadExt.kt b/src/main/kotlin/com/mingliqiye/utils/thread/ThreadExt.kt index a8aa26a..243ef9c 100644 --- a/src/main/kotlin/com/mingliqiye/utils/thread/ThreadExt.kt +++ b/src/main/kotlin/com/mingliqiye/utils/thread/ThreadExt.kt @@ -36,27 +36,27 @@ package com.mingliqiye.utils.thread * @param uncaughtHandler 未捕获异常处理器 */ fun Runnable.startThread( - name: String? = null, - daemon: Boolean = true, - uncaughtHandler: Thread.UncaughtExceptionHandler? = null, + name: String? = null, + daemon: Boolean = true, + uncaughtHandler: Thread.UncaughtExceptionHandler? = null, ): Thread = Thread(this).apply { - if (name != null) this.name = name - isDaemon = daemon - if (uncaughtHandler != null) setUncaughtExceptionHandler(uncaughtHandler) - start() + if (name != null) this.name = name + isDaemon = daemon + if (uncaughtHandler != null) setUncaughtExceptionHandler(uncaughtHandler) + start() } /** * 将 [Runnable] 包装为新线程但不启动 */ fun Runnable.asThread( - name: String? = null, - daemon: Boolean = true, - uncaughtHandler: Thread.UncaughtExceptionHandler? = null, + name: String? = null, + daemon: Boolean = true, + uncaughtHandler: Thread.UncaughtExceptionHandler? = null, ): Thread = Thread(this).apply { - if (name != null) this.name = name - isDaemon = daemon - if (uncaughtHandler != null) setUncaughtExceptionHandler(uncaughtHandler) + if (name != null) this.name = name + isDaemon = daemon + if (uncaughtHandler != null) setUncaughtExceptionHandler(uncaughtHandler) } // ---- Thread 扩展 ---- @@ -69,31 +69,31 @@ fun Runnable.asThread( * ``` */ fun Thread.onUncaught(action: (Thread, Throwable) -> Unit): Thread = apply { - setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler { t, e -> action(t, e) }) + setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler { t, e -> action(t, e) }) } /** * 安静休眠:忽略中断,但恢复线程中断状态以便上层感知 */ fun Thread.sleepQuietly(millis: Long, nanos: Int = 0) { - try { - Thread.sleep(millis, nanos) - } catch (_: InterruptedException) { - interrupt() // 恢复中断标志 - } + try { + Thread.sleep(millis, nanos) + } catch (_: InterruptedException) { + interrupt() // 恢复中断标志 + } } /** * 若线程尚未启动则启动,返回自身(链式风格);已终止线程无法重启,静默忽略。 */ fun Thread.startIfNotStarted(): Thread { - if (isAlive) return this - return try { - start() - this - } catch (_: IllegalThreadStateException) { - this - } + if (isAlive) return this + return try { + start() + this + } catch (_: IllegalThreadStateException) { + this + } } /** @@ -102,20 +102,20 @@ fun Thread.startIfNotStarted(): Thread { * @return 是否在中断前正常结束 */ fun Thread.joinQuietly(millis: Long = 0): Boolean = try { - join(millis) - !isAlive + join(millis) + !isAlive } catch (_: InterruptedException) { - false + false } /** * 转储线程调用栈(便于排查卡死问题) */ fun Thread.dumpStackTrace(): String = buildString { - append("thread [").append(name).append("] state=").append(state) - stackTrace.forEach { element -> - append("\n\tat ").append(element) - } + append("thread [").append(name).append("] state=").append(state) + stackTrace.forEach { element -> + append("\n\tat ").append(element) + } } // ---- 顶层便捷函数 ---- @@ -128,35 +128,35 @@ fun Thread.dumpStackTrace(): String = buildString { * ``` */ fun daemonThread( - name: String = "MingLiDaemon", - start: Boolean = true, - uncaughtHandler: Thread.UncaughtExceptionHandler? = null, - block: () -> Unit, + name: String = "MingLiDaemon", + start: Boolean = true, + uncaughtHandler: Thread.UncaughtExceptionHandler? = null, + block: () -> Unit, ): Thread = Thread(block, name).apply { - isDaemon = true - if (uncaughtHandler != null) setUncaughtExceptionHandler(uncaughtHandler) - if (start) start() + isDaemon = true + if (uncaughtHandler != null) setUncaughtExceptionHandler(uncaughtHandler) + if (start) start() } /** * 创建非守护线程 */ fun userThread( - name: String = "MingLiUser", - start: Boolean = true, - uncaughtHandler: Thread.UncaughtExceptionHandler? = null, - block: () -> Unit, + name: String = "MingLiUser", + start: Boolean = true, + uncaughtHandler: Thread.UncaughtExceptionHandler? = null, + block: () -> Unit, ): Thread = Thread(block, name).apply { - isDaemon = false - if (uncaughtHandler != null) setUncaughtExceptionHandler(uncaughtHandler) - if (start) start() + isDaemon = false + if (uncaughtHandler != null) setUncaughtExceptionHandler(uncaughtHandler) + if (start) start() } /** * 便捷构造未捕获异常处理器 */ fun uncaughtExceptionHandler(action: (Thread, Throwable) -> Unit): Thread.UncaughtExceptionHandler = - Thread.UncaughtExceptionHandler { t, e -> action(t, e) } + Thread.UncaughtExceptionHandler { t, e -> action(t, e) } /** * 获取当前线程 diff --git a/src/main/kotlin/com/mingliqiye/utils/thread/ThreadLocalDelegates.kt b/src/main/kotlin/com/mingliqiye/utils/thread/ThreadLocalDelegates.kt index 64455be..d8f1e4b 100644 --- a/src/main/kotlin/com/mingliqiye/utils/thread/ThreadLocalDelegates.kt +++ b/src/main/kotlin/com/mingliqiye/utils/thread/ThreadLocalDelegates.kt @@ -39,16 +39,16 @@ import kotlin.reflect.KProperty * 每个线程读写互不影响,切换线程后自动获得新线程的隔离值。 */ class ThreadLocalDelegate( - private val threadLocal: ThreadLocal, + private val threadLocal: ThreadLocal, ) : ReadWriteProperty { - override fun getValue(thisRef: Any?, property: KProperty<*>): T = threadLocal.get() + override fun getValue(thisRef: Any?, property: KProperty<*>): T = threadLocal.get() - override fun setValue(thisRef: Any?, property: KProperty<*>, value: T) { - threadLocal.set(value) - } + override fun setValue(thisRef: Any?, property: KProperty<*>, value: T) { + threadLocal.set(value) + } - override fun toString(): String = threadLocal.toString() + override fun toString(): String = threadLocal.toString() } /** @@ -57,7 +57,7 @@ class ThreadLocalDelegate( * @param initial 每个线程首次访问时的初始化器 */ fun threadLocal(initial: () -> T): ThreadLocalDelegate = - ThreadLocalDelegate(ThreadLocal.withInitial(Supplier(initial))) + ThreadLocalDelegate(ThreadLocal.withInitial(Supplier(initial))) /** * 创建无初始值的线程局部属性委托,属性类型需声明为可空: @@ -67,7 +67,7 @@ fun threadLocal(initial: () -> T): ThreadLocalDelegate = * ``` */ fun nullableThreadLocal(): ThreadLocalDelegate = - ThreadLocalDelegate(ThreadLocal()) + ThreadLocalDelegate(ThreadLocal()) /** * 将已有 [ThreadLocal] 实例包装为属性委托 diff --git a/src/main/kotlin/com/mingliqiye/utils/thread/ThreadPoolBuilder.kt b/src/main/kotlin/com/mingliqiye/utils/thread/ThreadPoolBuilder.kt index cb96154..59e0e16 100644 --- a/src/main/kotlin/com/mingliqiye/utils/thread/ThreadPoolBuilder.kt +++ b/src/main/kotlin/com/mingliqiye/utils/thread/ThreadPoolBuilder.kt @@ -24,15 +24,7 @@ package com.mingliqiye.utils.thread import com.mingliqiye.utils.netty.NamedThreadFactory import com.mingliqiye.utils.system.availableProcessors -import java.util.concurrent.ArrayBlockingQueue -import java.util.concurrent.BlockingQueue -import java.util.concurrent.LinkedBlockingQueue -import java.util.concurrent.RejectedExecutionHandler -import java.util.concurrent.ScheduledThreadPoolExecutor -import java.util.concurrent.SynchronousQueue -import java.util.concurrent.ThreadFactory -import java.util.concurrent.ThreadPoolExecutor -import java.util.concurrent.TimeUnit +import java.util.concurrent.* /** * 线程池构建器,采用链式 + DSL 风格配置 [ThreadPoolExecutor]。 @@ -53,102 +45,102 @@ import java.util.concurrent.TimeUnit */ class ThreadPoolBuilder internal constructor() { - /** 线程池名称,用于线程命名 */ - var name: String = "MingLiPool" + /** 线程池名称,用于线程命名 */ + var name: String = "MingLiPool" - /** 核心线程数,默认 CPU 核数 */ - var corePoolSize: Int = availableProcessors + /** 核心线程数,默认 CPU 核数 */ + var corePoolSize: Int = availableProcessors - /** 最大线程数,默认 CPU 核数 x2 */ - var maximumPoolSize: Int = availableProcessors * 2 + /** 最大线程数,默认 CPU 核数 x2 */ + var maximumPoolSize: Int = availableProcessors * 2 - /** 非核心线程空闲存活时间(秒) */ - var keepAliveSeconds: Long = 60 + /** 非核心线程空闲存活时间(秒) */ + var keepAliveSeconds: Long = 60 - /** 是否允许核心线程空闲超时回收 */ - var allowCoreThreadTimeout: Boolean = false + /** 是否允许核心线程空闲超时回收 */ + var allowCoreThreadTimeout: Boolean = false - /** 任务队列容量,<= 0 表示使用无界队列 */ - var queueCapacity: Int = 0 + /** 任务队列容量,<= 0 表示使用无界队列 */ + var queueCapacity: Int = 0 - /** 工作队列,设置 [queueCapacity] 后将被覆盖 */ - var workQueue: BlockingQueue = LinkedBlockingQueue() + /** 工作队列,设置 [queueCapacity] 后将被覆盖 */ + var workQueue: BlockingQueue = LinkedBlockingQueue() - /** 线程是否为守护线程 */ - var daemon: Boolean = false + /** 线程是否为守护线程 */ + var daemon: Boolean = false - /** 线程优先级 */ - var priority: Int = Thread.NORM_PRIORITY + /** 线程优先级 */ + var priority: Int = Thread.NORM_PRIORITY - /** 任务拒绝策略,默认由调用线程执行 */ - var rejectedHandler: RejectedExecutionHandler = ThreadPoolExecutor.CallerRunsPolicy() + /** 任务拒绝策略,默认由调用线程执行 */ + var rejectedHandler: RejectedExecutionHandler = ThreadPoolExecutor.CallerRunsPolicy() - /** 未捕获异常处理器 */ - var uncaughtHandler: Thread.UncaughtExceptionHandler? = null + /** 未捕获异常处理器 */ + var uncaughtHandler: Thread.UncaughtExceptionHandler? = null - /** 自定义线程工厂,默认使用 [NamedThreadFactory] */ - var threadFactory: ThreadFactory? = null + /** 自定义线程工厂,默认使用 [NamedThreadFactory] */ + var threadFactory: ThreadFactory? = null - /** - * 使用无界队列(默认行为) - */ - fun unboundedQueue(): ThreadPoolBuilder = apply { - queueCapacity = 0 - workQueue = LinkedBlockingQueue() - } + /** + * 使用无界队列(默认行为) + */ + fun unboundedQueue(): ThreadPoolBuilder = apply { + queueCapacity = 0 + workQueue = LinkedBlockingQueue() + } - /** - * 使用有界队列 - * - * @param capacity 队列容量,必须大于 0 - */ - fun boundedQueue(capacity: Int): ThreadPoolBuilder = apply { - require(capacity > 0) { "queue capacity must be positive: $capacity" } - queueCapacity = capacity - workQueue = ArrayBlockingQueue(capacity) - } + /** + * 使用有界队列 + * + * @param capacity 队列容量,必须大于 0 + */ + fun boundedQueue(capacity: Int): ThreadPoolBuilder = apply { + require(capacity > 0) { "queue capacity must be positive: $capacity" } + queueCapacity = capacity + workQueue = ArrayBlockingQueue(capacity) + } - /** - * 使用同步队列,任务直接交接给线程(适合缓存线程池场景) - */ - fun synchronousQueue(): ThreadPoolBuilder = apply { - queueCapacity = 1 - workQueue = SynchronousQueue() - } + /** + * 使用同步队列,任务直接交接给线程(适合缓存线程池场景) + */ + fun synchronousQueue(): ThreadPoolBuilder = apply { + queueCapacity = 1 + workQueue = SynchronousQueue() + } - /** - * 构建线程池 - * - * @return 配置完成的 [ThreadPoolExecutor] - */ - fun build(): ThreadPoolExecutor { - val baseFactory = threadFactory ?: NamedThreadFactory.of(name) - // 提取局部变量,避免 apply 块内与 Thread 自身属性混淆 - val daemonThread = daemon - val threadPriority = priority - val exceptionHandler = uncaughtHandler - // 需要定制 daemon/priority/异常处理时包装一层,否则直接复用 - val factory = if (daemonThread || threadPriority != Thread.NORM_PRIORITY || exceptionHandler != null) { - ThreadFactory { runnable -> - baseFactory.newThread(runnable).apply { - isDaemon = daemonThread - this.priority = threadPriority - exceptionHandler?.let { setUncaughtExceptionHandler(it) } - } - } - } else baseFactory - return ThreadPoolExecutor( - corePoolSize, - maximumPoolSize, - keepAliveSeconds, - TimeUnit.SECONDS, - workQueue, - factory, - rejectedHandler, - ).apply { - if (allowCoreThreadTimeout) allowCoreThreadTimeOut(true) - } - } + /** + * 构建线程池 + * + * @return 配置完成的 [ThreadPoolExecutor] + */ + fun build(): ThreadPoolExecutor { + val baseFactory = threadFactory ?: NamedThreadFactory.of(name) + // 提取局部变量,避免 apply 块内与 Thread 自身属性混淆 + val daemonThread = daemon + val threadPriority = priority + val exceptionHandler = uncaughtHandler + // 需要定制 daemon/priority/异常处理时包装一层,否则直接复用 + val factory = if (daemonThread || threadPriority != Thread.NORM_PRIORITY || exceptionHandler != null) { + ThreadFactory { runnable -> + baseFactory.newThread(runnable).apply { + isDaemon = daemonThread + this.priority = threadPriority + exceptionHandler?.let { setUncaughtExceptionHandler(it) } + } + } + } else baseFactory + return ThreadPoolExecutor( + corePoolSize, + maximumPoolSize, + keepAliveSeconds, + TimeUnit.SECONDS, + workQueue, + factory, + rejectedHandler, + ).apply { + if (allowCoreThreadTimeout) allowCoreThreadTimeOut(true) + } + } } /** @@ -165,61 +157,61 @@ class ThreadPoolBuilder internal constructor() { * @param configure 配置块 */ fun threadPool( - name: String = "MingLiPool", - configure: ThreadPoolBuilder.() -> Unit = {}, + name: String = "MingLiPool", + configure: ThreadPoolBuilder.() -> Unit = {}, ): ThreadPoolExecutor = ThreadPoolBuilder().apply { - this.name = name - configure() + this.name = name + configure() }.build() /** * 创建固定大小线程池,任务队列无界 */ fun fixedThreadPool(size: Int, name: String = "MingLiFixedPool"): ThreadPoolExecutor = - threadPool(name) { - corePoolSize = size - maximumPoolSize = size - } + threadPool(name) { + corePoolSize = size + maximumPoolSize = size + } /** * 创建单线程池,保证任务串行执行 */ fun singleThreadPool(name: String = "MingLiSinglePool"): ThreadPoolExecutor = - threadPool(name) { - corePoolSize = 1 - maximumPoolSize = 1 - } + threadPool(name) { + corePoolSize = 1 + maximumPoolSize = 1 + } /** * 创建缓存线程池,空闲线程 60 秒后回收 */ fun cachedThreadPool(name: String = "MingLiCachedPool"): ThreadPoolExecutor = - threadPool(name) { - corePoolSize = 0 - maximumPoolSize = Int.MAX_VALUE - keepAliveSeconds = 60 - synchronousQueue() - } + threadPool(name) { + corePoolSize = 0 + maximumPoolSize = Int.MAX_VALUE + keepAliveSeconds = 60 + synchronousQueue() + } /** * 创建 IO 密集型线程池:更多线程 + 有界队列 */ fun ioThreadPool(name: String = "MingLiIoPool"): ThreadPoolExecutor = - threadPool(name) { - corePoolSize = availableProcessors * 2 - maximumPoolSize = availableProcessors * 4 - boundedQueue(1024) - allowCoreThreadTimeout = true - } + threadPool(name) { + corePoolSize = availableProcessors * 2 + maximumPoolSize = availableProcessors * 4 + boundedQueue(1024) + allowCoreThreadTimeout = true + } /** * 创建 CPU 密集型线程池:线程数等于核数,避免上下文切换开销 */ fun cpuThreadPool(name: String = "MingLiCpuPool"): ThreadPoolExecutor = - threadPool(name) { - corePoolSize = availableProcessors - maximumPoolSize = availableProcessors - } + threadPool(name) { + corePoolSize = availableProcessors + maximumPoolSize = availableProcessors + } /** * 创建定时任务线程池 @@ -228,7 +220,7 @@ fun cpuThreadPool(name: String = "MingLiCpuPool"): ThreadPoolExecutor = * @param name 线程池名称 */ fun scheduledThreadPool( - coreSize: Int = (availableProcessors / 2).coerceAtLeast(1), - name: String = "MingLiScheduledPool", + coreSize: Int = (availableProcessors / 2).coerceAtLeast(1), + name: String = "MingLiScheduledPool", ): ScheduledThreadPoolExecutor = - ScheduledThreadPoolExecutor(coreSize, NamedThreadFactory.of(name)) + ScheduledThreadPoolExecutor(coreSize, NamedThreadFactory.of(name)) diff --git a/src/main/kotlin/com/mingliqiye/utils/thread/ThreadPoolExt.kt b/src/main/kotlin/com/mingliqiye/utils/thread/ThreadPoolExt.kt index 02218fc..f1526ba 100644 --- a/src/main/kotlin/com/mingliqiye/utils/thread/ThreadPoolExt.kt +++ b/src/main/kotlin/com/mingliqiye/utils/thread/ThreadPoolExt.kt @@ -22,13 +22,7 @@ package com.mingliqiye.utils.thread -import java.util.concurrent.CompletableFuture -import java.util.concurrent.ExecutionException -import java.util.concurrent.Executor -import java.util.concurrent.ExecutorService -import java.util.concurrent.Future -import java.util.concurrent.TimeUnit -import java.util.concurrent.TimeoutException +import java.util.concurrent.* import java.util.function.Supplier // ---- ExecutorService 扩展 ---- @@ -43,13 +37,13 @@ import java.util.function.Supplier * @return 线程池是否在超时前正常终止 */ fun ExecutorService.shutdownGracefully( - timeout: Long = 30, - unit: TimeUnit = TimeUnit.SECONDS, + timeout: Long = 30, + unit: TimeUnit = TimeUnit.SECONDS, ): Boolean { - shutdown() - if (awaitTermination(timeout, unit)) return true - shutdownNow() - return awaitTermination(timeout, unit) + shutdown() + if (awaitTermination(timeout, unit)) return true + shutdownNow() + return awaitTermination(timeout, unit) } /** @@ -58,12 +52,12 @@ fun ExecutorService.shutdownGracefully( * @throws IllegalStateException 线程池未能在超时时间内终止 */ fun ExecutorService.shutdownAndAwait( - timeout: Long = 30, - unit: TimeUnit = TimeUnit.SECONDS, + timeout: Long = 30, + unit: TimeUnit = TimeUnit.SECONDS, ) { - check(shutdownGracefully(timeout, unit)) { - "executor did not terminate within $timeout $unit" - } + check(shutdownGracefully(timeout, unit)) { + "executor did not terminate within $timeout $unit" + } } // ---- Future 扩展 ---- @@ -72,48 +66,48 @@ fun ExecutorService.shutdownAndAwait( * 阻塞等待任务完成并返回结果;[ExecutionException] 自动解包抛出原始异常。 */ fun Future.await(): T = try { - get() + get() } catch (e: ExecutionException) { - throw e.cause ?: e + throw e.cause ?: e } /** * 阻塞等待任务完成,返回结果;超时或执行失败返回 null。 */ fun Future.getOrNull( - timeout: Long = Long.MAX_VALUE, - unit: TimeUnit = TimeUnit.MILLISECONDS, + timeout: Long = Long.MAX_VALUE, + unit: TimeUnit = TimeUnit.MILLISECONDS, ): T? = try { - get(timeout, unit) + get(timeout, unit) } catch (_: Exception) { - null + null } /** * 阻塞等待任务完成,失败或超时返回默认值。 */ fun Future.getOrDefault( - default: T, - timeout: Long = Long.MAX_VALUE, - unit: TimeUnit = TimeUnit.MILLISECONDS, + default: T, + timeout: Long = Long.MAX_VALUE, + unit: TimeUnit = TimeUnit.MILLISECONDS, ): T = getOrNull(timeout, unit) ?: default /** * 非阻塞取消任务 */ fun Future<*>.cancelQuietly(): Boolean = try { - cancel(true) + cancel(true) } catch (_: Exception) { - false + false } /** * 带超时等待:超时抛出 [TimeoutException],失败抛出原始异常 */ fun Future.await(timeout: Long, unit: TimeUnit): T = try { - get(timeout, unit) + get(timeout, unit) } catch (e: ExecutionException) { - throw e.cause ?: e + throw e.cause ?: e } // ---- CompletableFuture 便捷创建 ---- @@ -129,22 +123,22 @@ fun Future.await(timeout: Long, unit: TimeUnit): T = try { * @param executor 执行任务的线程池,默认使用公共 ForkJoinPool */ fun completableFuture( - executor: Executor? = null, - block: () -> T, + executor: Executor? = null, + block: () -> T, ): CompletableFuture = if (executor == null) { - CompletableFuture.supplyAsync(Supplier(block)) + CompletableFuture.supplyAsync(Supplier(block)) } else { - CompletableFuture.supplyAsync(Supplier(block), executor) + CompletableFuture.supplyAsync(Supplier(block), executor) } /** * 在指定线程池创建无返回值 [CompletableFuture] */ fun runCompletableFuture( - executor: Executor? = null, - block: () -> Unit, + executor: Executor? = null, + block: () -> Unit, ): CompletableFuture = if (executor == null) { - CompletableFuture.runAsync(block) + CompletableFuture.runAsync(block) } else { - CompletableFuture.runAsync(block, executor) + CompletableFuture.runAsync(block, executor) } diff --git a/src/main/kotlin/com/mingliqiye/utils/thread/ThreadPoolMonitor.kt b/src/main/kotlin/com/mingliqiye/utils/thread/ThreadPoolMonitor.kt index 737e929..3d9862a 100644 --- a/src/main/kotlin/com/mingliqiye/utils/thread/ThreadPoolMonitor.kt +++ b/src/main/kotlin/com/mingliqiye/utils/thread/ThreadPoolMonitor.kt @@ -31,68 +31,68 @@ import java.util.concurrent.TimeUnit * 线程池运行快照,一次调用获取全部关键指标。 */ data class ThreadPoolSnapshot( - /** 当前线程数 */ - val poolSize: Int, - /** 核心线程数 */ - val corePoolSize: Int, - /** 最大线程数 */ - val maximumPoolSize: Int, - /** 历史最大线程数 */ - val largestPoolSize: Int, - /** 正在执行任务的线程数 */ - val activeThreads: Int, - /** 队列中等待执行的任务数 */ - val queueSize: Int, - /** 队列剩余容量(无界队列为 [Int.MAX_VALUE]) */ - val queueRemainingCapacity: Int, - /** 已完成任务数 */ - val completedTasks: Long, - /** 已提交任务总数 */ - val totalTasks: Long, - /** 是否已调用 shutdown */ - val isShutdown: Boolean, - /** 是否已终止 */ - val isTerminated: Boolean, + /** 当前线程数 */ + val poolSize: Int, + /** 核心线程数 */ + val corePoolSize: Int, + /** 最大线程数 */ + val maximumPoolSize: Int, + /** 历史最大线程数 */ + val largestPoolSize: Int, + /** 正在执行任务的线程数 */ + val activeThreads: Int, + /** 队列中等待执行的任务数 */ + val queueSize: Int, + /** 队列剩余容量(无界队列为 [Int.MAX_VALUE]) */ + val queueRemainingCapacity: Int, + /** 已完成任务数 */ + val completedTasks: Long, + /** 已提交任务总数 */ + val totalTasks: Long, + /** 是否已调用 shutdown */ + val isShutdown: Boolean, + /** 是否已终止 */ + val isTerminated: Boolean, ) { - /** 线程利用率 = 活跃线程 / 最大线程,取值 [0.0, 1.0] */ - val utilization: Double - get() = if (maximumPoolSize <= 0) 0.0 - else activeThreads.toDouble() / maximumPoolSize + /** 线程利用率 = 活跃线程 / 最大线程,取值 [0.0, 1.0] */ + val utilization: Double + get() = if (maximumPoolSize <= 0) 0.0 + else activeThreads.toDouble() / maximumPoolSize - /** 队列积压率 = 队列任务 / 队列容量,无界队列返回 0.0 */ - val queueLoad: Double - get() { - val capacity = queueSize + queueRemainingCapacity - return if (capacity <= 0 || capacity == Int.MAX_VALUE) 0.0 - else queueSize.toDouble() / capacity - } + /** 队列积压率 = 队列任务 / 队列容量,无界队列返回 0.0 */ + val queueLoad: Double + get() { + val capacity = queueSize + queueRemainingCapacity + return if (capacity <= 0 || capacity == Int.MAX_VALUE) 0.0 + else queueSize.toDouble() / capacity + } - override fun toString(): String = buildString { - append("ThreadPoolSnapshot[") - append("size=$poolSize/$maximumPoolSize(core=$corePoolSize,largest=$largestPoolSize)") - append(",active=$activeThreads,util=${"%.1f".format(utilization * 100)}%") - append(",queue=$queueSize,load=${"%.1f".format(queueLoad * 100)}%") - append(",done=$completedTasks/$totalTasks") - append(",shutdown=$isShutdown,terminated=$isTerminated") - append("]") - } + override fun toString(): String = buildString { + append("ThreadPoolSnapshot[") + append("size=$poolSize/$maximumPoolSize(core=$corePoolSize,largest=$largestPoolSize)") + append(",active=$activeThreads,util=${"%.1f".format(utilization * 100)}%") + append(",queue=$queueSize,load=${"%.1f".format(queueLoad * 100)}%") + append(",done=$completedTasks/$totalTasks") + append(",shutdown=$isShutdown,terminated=$isTerminated") + append("]") + } } /** * 获取线程池当前运行快照 */ fun ThreadPoolExecutor.snapshot(): ThreadPoolSnapshot = ThreadPoolSnapshot( - poolSize = poolSize, - corePoolSize = corePoolSize, - maximumPoolSize = maximumPoolSize, - largestPoolSize = largestPoolSize, - activeThreads = activeCount, - queueSize = queue.size, - queueRemainingCapacity = queue.remainingCapacity(), - completedTasks = completedTaskCount, - totalTasks = taskCount, - isShutdown = isShutdown, - isTerminated = isTerminated, + poolSize = poolSize, + corePoolSize = corePoolSize, + maximumPoolSize = maximumPoolSize, + largestPoolSize = largestPoolSize, + activeThreads = activeCount, + queueSize = queue.size, + queueRemainingCapacity = queue.remainingCapacity(), + completedTasks = completedTaskCount, + totalTasks = taskCount, + isShutdown = isShutdown, + isTerminated = isTerminated, ) /** @@ -111,12 +111,12 @@ fun ThreadPoolExecutor.snapshot(): ThreadPoolSnapshot = ThreadPoolSnapshot( * @return 可取消的定时任务句柄 */ fun ThreadPoolExecutor.monitor( - interval: Long, - unit: TimeUnit = TimeUnit.SECONDS, - scheduler: ScheduledExecutorService = GlobalThreadPool.scheduled, - action: (ThreadPoolSnapshot) -> Unit, + interval: Long, + unit: TimeUnit = TimeUnit.SECONDS, + scheduler: ScheduledExecutorService = GlobalThreadPool.scheduled, + action: (ThreadPoolSnapshot) -> Unit, ): ScheduledFuture<*> = - scheduler.scheduleAtFixedRate({ action(snapshot()) }, interval, interval, unit) + scheduler.scheduleAtFixedRate({ action(snapshot()) }, interval, interval, unit) /** * 打印线程池运行报告(多行字符串) diff --git a/src/main/kotlin/com/mingliqiye/utils/thread/ThreadRunner.kt b/src/main/kotlin/com/mingliqiye/utils/thread/ThreadRunner.kt index 01c0604..b6532e2 100644 --- a/src/main/kotlin/com/mingliqiye/utils/thread/ThreadRunner.kt +++ b/src/main/kotlin/com/mingliqiye/utils/thread/ThreadRunner.kt @@ -34,77 +34,77 @@ import java.util.concurrent.Future */ object ThreadRunner { - var executorService: ExecutorService? = null + var executorService: ExecutorService? = null - /** - * 关闭线程池执行器 - * 首先尝试正常关闭,如果失败则强制关闭 - */ - @JvmStatic - fun close() { - try { - executorService?.shutdown() - } catch (_: Exception) { - executorService?.shutdownNow() - } - } + /** + * 关闭线程池执行器 + * 首先尝试正常关闭,如果失败则强制关闭 + */ + @JvmStatic + fun close() { + try { + executorService?.shutdown() + } catch (_: Exception) { + executorService?.shutdownNow() + } + } - /** - * 初始化线程池执行器 - * 创建固定大小的线程池,线程数量为可用处理器核心数的两倍 - * - * @param string 线程名称前缀,默认为"MingliUtilThread" - */ - @JvmStatic - fun init(string: String = "MingliUtilThread") { - executorService = Executors.newFixedThreadPool( - availableProcessors * 2, - NamedThreadFactory { clazz, poolNumber, threadNumber -> - "$string #$threadNumber" - }) - } + /** + * 初始化线程池执行器 + * 创建固定大小的线程池,线程数量为可用处理器核心数的两倍 + * + * @param string 线程名称前缀,默认为"MingliUtilThread" + */ + @JvmStatic + fun init(string: String = "MingliUtilThread") { + executorService = Executors.newFixedThreadPool( + availableProcessors * 2, + NamedThreadFactory { clazz, poolNumber, threadNumber -> + "$string #$threadNumber" + }) + } - /** - * 异步执行Runnable任务 - * - * @param runnable 要执行的Runnable任务 - * @return Future对象,可用于获取任务执行结果或控制任务状态 - */ - @JvmStatic - fun runThread(runnable: Runnable): Future<*> { - return executorService!!.submit(runnable) - } + /** + * 异步执行Runnable任务 + * + * @param runnable 要执行的Runnable任务 + * @return Future对象,可用于获取任务执行结果或控制任务状态 + */ + @JvmStatic + fun runThread(runnable: Runnable): Future<*> { + return executorService!!.submit(runnable) + } - /** - * 异步执行Callable任务 - * - * @param runnable 要执行的Callable任务 - * @return Future对象,可用于获取任务执行结果或控制任务状态 - */ - @JvmStatic - fun runThread(runnable: Callable): Future { - return executorService!!.submit(runnable) - } + /** + * 异步执行Callable任务 + * + * @param runnable 要执行的Callable任务 + * @return Future对象,可用于获取任务执行结果或控制任务状态 + */ + @JvmStatic + fun runThread(runnable: Callable): Future { + return executorService!!.submit(runnable) + } - /** - * 同步执行Runnable任务,阻塞等待任务完成 - * - * @param runnable 要执行的Runnable任务 - * @return 任务执行结果(通常为null) - */ - @JvmStatic - fun runThreadAwait(runnable: Runnable): Any { - return executorService!!.submit(runnable).get() - } + /** + * 同步执行Runnable任务,阻塞等待任务完成 + * + * @param runnable 要执行的Runnable任务 + * @return 任务执行结果(通常为null) + */ + @JvmStatic + fun runThreadAwait(runnable: Runnable): Any { + return executorService!!.submit(runnable).get() + } - /** - * 同步执行Callable任务,阻塞等待任务完成并返回结果 - * - * @param runnable 要执行的Callable任务 - * @return 任务执行结果 - */ - @JvmStatic - fun runThreadAwait(runnable: Callable): T { - return executorService!!.submit(runnable).get() - } + /** + * 同步执行Callable任务,阻塞等待任务完成并返回结果 + * + * @param runnable 要执行的Callable任务 + * @return 任务执行结果 + */ + @JvmStatic + fun runThreadAwait(runnable: Callable): T { + return executorService!!.submit(runnable).get() + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/thread/ThreadUtils.kt b/src/main/kotlin/com/mingliqiye/utils/thread/ThreadUtils.kt index 47fdcc0..f67a591 100644 --- a/src/main/kotlin/com/mingliqiye/utils/thread/ThreadUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/thread/ThreadUtils.kt @@ -26,112 +26,112 @@ package com.mingliqiye.utils.thread * 线程工具类,提供线程名称的获取和设置功能 */ object ThreadUtils { - /** - * 获取或设置当前线程的名称 - * - * Getter: 返回当前线程的名称 - * Setter: 设置当前线程的名称 - * - * @return 当前线程的名称字符串 - */ - @JvmStatic - var currentThreadName: String - get() = Thread.currentThread().name - set(s) { - Thread.currentThread().name = s - } + /** + * 获取或设置当前线程的名称 + * + * Getter: 返回当前线程的名称 + * Setter: 设置当前线程的名称 + * + * @return 当前线程的名称字符串 + */ + @JvmStatic + var currentThreadName: String + get() = Thread.currentThread().name + set(s) { + Thread.currentThread().name = s + } - /** - * 当前线程的优先级 - */ - @get:JvmStatic - val currentThreadPriority: Int - get() = Thread.currentThread().priority + /** + * 当前线程的优先级 + */ + @get:JvmStatic + val currentThreadPriority: Int + get() = Thread.currentThread().priority - /** - * 当前线程是否为守护线程 - */ - @JvmStatic - fun isCurrentDaemon(): Boolean = Thread.currentThread().isDaemon + /** + * 当前线程是否为守护线程 + */ + @JvmStatic + fun isCurrentDaemon(): Boolean = Thread.currentThread().isDaemon - /** - * 当前线程是否为主线程 - */ - @JvmStatic - fun isMainThread(): Boolean = Thread.currentThread().name == "main" + /** + * 当前线程是否为主线程 + */ + @JvmStatic + fun isMainThread(): Boolean = Thread.currentThread().name == "main" - /** - * 当前线程的调用栈 - */ - @JvmStatic - fun currentStackTrace(): Array = Thread.currentThread().stackTrace + /** + * 当前线程的调用栈 + */ + @JvmStatic + fun currentStackTrace(): Array = Thread.currentThread().stackTrace - /** - * 当前线程组 - */ - @JvmStatic - fun currentThreadGroup(): ThreadGroup = Thread.currentThread().threadGroup + /** + * 当前线程组 + */ + @JvmStatic + fun currentThreadGroup(): ThreadGroup = Thread.currentThread().threadGroup - /** - * 当前线程组中活跃线程的估算数量 - */ - @JvmStatic - fun activeThreadCount(): Int = Thread.activeCount() + /** + * 当前线程组中活跃线程的估算数量 + */ + @JvmStatic + fun activeThreadCount(): Int = Thread.activeCount() - /** - * 枚举当前线程组中所有活跃线程 - */ - @JvmStatic - fun activeThreads(): Array { - val all = arrayOfNulls(Thread.activeCount() + 8) - val count = Thread.enumerate(all) - return all.copyOfRange(0, count).filterNotNull().toTypedArray() - } + /** + * 枚举当前线程组中所有活跃线程 + */ + @JvmStatic + fun activeThreads(): Array { + val all = arrayOfNulls(Thread.activeCount() + 8) + val count = Thread.enumerate(all) + return all.copyOfRange(0, count).filterNotNull().toTypedArray() + } - /** - * 安静休眠:忽略中断异常,但恢复线程中断状态以便上层感知 - * - * @param millis 休眠毫秒数 - * @param nanos 额外纳秒数,取值 [0, 999999] - */ - @JvmStatic - @JvmOverloads - fun sleepQuietly(millis: Long, nanos: Int = 0) { - try { - Thread.sleep(millis, nanos) - } catch (_: InterruptedException) { - Thread.currentThread().interrupt() - } - } + /** + * 安静休眠:忽略中断异常,但恢复线程中断状态以便上层感知 + * + * @param millis 休眠毫秒数 + * @param nanos 额外纳秒数,取值 [0, 999999] + */ + @JvmStatic + @JvmOverloads + fun sleepQuietly(millis: Long, nanos: Int = 0) { + try { + Thread.sleep(millis, nanos) + } catch (_: InterruptedException) { + Thread.currentThread().interrupt() + } + } - /** - * 按时间单位休眠,忽略中断异常 - * - * @param timeout 休眠时长 - * @param unit 时间单位 - */ - @JvmStatic - fun sleepQuietly(timeout: Long, unit: java.util.concurrent.TimeUnit) { - sleepQuietly(unit.toMillis(timeout), (unit.toNanos(timeout) % 1_000_000).toInt()) - } + /** + * 按时间单位休眠,忽略中断异常 + * + * @param timeout 休眠时长 + * @param unit 时间单位 + */ + @JvmStatic + fun sleepQuietly(timeout: Long, unit: java.util.concurrent.TimeUnit) { + sleepQuietly(unit.toMillis(timeout), (unit.toNanos(timeout) % 1_000_000).toInt()) + } - /** - * 转储当前线程调用栈(字符串形式) - */ - @JvmStatic - fun currentThreadDump(): String = Thread.currentThread().dumpStackTrace() + /** + * 转储当前线程调用栈(字符串形式) + */ + @JvmStatic + fun currentThreadDump(): String = Thread.currentThread().dumpStackTrace() - /** - * 转储所有活跃线程的调用栈,便于诊断死锁/卡死 - */ - @JvmStatic - fun allThreadsDump(): String = buildString { - Thread.getAllStackTraces().forEach { (thread, stack) -> - append("thread [").append(thread.name).append("] state=").append(thread.state) - stack.forEach { element -> - append("\n\tat ").append(element) - } - append("\n\n") - } - } + /** + * 转储所有活跃线程的调用栈,便于诊断死锁/卡死 + */ + @JvmStatic + fun allThreadsDump(): String = buildString { + Thread.getAllStackTraces().forEach { (thread, stack) -> + append("thread [").append(thread.name).append("] state=").append(thread.state) + stack.forEach { element -> + append("\n\tat ").append(element) + } + append("\n\n") + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/time/DateTime.kt b/src/main/kotlin/com/mingliqiye/utils/time/DateTime.kt index 7e93704..163e23c 100644 --- a/src/main/kotlin/com/mingliqiye/utils/time/DateTime.kt +++ b/src/main/kotlin/com/mingliqiye/utils/time/DateTime.kt @@ -48,499 +48,499 @@ import kotlin.time.Instant * @see Instant */ @Schema( - name = "DateTime", - description = "DateTime", - type = "string", - format = "date-time" + name = "DateTime", + description = "DateTime", + type = "string", + format = "date-time" ) class DateTime private constructor( - private var localDateTime: LocalDateTime, private val zoneId: ZoneId = ZoneId.systemDefault(), + private var localDateTime: LocalDateTime, private val zoneId: ZoneId = ZoneId.systemDefault(), ) : Serializable { - companion object { - /** - * 获取当前时间的 DateTime 实例。 - * 如果运行在 Java 1.8 环境下,则通过 WinKernel32 获取高精度时间。 - * - * @return 返回当前时间的 DateTime 实例 - */ - @JvmStatic - fun now(): DateTime { - return DateTime(LocalDateTime.now()) - } + companion object { + /** + * 获取当前时间的 DateTime 实例。 + * 如果运行在 Java 1.8 环境下,则通过 WinKernel32 获取高精度时间。 + * + * @return 返回当前时间的 DateTime 实例 + */ + @JvmStatic + fun now(): DateTime { + return DateTime(LocalDateTime.now()) + } - /** - * 将 Date 对象转换为 DateTime 实例。 - * - * @param zoneId 时区信息 - * @param date Date 对象 - * @return 返回对应的 DateTime 实例 - */ - @JvmStatic - fun of(date: Date, zoneId: ZoneId): DateTime { - return DateTime(date.toInstant().atZone(zoneId).toLocalDateTime(), zoneId) - } + /** + * 将 Date 对象转换为 DateTime 实例。 + * + * @param zoneId 时区信息 + * @param date Date 对象 + * @return 返回对应的 DateTime 实例 + */ + @JvmStatic + fun of(date: Date, zoneId: ZoneId): DateTime { + return DateTime(date.toInstant().atZone(zoneId).toLocalDateTime(), zoneId) + } - /** - * 将 Date 对象转换为 DateTime 实例,使用系统默认时区。 - * - * @param date Date 对象 - * @return 返回对应的 DateTime 实例 - */ - @JvmStatic - fun of(date: Date): DateTime { - return DateTime( - date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime() - ) - } + /** + * 将 Date 对象转换为 DateTime 实例,使用系统默认时区。 + * + * @param date Date 对象 + * @return 返回对应的 DateTime 实例 + */ + @JvmStatic + fun of(date: Date): DateTime { + return DateTime( + date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime() + ) + } - /** - * 根据 LocalDateTime 创建 DateTime 实例。 - * - * @param localDateTime LocalDateTime 对象 - * @return 返回对应的 DateTime 实例 - */ - @JvmStatic - fun of(localDateTime: LocalDateTime): DateTime { - return DateTime(localDateTime) - } + /** + * 根据 LocalDateTime 创建 DateTime 实例。 + * + * @param localDateTime LocalDateTime 对象 + * @return 返回对应的 DateTime 实例 + */ + @JvmStatic + fun of(localDateTime: LocalDateTime): DateTime { + return DateTime(localDateTime) + } - /** - * 根据 LocalDateTime 创建 DateTime 实例。 - * - * @param localDateTime LocalDateTime 对象 - * @return 返回对应的 DateTime 实例 - */ - @JvmStatic - fun of(instant: java.time.Instant, zoneId: ZoneId = ZoneId.systemDefault()): DateTime { - return DateTime(LocalDateTime.ofInstant(instant, zoneId)) - } + /** + * 根据 LocalDateTime 创建 DateTime 实例。 + * + * @param localDateTime LocalDateTime 对象 + * @return 返回对应的 DateTime 实例 + */ + @JvmStatic + fun of(instant: java.time.Instant, zoneId: ZoneId = ZoneId.systemDefault()): DateTime { + return DateTime(LocalDateTime.ofInstant(instant, zoneId)) + } - /** - * 解析时间字符串并生成 DateTime 实例。 - * - * @param timestr 时间字符串 - * @param formatter 格式化模板 - * @param fillZero 是否补零到模板长度 - * @return 返回解析后的 DateTime 实例 - */ - @JvmStatic - fun parse( - timestr: String, formatter: String, fillZero: Boolean, - ): DateTime { - return DateTime( - LocalDateTime.parse( - if (fillZero) getFillZeroByLen(timestr, formatter) else timestr, - DateTimeFormatter.ofPattern(formatter) - ) - ) - } + /** + * 解析时间字符串并生成 DateTime 实例。 + * + * @param timestr 时间字符串 + * @param formatter 格式化模板 + * @param fillZero 是否补零到模板长度 + * @return 返回解析后的 DateTime 实例 + */ + @JvmStatic + fun parse( + timestr: String, formatter: String, fillZero: Boolean, + ): DateTime { + return DateTime( + LocalDateTime.parse( + if (fillZero) getFillZeroByLen(timestr, formatter) else timestr, + DateTimeFormatter.ofPattern(formatter) + ) + ) + } - @JvmStatic - fun parse( - timestr: String, - ): DateTime { + @JvmStatic + fun parse( + timestr: String, + ): DateTime { - val formatterString = Formatter.STANDARD_DATETIME_MILLISECOUND9.value - return DateTime( - LocalDateTime.parse( - getFillZeroByLen(timestr, formatterString), DateTimeFormatter.ofPattern(formatterString) - ) - ) - } + val formatterString = Formatter.STANDARD_DATETIME_MILLISECOUND9.value + return DateTime( + LocalDateTime.parse( + getFillZeroByLen(timestr, formatterString), DateTimeFormatter.ofPattern(formatterString) + ) + ) + } - /** - * 使用 Formatter 枚举解析时间字符串并生成 DateTime 实例。 - * - * @param timestr 时间字符串 - * @param formatter 格式化模板枚举 - * @param fillZero 是否补零到模板长度 - * @return 返回解析后的 DateTime 实例 - */ - @JvmStatic - fun parse( - timestr: String, formatter: Formatter, fillZero: Boolean, - ): DateTime { - return parse(timestr, formatter.value, fillZero) - } + /** + * 使用 Formatter 枚举解析时间字符串并生成 DateTime 实例。 + * + * @param timestr 时间字符串 + * @param formatter 格式化模板枚举 + * @param fillZero 是否补零到模板长度 + * @return 返回解析后的 DateTime 实例 + */ + @JvmStatic + fun parse( + timestr: String, formatter: Formatter, fillZero: Boolean, + ): DateTime { + return parse(timestr, formatter.value, fillZero) + } - /** - * 使用 Formatter 枚举解析时间字符串并生成 DateTime 实例,默认不补零。 - * - * @param timestr 时间字符串 - * @param formatter 格式化模板枚举 - * @return 返回解析后的 DateTime 实例 - */ - @JvmStatic - fun parse(timestr: String, formatter: Formatter): DateTime { - return parse(timestr, formatter.value) - } + /** + * 使用 Formatter 枚举解析时间字符串并生成 DateTime 实例,默认不补零。 + * + * @param timestr 时间字符串 + * @param formatter 格式化模板枚举 + * @return 返回解析后的 DateTime 实例 + */ + @JvmStatic + fun parse(timestr: String, formatter: Formatter): DateTime { + return parse(timestr, formatter.value) + } - /** - * 解析时间字符串并生成 DateTime 实例,默认不补零。 - * - * @param timestr 时间字符串 - * @param formatter 格式化模板 - * @return 返回解析后的 DateTime 实例 - */ - @JvmStatic - fun parse(timestr: String, formatter: String): DateTime { - return parse(timestr, formatter, false) - } + /** + * 解析时间字符串并生成 DateTime 实例,默认不补零。 + * + * @param timestr 时间字符串 + * @param formatter 格式化模板 + * @return 返回解析后的 DateTime 实例 + */ + @JvmStatic + fun parse(timestr: String, formatter: String): DateTime { + return parse(timestr, formatter, false) + } - /** - * 补零处理时间字符串以匹配格式化模板长度。 - * - * @param dstr 原始时间字符串 - * @param formats 格式化模板 - * @return 补零后的时间字符串 - */ - private fun getFillZeroByLen(dstr: String, formats: String): String { - val formatslen = formats.replace("'", "").length - if (dstr.length == formatslen) { - return dstr - } - if (formatslen > dstr.length) { - var modifiedDstr = dstr - if (dstr.length == 19) { - modifiedDstr += "." - } - val sb = StringBuilder(modifiedDstr) - for (i in 0 until formatslen - sb.length) { - sb.append("0") - } - return sb.toString() - } - throw IllegalArgumentException( - String.format( - "Text: '%s' len %s < %s %s", dstr, dstr.length, formats, formatslen - ) - ) - } + /** + * 补零处理时间字符串以匹配格式化模板长度。 + * + * @param dstr 原始时间字符串 + * @param formats 格式化模板 + * @return 补零后的时间字符串 + */ + private fun getFillZeroByLen(dstr: String, formats: String): String { + val formatslen = formats.replace("'", "").length + if (dstr.length == formatslen) { + return dstr + } + if (formatslen > dstr.length) { + var modifiedDstr = dstr + if (dstr.length == 19) { + modifiedDstr += "." + } + val sb = StringBuilder(modifiedDstr) + for (i in 0 until formatslen - sb.length) { + sb.append("0") + } + return sb.toString() + } + throw IllegalArgumentException( + String.format( + "Text: '%s' len %s < %s %s", dstr, dstr.length, formats, formatslen + ) + ) + } - /** - * 根据年、月、日创建 DateTime 实例 - * - * @param year 年份 - * @param month 月份 (1-12) - * @param day 日期 (1-31) - * @return 返回指定日期的 DateTime 实例(时间部分为 00:00:00) - */ - @JvmStatic - fun of(year: Int, month: Int, day: Int): DateTime { - return DateTime(LocalDateTime.of(year, month, day, 0, 0)) - } + /** + * 根据年、月、日创建 DateTime 实例 + * + * @param year 年份 + * @param month 月份 (1-12) + * @param day 日期 (1-31) + * @return 返回指定日期的 DateTime 实例(时间部分为 00:00:00) + */ + @JvmStatic + fun of(year: Int, month: Int, day: Int): DateTime { + return DateTime(LocalDateTime.of(year, month, day, 0, 0)) + } - /** - * 根据年、月、日、时、分创建 DateTime 实例 - * - * @param year 年份 - * @param month 月份 (1-12) - * @param day 日期 (1-31) - * @param hour 小时 (0-23) - * @param minute 分钟 (0-59) - * @return 返回指定日期时间的 DateTime 实例(秒部分为 00) - */ - @JvmStatic - fun of( - year: Int, month: Int, day: Int, hour: Int, minute: Int, - ): DateTime { - return DateTime(LocalDateTime.of(year, month, day, hour, minute)) - } + /** + * 根据年、月、日、时、分创建 DateTime 实例 + * + * @param year 年份 + * @param month 月份 (1-12) + * @param day 日期 (1-31) + * @param hour 小时 (0-23) + * @param minute 分钟 (0-59) + * @return 返回指定日期时间的 DateTime 实例(秒部分为 00) + */ + @JvmStatic + fun of( + year: Int, month: Int, day: Int, hour: Int, minute: Int, + ): DateTime { + return DateTime(LocalDateTime.of(year, month, day, hour, minute)) + } - /** - * 根据年、月、日、时、分、秒创建 DateTime 实例 - * - * @param year 年份 - * @param month 月份 (1-12) - * @param day 日期 (1-31) - * @param hour 小时 (0-23) - * @param minute 分钟 (0-59) - * @param second 秒 (0-59) - * @return 返回指定日期时间的 DateTime 实例 - */ - @JvmStatic - fun of( - year: Int, month: Int, day: Int, hour: Int, minute: Int, second: Int, - ): DateTime { - return DateTime( - LocalDateTime.of(year, month, day, hour, minute, second) - ) - } + /** + * 根据年、月、日、时、分、秒创建 DateTime 实例 + * + * @param year 年份 + * @param month 月份 (1-12) + * @param day 日期 (1-31) + * @param hour 小时 (0-23) + * @param minute 分钟 (0-59) + * @param second 秒 (0-59) + * @return 返回指定日期时间的 DateTime 实例 + */ + @JvmStatic + fun of( + year: Int, month: Int, day: Int, hour: Int, minute: Int, second: Int, + ): DateTime { + return DateTime( + LocalDateTime.of(year, month, day, hour, minute, second) + ) + } - /** - * 根据年、月、日、时、分、秒、纳秒创建 DateTime 实例 - * - * @param year 年份 - * @param month 月份 (1-12) - * @param day 日期 (1-31) - * @param hour 小时 (0-23) - * @param minute 分钟 (0-59) - * @param second 秒 (0-59) - * @param nano 纳秒 (0-999,999,999) - * @return 返回指定日期时间的 DateTime 实例 - */ - @JvmStatic - fun of( - year: Int, month: Int, day: Int, hour: Int, minute: Int, second: Int, nano: Int, - ): DateTime { - return DateTime( - LocalDateTime.of(year, month, day, hour, minute, second, nano) - ) - } + /** + * 根据年、月、日、时、分、秒、纳秒创建 DateTime 实例 + * + * @param year 年份 + * @param month 月份 (1-12) + * @param day 日期 (1-31) + * @param hour 小时 (0-23) + * @param minute 分钟 (0-59) + * @param second 秒 (0-59) + * @param nano 纳秒 (0-999,999,999) + * @return 返回指定日期时间的 DateTime 实例 + */ + @JvmStatic + fun of( + year: Int, month: Int, day: Int, hour: Int, minute: Int, second: Int, nano: Int, + ): DateTime { + return DateTime( + LocalDateTime.of(year, month, day, hour, minute, second, nano) + ) + } - /** - * 根据毫秒时间戳创建 DateTime 实例 - * - * @param epochMilli 毫秒时间戳 - * @return 返回对应时间的 DateTime 实例 - */ - @JvmStatic - fun of(epochMilli: Long): DateTime { - return DateTime( - java.time.Instant.ofEpochMilli(epochMilli).atZone(ZoneId.systemDefault()).toLocalDateTime() - ) - } + /** + * 根据毫秒时间戳创建 DateTime 实例 + * + * @param epochMilli 毫秒时间戳 + * @return 返回对应时间的 DateTime 实例 + */ + @JvmStatic + fun of(epochMilli: Long): DateTime { + return DateTime( + java.time.Instant.ofEpochMilli(epochMilli).atZone(ZoneId.systemDefault()).toLocalDateTime() + ) + } - @JvmStatic - fun of(seconds: Long, nanos: Long): DateTime { - return DateTime( - java.time.Instant.ofEpochSecond(seconds, nanos).atZone(ZoneId.systemDefault()).toLocalDateTime() - ) - } + @JvmStatic + fun of(seconds: Long, nanos: Long): DateTime { + return DateTime( + java.time.Instant.ofEpochSecond(seconds, nanos).atZone(ZoneId.systemDefault()).toLocalDateTime() + ) + } - /** - * 根据毫秒时间戳和时区创建 DateTime 实例 - * - * @param epochMilli 毫秒时间戳 - * @param zoneId 时区信息 - * @return 返回对应时间的 DateTime 实例 - */ - @JvmStatic - fun of(epochMilli: Long, zoneId: ZoneId): DateTime { - return DateTime( - java.time.Instant.ofEpochMilli(epochMilli).atZone(zoneId).toLocalDateTime(), zoneId - ) - } + /** + * 根据毫秒时间戳和时区创建 DateTime 实例 + * + * @param epochMilli 毫秒时间戳 + * @param zoneId 时区信息 + * @return 返回对应时间的 DateTime 实例 + */ + @JvmStatic + fun of(epochMilli: Long, zoneId: ZoneId): DateTime { + return DateTime( + java.time.Instant.ofEpochMilli(epochMilli).atZone(zoneId).toLocalDateTime(), zoneId + ) + } - fun LocalDateTime.toDateTime(): DateTime = of(this) - fun Date.toDateTime(): DateTime = of(this) - } + fun LocalDateTime.toDateTime(): DateTime = of(this) + fun Date.toDateTime(): DateTime = of(this) + } - /** - * 将当前 DateTime 转换为 Date 对象。 - * - * @return 返回对应的 Date 对象 - */ - fun toDate(): Date { - return Date.from(localDateTime.atZone(zoneId).toInstant()) - } + /** + * 将当前 DateTime 转换为 Date 对象。 + * + * @return 返回对应的 Date 对象 + */ + fun toDate(): Date { + return Date.from(localDateTime.atZone(zoneId).toInstant()) + } - /** - * 获取当前 DateTime 中的 LocalDateTime 实例。 - * - * @return 返回 LocalDateTime 对象 - */ - fun toLocalDateTime(): LocalDateTime { - return localDateTime - } + /** + * 获取当前 DateTime 中的 LocalDateTime 实例。 + * + * @return 返回 LocalDateTime 对象 + */ + fun toLocalDateTime(): LocalDateTime { + return localDateTime + } - /** - * 在当前时间基础上增加指定的时间偏移量。 - * - * @param dateTimeOffset 时间偏移对象 - * @return 返回修改后的 DateTime 实例 - */ - fun add(dateTimeOffset: DateTimeOffset): DateTime { - return DateTime( - this.localDateTime.plus( - dateTimeOffset.offset, dateTimeOffset.offsetType - ) - ) - } + /** + * 在当前时间基础上增加指定的时间偏移量。 + * + * @param dateTimeOffset 时间偏移对象 + * @return 返回修改后的 DateTime 实例 + */ + fun add(dateTimeOffset: DateTimeOffset): DateTime { + return DateTime( + this.localDateTime.plus( + dateTimeOffset.offset, dateTimeOffset.offsetType + ) + ) + } - /** - * 重载加法运算符,将指定的DateTimeOffset添加到当前DateTime对象 - * @param dateTimeOffset 要添加的时间偏移量 - * @return 返回相加后的新DateTime对象 - */ - operator fun plus(dateTimeOffset: DateTimeOffset): DateTime = add(dateTimeOffset) + /** + * 重载加法运算符,将指定的DateTimeOffset添加到当前DateTime对象 + * @param dateTimeOffset 要添加的时间偏移量 + * @return 返回相加后的新DateTime对象 + */ + operator fun plus(dateTimeOffset: DateTimeOffset): DateTime = add(dateTimeOffset) - /** - * 重载减法运算符,从当前DateTime对象中减去指定的DateTimeOffset - * @param dateTimeOffset 要减去的时间偏移量 - * @return 返回相减后的新DateTime对象 - */ - operator fun minus(dateTimeOffset: DateTimeOffset): DateTime = sub(dateTimeOffset) + /** + * 重载减法运算符,从当前DateTime对象中减去指定的DateTimeOffset + * @param dateTimeOffset 要减去的时间偏移量 + * @return 返回相减后的新DateTime对象 + */ + operator fun minus(dateTimeOffset: DateTimeOffset): DateTime = sub(dateTimeOffset) - /** - * 在当前时间基础上减少指定的时间偏移量。 - * - * @param dateTimeOffset 时间偏移对象 - * @return 返回修改后的 DateTime 实例 - */ - fun sub(dateTimeOffset: DateTimeOffset): DateTime { - return add(DateTimeOffset.of(-dateTimeOffset.offset, dateTimeOffset.offsetType)) - } + /** + * 在当前时间基础上减少指定的时间偏移量。 + * + * @param dateTimeOffset 时间偏移对象 + * @return 返回修改后的 DateTime 实例 + */ + fun sub(dateTimeOffset: DateTimeOffset): DateTime { + return add(DateTimeOffset.of(-dateTimeOffset.offset, dateTimeOffset.offsetType)) + } - /** - * 使用指定格式化模板将当前时间格式化为字符串。 - * - * @param formatter 格式化模板 - * @return 返回格式化后的时间字符串 - */ - fun format(formatter: String): String { - return format(formatter, false) - } + /** + * 使用指定格式化模板将当前时间格式化为字符串。 + * + * @param formatter 格式化模板 + * @return 返回格式化后的时间字符串 + */ + fun format(formatter: String): String { + return format(formatter, false) + } - /** - * 使用 Formatter 枚举将当前时间格式化为字符串。 - * - * @param formatter 格式化模板枚举 - * @return 返回格式化后的时间字符串 - */ - fun format(formatter: Formatter): String { - return format(formatter.value) - } + /** + * 使用 Formatter 枚举将当前时间格式化为字符串。 + * + * @param formatter 格式化模板枚举 + * @return 返回格式化后的时间字符串 + */ + fun format(formatter: Formatter): String { + return format(formatter.value) + } - fun format(): String { - return format(Formatter.STANDARD_DATETIME_MILLISECOUND9.value, true) - } + fun format(): String { + return format(Formatter.STANDARD_DATETIME_MILLISECOUND9.value, true) + } - /** - * 使用指定格式化模板将当前时间格式化为字符串,并可选择是否去除末尾多余的零。 - * - * @param formatter 格式化模板 - * @param repcZero 是否去除末尾多余的零 - * @return 返回格式化后的时间字符串 - */ - fun format(formatter: String, repcZero: Boolean): String { - var formatted = DateTimeFormatter.ofPattern(formatter).format( - toLocalDateTime() - ) - if (repcZero) { - // 处理小数点后多余的0 - formatted = formatted.replace(Regex("(\\.\\d*?)0+\\b"), "$1") - formatted = formatted.replace(Regex("\\.$"), "") - } - return formatted - } + /** + * 使用指定格式化模板将当前时间格式化为字符串,并可选择是否去除末尾多余的零。 + * + * @param formatter 格式化模板 + * @param repcZero 是否去除末尾多余的零 + * @return 返回格式化后的时间字符串 + */ + fun format(formatter: String, repcZero: Boolean): String { + var formatted = DateTimeFormatter.ofPattern(formatter).format( + toLocalDateTime() + ) + if (repcZero) { + // 处理小数点后多余的0 + formatted = formatted.replace(Regex("(\\.\\d*?)0+\\b"), "$1") + formatted = formatted.replace(Regex("\\.$"), "") + } + return formatted + } - /** - * 使用 Formatter 枚举将当前时间格式化为字符串,并可选择是否去除末尾多余的零。 - * - * @param formatter 格式化模板枚举 - * @param repcZero 是否去除末尾多余的零 - * @return 返回格式化后的时间字符串 - */ - fun format(formatter: Formatter, repcZero: Boolean): String { - return format(formatter.value, repcZero) - } + /** + * 使用 Formatter 枚举将当前时间格式化为字符串,并可选择是否去除末尾多余的零。 + * + * @param formatter 格式化模板枚举 + * @param repcZero 是否去除末尾多余的零 + * @return 返回格式化后的时间字符串 + */ + fun format(formatter: Formatter, repcZero: Boolean): String { + return format(formatter.value, repcZero) + } - /** - * 返回当前时间的标准字符串表示形式。 - * - * @return 返回标准格式的时间字符串 - */ - override fun toString(): String { - return "DateTime(${format()})" - } + /** + * 返回当前时间的标准字符串表示形式。 + * + * @return 返回标准格式的时间字符串 + */ + override fun toString(): String { + return "DateTime(${format()})" + } - /** - * 比较当前DateTime对象与指定对象是否相等 - * - * @param other 要比较的对象 - * @return 如果对象相等则返回true,否则返回false - */ - override fun equals(other: Any?): Boolean { - // 检查对象类型是否为DateTime - if (other is DateTime) { - // 比较两个DateTime对象转换为LocalDateTime后的值 - return toLocalDateTime() == other.toLocalDateTime() - } - return false - } + /** + * 比较当前DateTime对象与指定对象是否相等 + * + * @param other 要比较的对象 + * @return 如果对象相等则返回true,否则返回false + */ + override fun equals(other: Any?): Boolean { + // 检查对象类型是否为DateTime + if (other is DateTime) { + // 比较两个DateTime对象转换为LocalDateTime后的值 + return toLocalDateTime() == other.toLocalDateTime() + } + return false + } - /** - * 获取对象的哈希码 - * - * @return 哈希码 - */ - override fun hashCode(): Int { - return localDateTime.hashCode() - } + /** + * 获取对象的哈希码 + * + * @return 哈希码 + */ + override fun hashCode(): Int { + return localDateTime.hashCode() + } - /** - * 将当前 DateTime 转换为 Instant 对象。 - * - * @return 返回 Instant 对象 - */ - fun toInstant(): java.time.Instant { - return localDateTime.atZone(zoneId).toInstant() - } + /** + * 将当前 DateTime 转换为 Instant 对象。 + * + * @return 返回 Instant 对象 + */ + fun toInstant(): java.time.Instant { + return localDateTime.atZone(zoneId).toInstant() + } - /** - * 判断当前时间是否在指定时间之后。 - * - * @param dateTime 指定时间 - * @return 如果当前时间在指定时间之后则返回 true,否则返回 false - */ - fun isAfter(dateTime: DateTime?): Boolean { - if (dateTime == null) { - return false - } - return toInstant().isAfter(dateTime.toInstant()) - } + /** + * 判断当前时间是否在指定时间之后。 + * + * @param dateTime 指定时间 + * @return 如果当前时间在指定时间之后则返回 true,否则返回 false + */ + fun isAfter(dateTime: DateTime?): Boolean { + if (dateTime == null) { + return false + } + return toInstant().isAfter(dateTime.toInstant()) + } - /** - * 判断当前时间是否在指定时间之前。 - * - * @param dateTime 指定时间 - * @return 如果当前时间在指定时间之前则返回 true,否则返回 false - */ - fun isBefore(dateTime: DateTime?): Boolean { - if (dateTime == null) { - return false - } - return toInstant().isBefore(dateTime.toInstant()) - } + /** + * 判断当前时间是否在指定时间之前。 + * + * @param dateTime 指定时间 + * @return 如果当前时间在指定时间之前则返回 true,否则返回 false + */ + fun isBefore(dateTime: DateTime?): Boolean { + if (dateTime == null) { + return false + } + return toInstant().isBefore(dateTime.toInstant()) + } - /** - * 获取时区ID - * - * @return ZoneId对象 - */ - fun getZoneId(): ZoneId { - return zoneId - } + /** + * 获取时区ID + * + * @return ZoneId对象 + */ + fun getZoneId(): ZoneId { + return zoneId + } - /** - * 将 Instant 转换为纳秒时间戳 - * @throws ArithmeticException 如果结果超出 Long 范围 (-2^63 到 2^63-1) - */ - fun toNanoTime(): Long { - val instant = toInstant() - return try { - val secondsInNanos = Math.multiplyExact(instant.epochSecond, 1_000_000_000L) - Math.addExact(secondsInNanos, instant.nano.toLong()) - } catch (e: ArithmeticException) { - throw ArithmeticException( - "无法将 Instant(${instant.epochSecond}s, ${instant.nano}ns) 转换为纳秒: ${e.message}" - ) - } - } + /** + * 将 Instant 转换为纳秒时间戳 + * @throws ArithmeticException 如果结果超出 Long 范围 (-2^63 到 2^63-1) + */ + fun toNanoTime(): Long { + val instant = toInstant() + return try { + val secondsInNanos = Math.multiplyExact(instant.epochSecond, 1_000_000_000L) + Math.addExact(secondsInNanos, instant.nano.toLong()) + } catch (e: ArithmeticException) { + throw ArithmeticException( + "无法将 Instant(${instant.epochSecond}s, ${instant.nano}ns) 转换为纳秒: ${e.message}" + ) + } + } - fun to100NanoTime(): Long { - return toInstant().let { - (it.epochSecond * 10_000_000L) + (it.nano / 100L) - } - } + fun to100NanoTime(): Long { + return toInstant().let { + (it.epochSecond * 10_000_000L) + (it.nano / 100L) + } + } - fun toMillisecondTime(): Long { - return toInstant().let { - (it.epochSecond * 1000L) + (it.nano / 1_000_000L) - } - } + fun toMillisecondTime(): Long { + return toInstant().let { + (it.epochSecond * 1000L) + (it.nano / 1_000_000L) + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/time/DateTimeOffset.kt b/src/main/kotlin/com/mingliqiye/utils/time/DateTimeOffset.kt index 060274d..6c8c5bf 100644 --- a/src/main/kotlin/com/mingliqiye/utils/time/DateTimeOffset.kt +++ b/src/main/kotlin/com/mingliqiye/utils/time/DateTimeOffset.kt @@ -32,104 +32,104 @@ import java.util.concurrent.TimeUnit * @property offset 偏移量的数值。 */ class DateTimeOffset private constructor( - val offsetType: ChronoUnit, - val offset: Long + val offsetType: ChronoUnit, + val offset: Long, ) { - companion object { - /** - * 将 [ChronoUnit] 扩展为创建 [DateTimeOffset] 实例的函数。 - * - * @param offset 偏移量的长整型数值。 - * @return 返回一个新的 [DateTimeOffset] 实例。 - */ - @JvmStatic - @JvmName("of") - fun ChronoUnit.toDateTimeOffset(offset: Long) = DateTimeOffset(this, offset) + companion object { + /** + * 将 [ChronoUnit] 扩展为创建 [DateTimeOffset] 实例的函数。 + * + * @param offset 偏移量的长整型数值。 + * @return 返回一个新的 [DateTimeOffset] 实例。 + */ + @JvmStatic + @JvmName("of") + fun ChronoUnit.toDateTimeOffset(offset: Long) = DateTimeOffset(this, offset) - /** - * 将 [ChronoUnit] 扩展为创建 [DateTimeOffset] 实例的函数。 - * - * @param offset 偏移量的整型数值。 - * @return 返回一个新的 [DateTimeOffset] 实例。 - */ - @JvmStatic - @JvmName("of") - fun ChronoUnit.toDateTimeOffset(offset: Int) = DateTimeOffset(this, offset.toLong()) + /** + * 将 [ChronoUnit] 扩展为创建 [DateTimeOffset] 实例的函数。 + * + * @param offset 偏移量的整型数值。 + * @return 返回一个新的 [DateTimeOffset] 实例。 + */ + @JvmStatic + @JvmName("of") + fun ChronoUnit.toDateTimeOffset(offset: Int) = DateTimeOffset(this, offset.toLong()) - /** - * 将 [TimeUnit] 扩展为创建 [DateTimeOffset] 实例的函数。 - * - * @param offset 偏移量的长整型数值。 - * @return 返回一个新的 [DateTimeOffset] 实例。 - */ - @JvmStatic - @JvmName("of") - fun TimeUnit.toDateTimeOffset(offset: Long) = DateTimeOffset(this.toChronoUnit(), offset) + /** + * 将 [TimeUnit] 扩展为创建 [DateTimeOffset] 实例的函数。 + * + * @param offset 偏移量的长整型数值。 + * @return 返回一个新的 [DateTimeOffset] 实例。 + */ + @JvmStatic + @JvmName("of") + fun TimeUnit.toDateTimeOffset(offset: Long) = DateTimeOffset(this.toChronoUnit(), offset) - /** - * 将 [TimeUnit] 扩展为创建 [DateTimeOffset] 实例的函数。 - * - * @param offset 偏移量的整型数值。 - * @return 返回一个新的 [DateTimeOffset] 实例。 - */ - @JvmStatic - @JvmName("of") - fun TimeUnit.toDateTimeOffset(offset: Int) = DateTimeOffset(this.toChronoUnit(), offset.toLong()) + /** + * 将 [TimeUnit] 扩展为创建 [DateTimeOffset] 实例的函数。 + * + * @param offset 偏移量的整型数值。 + * @return 返回一个新的 [DateTimeOffset] 实例。 + */ + @JvmStatic + @JvmName("of") + fun TimeUnit.toDateTimeOffset(offset: Int) = DateTimeOffset(this.toChronoUnit(), offset.toLong()) - /** - * 创建 [DateTimeOffset] 实例的静态工厂方法。 - * - * @param offset 偏移量的长整型数值。 - * @param offsetType 时间单位类型,使用 [ChronoUnit] 表示。 - * @return 返回一个新的 [DateTimeOffset] 实例。 - */ - @JvmStatic - fun of(offset: Long, offsetType: ChronoUnit) = offsetType.toDateTimeOffset(offset) + /** + * 创建 [DateTimeOffset] 实例的静态工厂方法。 + * + * @param offset 偏移量的长整型数值。 + * @param offsetType 时间单位类型,使用 [ChronoUnit] 表示。 + * @return 返回一个新的 [DateTimeOffset] 实例。 + */ + @JvmStatic + fun of(offset: Long, offsetType: ChronoUnit) = offsetType.toDateTimeOffset(offset) - /** - * 创建 [DateTimeOffset] 实例的静态工厂方法。 - * - * @param offset 偏移量的整型数值。 - * @param offsetType 时间单位类型,使用 [ChronoUnit] 表示。 - * @return 返回一个新的 [DateTimeOffset] 实例。 - */ - @JvmStatic - fun of(offset: Int, offsetType: ChronoUnit) = offsetType.toDateTimeOffset(offset) + /** + * 创建 [DateTimeOffset] 实例的静态工厂方法。 + * + * @param offset 偏移量的整型数值。 + * @param offsetType 时间单位类型,使用 [ChronoUnit] 表示。 + * @return 返回一个新的 [DateTimeOffset] 实例。 + */ + @JvmStatic + fun of(offset: Int, offsetType: ChronoUnit) = offsetType.toDateTimeOffset(offset) - /** - * 创建 [DateTimeOffset] 实例的静态工厂方法。 - * - * @param offset 偏移量的长整型数值。 - * @param offsetType 时间单位类型,使用 [TimeUnit] 表示。 - * @return 返回一个新的 [DateTimeOffset] 实例。 - */ - @JvmStatic - fun of(offset: Long, offsetType: TimeUnit) = offsetType.toDateTimeOffset(offset) + /** + * 创建 [DateTimeOffset] 实例的静态工厂方法。 + * + * @param offset 偏移量的长整型数值。 + * @param offsetType 时间单位类型,使用 [TimeUnit] 表示。 + * @return 返回一个新的 [DateTimeOffset] 实例。 + */ + @JvmStatic + fun of(offset: Long, offsetType: TimeUnit) = offsetType.toDateTimeOffset(offset) - /** - * 创建 [DateTimeOffset] 实例的静态工厂方法。 - * - * @param offset 偏移量的整型数值。 - * @param offsetType 时间单位类型,使用 [TimeUnit] 表示。 - * @return 返回一个新的 [DateTimeOffset] 实例。 - */ - @JvmStatic - fun of(offset: Int, offsetType: TimeUnit) = offsetType.toDateTimeOffset(offset) + /** + * 创建 [DateTimeOffset] 实例的静态工厂方法。 + * + * @param offset 偏移量的整型数值。 + * @param offsetType 时间单位类型,使用 [TimeUnit] 表示。 + * @return 返回一个新的 [DateTimeOffset] 实例。 + */ + @JvmStatic + fun of(offset: Int, offsetType: TimeUnit) = offsetType.toDateTimeOffset(offset) - @Suppress("EXTENSION_SHADOWED_BY_MEMBER") - @JvmStatic - @JvmName("TimeUnitToChronoUnit") - fun TimeUnit.toChronoUnit(): ChronoUnit { - return when (this) { - TimeUnit.NANOSECONDS -> ChronoUnit.NANOS - TimeUnit.MICROSECONDS -> ChronoUnit.MICROS - TimeUnit.MILLISECONDS -> ChronoUnit.MILLIS - TimeUnit.SECONDS -> ChronoUnit.SECONDS - TimeUnit.MINUTES -> ChronoUnit.MINUTES - TimeUnit.HOURS -> ChronoUnit.HOURS - TimeUnit.DAYS -> ChronoUnit.DAYS - } - } - } + @Suppress("EXTENSION_SHADOWED_BY_MEMBER") + @JvmStatic + @JvmName("TimeUnitToChronoUnit") + fun TimeUnit.toChronoUnit(): ChronoUnit { + return when (this) { + TimeUnit.NANOSECONDS -> ChronoUnit.NANOS + TimeUnit.MICROSECONDS -> ChronoUnit.MICROS + TimeUnit.MILLISECONDS -> ChronoUnit.MILLIS + TimeUnit.SECONDS -> ChronoUnit.SECONDS + TimeUnit.MINUTES -> ChronoUnit.MINUTES + TimeUnit.HOURS -> ChronoUnit.HOURS + TimeUnit.DAYS -> ChronoUnit.DAYS + } + } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/time/Formatter.kt b/src/main/kotlin/com/mingliqiye/utils/time/Formatter.kt index ca1397b..f233110 100644 --- a/src/main/kotlin/com/mingliqiye/utils/time/Formatter.kt +++ b/src/main/kotlin/com/mingliqiye/utils/time/Formatter.kt @@ -31,78 +31,78 @@ package com.mingliqiye.utils.time * */ enum class Formatter(val value: String) { - /** - * 标准日期时间格式:yyyy-MM-dd HH:mm:ss - */ - STANDARD_DATETIME("yyyy-MM-dd HH:mm:ss"), - NONE(""), + /** + * 标准日期时间格式:yyyy-MM-dd HH:mm:ss + */ + STANDARD_DATETIME("yyyy-MM-dd HH:mm:ss"), + NONE(""), - /** - * 标准日期时间格式(7位毫秒):yyyy-MM-dd HH:mm:ss.SSSSSSS - */ - STANDARD_DATETIME_MILLISECOUND7("yyyy-MM-dd HH:mm:ss.SSSSSSS"), - STANDARD_DATETIME_MILLISECOUND8("yyyy-MM-dd HH:mm:ss.SSSSSSSS"), - STANDARD_DATETIME_MILLISECOUND9("yyyy-MM-dd HH:mm:ss.SSSSSSSSS"), + /** + * 标准日期时间格式(7位毫秒):yyyy-MM-dd HH:mm:ss.SSSSSSS + */ + STANDARD_DATETIME_MILLISECOUND7("yyyy-MM-dd HH:mm:ss.SSSSSSS"), + STANDARD_DATETIME_MILLISECOUND8("yyyy-MM-dd HH:mm:ss.SSSSSSSS"), + STANDARD_DATETIME_MILLISECOUND9("yyyy-MM-dd HH:mm:ss.SSSSSSSSS"), - /** - * 标准日期时间格式(6位毫秒):yyyy-MM-dd HH:mm:ss.SSSSSS - */ - STANDARD_DATETIME_MILLISECOUND6("yyyy-MM-dd HH:mm:ss.SSSSSS"), + /** + * 标准日期时间格式(6位毫秒):yyyy-MM-dd HH:mm:ss.SSSSSS + */ + STANDARD_DATETIME_MILLISECOUND6("yyyy-MM-dd HH:mm:ss.SSSSSS"), - /** - * 标准日期时间格式(5位毫秒):yyyy-MM-dd HH:mm:ss.SSSSS - */ - STANDARD_DATETIME_MILLISECOUND5("yyyy-MM-dd HH:mm:ss.SSSSS"), + /** + * 标准日期时间格式(5位毫秒):yyyy-MM-dd HH:mm:ss.SSSSS + */ + STANDARD_DATETIME_MILLISECOUND5("yyyy-MM-dd HH:mm:ss.SSSSS"), - /** - * 标准日期时间格式(4位毫秒):yyyy-MM-dd HH:mm:ss.SSSS - */ - STANDARD_DATETIME_MILLISECOUND4("yyyy-MM-dd HH:mm:ss.SSSS"), + /** + * 标准日期时间格式(4位毫秒):yyyy-MM-dd HH:mm:ss.SSSS + */ + STANDARD_DATETIME_MILLISECOUND4("yyyy-MM-dd HH:mm:ss.SSSS"), - /** - * 标准日期时间格式(3位毫秒):yyyy-MM-dd HH:mm:ss.SSS - */ - STANDARD_DATETIME_MILLISECOUND3("yyyy-MM-dd HH:mm:ss.SSS"), + /** + * 标准日期时间格式(3位毫秒):yyyy-MM-dd HH:mm:ss.SSS + */ + STANDARD_DATETIME_MILLISECOUND3("yyyy-MM-dd HH:mm:ss.SSS"), - /** - * 标准日期时间格式(2位毫秒):yyyy-MM-dd HH:mm:ss.SS - */ - STANDARD_DATETIME_MILLISECOUND2("yyyy-MM-dd HH:mm:ss.SS"), + /** + * 标准日期时间格式(2位毫秒):yyyy-MM-dd HH:mm:ss.SS + */ + STANDARD_DATETIME_MILLISECOUND2("yyyy-MM-dd HH:mm:ss.SS"), - /** - * 标准日期时间格式(1位毫秒):yyyy-MM-dd HH:mm:ss.S - */ - STANDARD_DATETIME_MILLISECOUND1("yyyy-MM-dd HH:mm:ss.S"), + /** + * 标准日期时间格式(1位毫秒):yyyy-MM-dd HH:mm:ss.S + */ + STANDARD_DATETIME_MILLISECOUND1("yyyy-MM-dd HH:mm:ss.S"), - /** - * 标准ISO格式:yyyy-MM-dd'T'HH:mm:ss.SSS'Z' - */ - STANDARD_ISO("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"), + /** + * 标准ISO格式:yyyy-MM-dd'T'HH:mm:ss.SSS'Z' + */ + STANDARD_ISO("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"), - /** - * 标准日期时间秒格式:yyyy-MM-dd HH:mm:ss - */ - STANDARD_DATETIME_SECOUND("yyyy-MM-dd HH:mm:ss"), + /** + * 标准日期时间秒格式:yyyy-MM-dd HH:mm:ss + */ + STANDARD_DATETIME_SECOUND("yyyy-MM-dd HH:mm:ss"), - /** - * 标准日期格式:yyyy-MM-dd - */ - STANDARD_DATE("yyyy-MM-dd"), + /** + * 标准日期格式:yyyy-MM-dd + */ + STANDARD_DATE("yyyy-MM-dd"), - /** - * ISO8601格式:yyyy-MM-dd'T'HH:mm:ss.SSSSSS - */ - ISO8601("yyyy-MM-dd'T'HH:mm:ss.SSSSSS"), + /** + * ISO8601格式:yyyy-MM-dd'T'HH:mm:ss.SSSSSS + */ + ISO8601("yyyy-MM-dd'T'HH:mm:ss.SSSSSS"), - /** - * 紧凑型日期时间格式:yyyyMMddHHmmss - */ - COMPACT_DATETIME("yyyyMMddHHmmss"); + /** + * 紧凑型日期时间格式:yyyyMMddHHmmss + */ + COMPACT_DATETIME("yyyyMMddHHmmss"); - private val len: Int = value.replace("'", "").length + private val len: Int = value.replace("'", "").length - fun getLen(): Int { - return this.len - } + fun getLen(): Int { + return this.len + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/tuple/Tuple.kt b/src/main/kotlin/com/mingliqiye/utils/tuple/Tuple.kt index 551af46..fff6f52 100644 --- a/src/main/kotlin/com/mingliqiye/utils/tuple/Tuple.kt +++ b/src/main/kotlin/com/mingliqiye/utils/tuple/Tuple.kt @@ -23,10501 +23,10501 @@ package com.mingliqiye.utils.tuple class Tuple1( - val t1: T1, + val t1: T1, ) : Tuple(1) { - operator fun component1(): T1 = t1 + operator fun component1(): T1 = t1 } class Tuple2( - val t1: T1, - val t2: T2, + val t1: T1, + val t2: T2, ) : Tuple(2) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 } class Tuple3( - val t1: T1, - val t2: T2, - val t3: T3, + val t1: T1, + val t2: T2, + val t3: T3, ) : Tuple(3) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 } class Tuple4( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, ) : Tuple(4) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 } class Tuple5( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, ) : Tuple(5) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 } class Tuple6( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, ) : Tuple(6) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 } class Tuple7( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, ) : Tuple(7) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 } class Tuple8( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, ) : Tuple(8) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 } class Tuple9( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, ) : Tuple(9) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 } class Tuple10( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, ) : Tuple(10) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 } class Tuple11( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, ) : Tuple(11) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 } class Tuple12( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, ) : Tuple(12) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 } class Tuple13( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, ) : Tuple(13) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 } class Tuple14( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, ) : Tuple(14) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 } class Tuple15( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, ) : Tuple(15) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 } class Tuple16( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, ) : Tuple(16) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 } class Tuple17( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, ) : Tuple(17) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 } class Tuple18( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, ) : Tuple(18) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 } class Tuple19( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, ) : Tuple(19) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 } class Tuple20( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, ) : Tuple(20) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 } class Tuple21( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, ) : Tuple(21) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 } class Tuple22( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, ) : Tuple(22) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 } class Tuple23( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, ) : Tuple(23) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 } class Tuple24( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, ) : Tuple(24) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 } class Tuple25( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, ) : Tuple(25) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 } class Tuple26( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, ) : Tuple(26) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 } class Tuple27( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, ) : Tuple(27) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 } class Tuple28( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, ) : Tuple(28) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 } class Tuple29( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, ) : Tuple(29) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 } class Tuple30( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, ) : Tuple(30) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 } class Tuple31( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, ) : Tuple(31) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 } class Tuple32( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, ) : Tuple(32) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 } class Tuple33( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, ) : Tuple(33) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 } class Tuple34( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, ) : Tuple(34) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 } class Tuple35( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, ) : Tuple(35) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 } class Tuple36( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, ) : Tuple(36) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 } class Tuple37( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, ) : Tuple(37) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 } class Tuple38( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, ) : Tuple(38) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 } class Tuple39( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, ) : Tuple(39) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 } class Tuple40( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, ) : Tuple(40) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 } class Tuple41( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, ) : Tuple(41) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 } class Tuple42( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, ) : Tuple(42) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 } class Tuple43( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, ) : Tuple(43) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 } class Tuple44( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, ) : Tuple(44) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 } class Tuple45( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, ) : Tuple(45) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 } class Tuple46( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, ) : Tuple(46) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 } class Tuple47( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, ) : Tuple(47) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 } class Tuple48( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, ) : Tuple(48) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 } class Tuple49( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, ) : Tuple(49) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 } class Tuple50( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, ) : Tuple(50) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 } class Tuple51( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, ) : Tuple(51) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 } class Tuple52( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, ) : Tuple(52) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 } class Tuple53( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, ) : Tuple(53) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 } class Tuple54( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, ) : Tuple(54) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 } class Tuple55( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, ) : Tuple(55) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 } class Tuple56( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, ) : Tuple(56) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 } class Tuple57( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, ) : Tuple(57) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 } class Tuple58( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, ) : Tuple(58) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 } class Tuple59( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, ) : Tuple(59) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 } class Tuple60( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, ) : Tuple(60) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 } class Tuple61( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, ) : Tuple(61) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 } class Tuple62( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, ) : Tuple(62) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 } class Tuple63( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, ) : Tuple(63) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 } class Tuple64( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, ) : Tuple(64) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 } class Tuple65( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, ) : Tuple(65) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 } class Tuple66( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, ) : Tuple(66) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 } class Tuple67( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, ) : Tuple(67) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 } class Tuple68( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, ) : Tuple(68) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 } class Tuple69( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, ) : Tuple(69) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 } class Tuple70( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, ) : Tuple(70) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 } class Tuple71( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, ) : Tuple(71) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 } class Tuple72( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, ) : Tuple(72) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 } class Tuple73( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, ) : Tuple(73) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 } class Tuple74( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, ) : Tuple(74) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 } class Tuple75( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, ) : Tuple(75) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 } class Tuple76( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, ) : Tuple(76) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 } class Tuple77( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, ) : Tuple(77) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 } class Tuple78( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, ) : Tuple(78) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 } class Tuple79( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, ) : Tuple(79) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 } class Tuple80( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, ) : Tuple(80) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 } class Tuple81( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, ) : Tuple(81) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 } class Tuple82( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, ) : Tuple(82) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 } class Tuple83( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, ) : Tuple(83) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 } class Tuple84( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, - val t84: T84, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, + val t84: T84, ) : Tuple(84) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 - operator fun component84(): T84 = t84 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 + operator fun component84(): T84 = t84 } class Tuple85( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, - val t84: T84, - val t85: T85, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, + val t84: T84, + val t85: T85, ) : Tuple(85) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 - operator fun component84(): T84 = t84 - operator fun component85(): T85 = t85 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 + operator fun component84(): T84 = t84 + operator fun component85(): T85 = t85 } class Tuple86( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, - val t84: T84, - val t85: T85, - val t86: T86, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, + val t84: T84, + val t85: T85, + val t86: T86, ) : Tuple(86) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 - operator fun component84(): T84 = t84 - operator fun component85(): T85 = t85 - operator fun component86(): T86 = t86 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 + operator fun component84(): T84 = t84 + operator fun component85(): T85 = t85 + operator fun component86(): T86 = t86 } class Tuple87( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, - val t84: T84, - val t85: T85, - val t86: T86, - val t87: T87, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, + val t84: T84, + val t85: T85, + val t86: T86, + val t87: T87, ) : Tuple(87) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 - operator fun component84(): T84 = t84 - operator fun component85(): T85 = t85 - operator fun component86(): T86 = t86 - operator fun component87(): T87 = t87 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 + operator fun component84(): T84 = t84 + operator fun component85(): T85 = t85 + operator fun component86(): T86 = t86 + operator fun component87(): T87 = t87 } class Tuple88( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, - val t84: T84, - val t85: T85, - val t86: T86, - val t87: T87, - val t88: T88, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, + val t84: T84, + val t85: T85, + val t86: T86, + val t87: T87, + val t88: T88, ) : Tuple(88) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 - operator fun component84(): T84 = t84 - operator fun component85(): T85 = t85 - operator fun component86(): T86 = t86 - operator fun component87(): T87 = t87 - operator fun component88(): T88 = t88 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 + operator fun component84(): T84 = t84 + operator fun component85(): T85 = t85 + operator fun component86(): T86 = t86 + operator fun component87(): T87 = t87 + operator fun component88(): T88 = t88 } class Tuple89( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, - val t84: T84, - val t85: T85, - val t86: T86, - val t87: T87, - val t88: T88, - val t89: T89, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, + val t84: T84, + val t85: T85, + val t86: T86, + val t87: T87, + val t88: T88, + val t89: T89, ) : Tuple(89) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 - operator fun component84(): T84 = t84 - operator fun component85(): T85 = t85 - operator fun component86(): T86 = t86 - operator fun component87(): T87 = t87 - operator fun component88(): T88 = t88 - operator fun component89(): T89 = t89 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 + operator fun component84(): T84 = t84 + operator fun component85(): T85 = t85 + operator fun component86(): T86 = t86 + operator fun component87(): T87 = t87 + operator fun component88(): T88 = t88 + operator fun component89(): T89 = t89 } class Tuple90( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, - val t84: T84, - val t85: T85, - val t86: T86, - val t87: T87, - val t88: T88, - val t89: T89, - val t90: T90, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, + val t84: T84, + val t85: T85, + val t86: T86, + val t87: T87, + val t88: T88, + val t89: T89, + val t90: T90, ) : Tuple(90) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 - operator fun component84(): T84 = t84 - operator fun component85(): T85 = t85 - operator fun component86(): T86 = t86 - operator fun component87(): T87 = t87 - operator fun component88(): T88 = t88 - operator fun component89(): T89 = t89 - operator fun component90(): T90 = t90 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 + operator fun component84(): T84 = t84 + operator fun component85(): T85 = t85 + operator fun component86(): T86 = t86 + operator fun component87(): T87 = t87 + operator fun component88(): T88 = t88 + operator fun component89(): T89 = t89 + operator fun component90(): T90 = t90 } class Tuple91( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, - val t84: T84, - val t85: T85, - val t86: T86, - val t87: T87, - val t88: T88, - val t89: T89, - val t90: T90, - val t91: T91, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, + val t84: T84, + val t85: T85, + val t86: T86, + val t87: T87, + val t88: T88, + val t89: T89, + val t90: T90, + val t91: T91, ) : Tuple(91) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 - operator fun component84(): T84 = t84 - operator fun component85(): T85 = t85 - operator fun component86(): T86 = t86 - operator fun component87(): T87 = t87 - operator fun component88(): T88 = t88 - operator fun component89(): T89 = t89 - operator fun component90(): T90 = t90 - operator fun component91(): T91 = t91 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 + operator fun component84(): T84 = t84 + operator fun component85(): T85 = t85 + operator fun component86(): T86 = t86 + operator fun component87(): T87 = t87 + operator fun component88(): T88 = t88 + operator fun component89(): T89 = t89 + operator fun component90(): T90 = t90 + operator fun component91(): T91 = t91 } class Tuple92( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, - val t84: T84, - val t85: T85, - val t86: T86, - val t87: T87, - val t88: T88, - val t89: T89, - val t90: T90, - val t91: T91, - val t92: T92, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, + val t84: T84, + val t85: T85, + val t86: T86, + val t87: T87, + val t88: T88, + val t89: T89, + val t90: T90, + val t91: T91, + val t92: T92, ) : Tuple(92) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 - operator fun component84(): T84 = t84 - operator fun component85(): T85 = t85 - operator fun component86(): T86 = t86 - operator fun component87(): T87 = t87 - operator fun component88(): T88 = t88 - operator fun component89(): T89 = t89 - operator fun component90(): T90 = t90 - operator fun component91(): T91 = t91 - operator fun component92(): T92 = t92 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 + operator fun component84(): T84 = t84 + operator fun component85(): T85 = t85 + operator fun component86(): T86 = t86 + operator fun component87(): T87 = t87 + operator fun component88(): T88 = t88 + operator fun component89(): T89 = t89 + operator fun component90(): T90 = t90 + operator fun component91(): T91 = t91 + operator fun component92(): T92 = t92 } class Tuple93( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, - val t84: T84, - val t85: T85, - val t86: T86, - val t87: T87, - val t88: T88, - val t89: T89, - val t90: T90, - val t91: T91, - val t92: T92, - val t93: T93, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, + val t84: T84, + val t85: T85, + val t86: T86, + val t87: T87, + val t88: T88, + val t89: T89, + val t90: T90, + val t91: T91, + val t92: T92, + val t93: T93, ) : Tuple(93) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 - operator fun component84(): T84 = t84 - operator fun component85(): T85 = t85 - operator fun component86(): T86 = t86 - operator fun component87(): T87 = t87 - operator fun component88(): T88 = t88 - operator fun component89(): T89 = t89 - operator fun component90(): T90 = t90 - operator fun component91(): T91 = t91 - operator fun component92(): T92 = t92 - operator fun component93(): T93 = t93 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 + operator fun component84(): T84 = t84 + operator fun component85(): T85 = t85 + operator fun component86(): T86 = t86 + operator fun component87(): T87 = t87 + operator fun component88(): T88 = t88 + operator fun component89(): T89 = t89 + operator fun component90(): T90 = t90 + operator fun component91(): T91 = t91 + operator fun component92(): T92 = t92 + operator fun component93(): T93 = t93 } class Tuple94( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, - val t84: T84, - val t85: T85, - val t86: T86, - val t87: T87, - val t88: T88, - val t89: T89, - val t90: T90, - val t91: T91, - val t92: T92, - val t93: T93, - val t94: T94, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, + val t84: T84, + val t85: T85, + val t86: T86, + val t87: T87, + val t88: T88, + val t89: T89, + val t90: T90, + val t91: T91, + val t92: T92, + val t93: T93, + val t94: T94, ) : Tuple(94) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 - operator fun component84(): T84 = t84 - operator fun component85(): T85 = t85 - operator fun component86(): T86 = t86 - operator fun component87(): T87 = t87 - operator fun component88(): T88 = t88 - operator fun component89(): T89 = t89 - operator fun component90(): T90 = t90 - operator fun component91(): T91 = t91 - operator fun component92(): T92 = t92 - operator fun component93(): T93 = t93 - operator fun component94(): T94 = t94 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 + operator fun component84(): T84 = t84 + operator fun component85(): T85 = t85 + operator fun component86(): T86 = t86 + operator fun component87(): T87 = t87 + operator fun component88(): T88 = t88 + operator fun component89(): T89 = t89 + operator fun component90(): T90 = t90 + operator fun component91(): T91 = t91 + operator fun component92(): T92 = t92 + operator fun component93(): T93 = t93 + operator fun component94(): T94 = t94 } class Tuple95( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, - val t84: T84, - val t85: T85, - val t86: T86, - val t87: T87, - val t88: T88, - val t89: T89, - val t90: T90, - val t91: T91, - val t92: T92, - val t93: T93, - val t94: T94, - val t95: T95, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, + val t84: T84, + val t85: T85, + val t86: T86, + val t87: T87, + val t88: T88, + val t89: T89, + val t90: T90, + val t91: T91, + val t92: T92, + val t93: T93, + val t94: T94, + val t95: T95, ) : Tuple(95) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 - operator fun component84(): T84 = t84 - operator fun component85(): T85 = t85 - operator fun component86(): T86 = t86 - operator fun component87(): T87 = t87 - operator fun component88(): T88 = t88 - operator fun component89(): T89 = t89 - operator fun component90(): T90 = t90 - operator fun component91(): T91 = t91 - operator fun component92(): T92 = t92 - operator fun component93(): T93 = t93 - operator fun component94(): T94 = t94 - operator fun component95(): T95 = t95 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 + operator fun component84(): T84 = t84 + operator fun component85(): T85 = t85 + operator fun component86(): T86 = t86 + operator fun component87(): T87 = t87 + operator fun component88(): T88 = t88 + operator fun component89(): T89 = t89 + operator fun component90(): T90 = t90 + operator fun component91(): T91 = t91 + operator fun component92(): T92 = t92 + operator fun component93(): T93 = t93 + operator fun component94(): T94 = t94 + operator fun component95(): T95 = t95 } class Tuple96( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, - val t84: T84, - val t85: T85, - val t86: T86, - val t87: T87, - val t88: T88, - val t89: T89, - val t90: T90, - val t91: T91, - val t92: T92, - val t93: T93, - val t94: T94, - val t95: T95, - val t96: T96, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, + val t84: T84, + val t85: T85, + val t86: T86, + val t87: T87, + val t88: T88, + val t89: T89, + val t90: T90, + val t91: T91, + val t92: T92, + val t93: T93, + val t94: T94, + val t95: T95, + val t96: T96, ) : Tuple(96) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 - operator fun component84(): T84 = t84 - operator fun component85(): T85 = t85 - operator fun component86(): T86 = t86 - operator fun component87(): T87 = t87 - operator fun component88(): T88 = t88 - operator fun component89(): T89 = t89 - operator fun component90(): T90 = t90 - operator fun component91(): T91 = t91 - operator fun component92(): T92 = t92 - operator fun component93(): T93 = t93 - operator fun component94(): T94 = t94 - operator fun component95(): T95 = t95 - operator fun component96(): T96 = t96 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 + operator fun component84(): T84 = t84 + operator fun component85(): T85 = t85 + operator fun component86(): T86 = t86 + operator fun component87(): T87 = t87 + operator fun component88(): T88 = t88 + operator fun component89(): T89 = t89 + operator fun component90(): T90 = t90 + operator fun component91(): T91 = t91 + operator fun component92(): T92 = t92 + operator fun component93(): T93 = t93 + operator fun component94(): T94 = t94 + operator fun component95(): T95 = t95 + operator fun component96(): T96 = t96 } class Tuple97( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, - val t84: T84, - val t85: T85, - val t86: T86, - val t87: T87, - val t88: T88, - val t89: T89, - val t90: T90, - val t91: T91, - val t92: T92, - val t93: T93, - val t94: T94, - val t95: T95, - val t96: T96, - val t97: T97, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, + val t84: T84, + val t85: T85, + val t86: T86, + val t87: T87, + val t88: T88, + val t89: T89, + val t90: T90, + val t91: T91, + val t92: T92, + val t93: T93, + val t94: T94, + val t95: T95, + val t96: T96, + val t97: T97, ) : Tuple(97) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 - operator fun component84(): T84 = t84 - operator fun component85(): T85 = t85 - operator fun component86(): T86 = t86 - operator fun component87(): T87 = t87 - operator fun component88(): T88 = t88 - operator fun component89(): T89 = t89 - operator fun component90(): T90 = t90 - operator fun component91(): T91 = t91 - operator fun component92(): T92 = t92 - operator fun component93(): T93 = t93 - operator fun component94(): T94 = t94 - operator fun component95(): T95 = t95 - operator fun component96(): T96 = t96 - operator fun component97(): T97 = t97 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 + operator fun component84(): T84 = t84 + operator fun component85(): T85 = t85 + operator fun component86(): T86 = t86 + operator fun component87(): T87 = t87 + operator fun component88(): T88 = t88 + operator fun component89(): T89 = t89 + operator fun component90(): T90 = t90 + operator fun component91(): T91 = t91 + operator fun component92(): T92 = t92 + operator fun component93(): T93 = t93 + operator fun component94(): T94 = t94 + operator fun component95(): T95 = t95 + operator fun component96(): T96 = t96 + operator fun component97(): T97 = t97 } class Tuple98( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, - val t84: T84, - val t85: T85, - val t86: T86, - val t87: T87, - val t88: T88, - val t89: T89, - val t90: T90, - val t91: T91, - val t92: T92, - val t93: T93, - val t94: T94, - val t95: T95, - val t96: T96, - val t97: T97, - val t98: T98, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, + val t84: T84, + val t85: T85, + val t86: T86, + val t87: T87, + val t88: T88, + val t89: T89, + val t90: T90, + val t91: T91, + val t92: T92, + val t93: T93, + val t94: T94, + val t95: T95, + val t96: T96, + val t97: T97, + val t98: T98, ) : Tuple(98) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 - operator fun component84(): T84 = t84 - operator fun component85(): T85 = t85 - operator fun component86(): T86 = t86 - operator fun component87(): T87 = t87 - operator fun component88(): T88 = t88 - operator fun component89(): T89 = t89 - operator fun component90(): T90 = t90 - operator fun component91(): T91 = t91 - operator fun component92(): T92 = t92 - operator fun component93(): T93 = t93 - operator fun component94(): T94 = t94 - operator fun component95(): T95 = t95 - operator fun component96(): T96 = t96 - operator fun component97(): T97 = t97 - operator fun component98(): T98 = t98 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 + operator fun component84(): T84 = t84 + operator fun component85(): T85 = t85 + operator fun component86(): T86 = t86 + operator fun component87(): T87 = t87 + operator fun component88(): T88 = t88 + operator fun component89(): T89 = t89 + operator fun component90(): T90 = t90 + operator fun component91(): T91 = t91 + operator fun component92(): T92 = t92 + operator fun component93(): T93 = t93 + operator fun component94(): T94 = t94 + operator fun component95(): T95 = t95 + operator fun component96(): T96 = t96 + operator fun component97(): T97 = t97 + operator fun component98(): T98 = t98 } class Tuple99( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, - val t84: T84, - val t85: T85, - val t86: T86, - val t87: T87, - val t88: T88, - val t89: T89, - val t90: T90, - val t91: T91, - val t92: T92, - val t93: T93, - val t94: T94, - val t95: T95, - val t96: T96, - val t97: T97, - val t98: T98, - val t99: T99, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, + val t84: T84, + val t85: T85, + val t86: T86, + val t87: T87, + val t88: T88, + val t89: T89, + val t90: T90, + val t91: T91, + val t92: T92, + val t93: T93, + val t94: T94, + val t95: T95, + val t96: T96, + val t97: T97, + val t98: T98, + val t99: T99, ) : Tuple(99) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 - operator fun component84(): T84 = t84 - operator fun component85(): T85 = t85 - operator fun component86(): T86 = t86 - operator fun component87(): T87 = t87 - operator fun component88(): T88 = t88 - operator fun component89(): T89 = t89 - operator fun component90(): T90 = t90 - operator fun component91(): T91 = t91 - operator fun component92(): T92 = t92 - operator fun component93(): T93 = t93 - operator fun component94(): T94 = t94 - operator fun component95(): T95 = t95 - operator fun component96(): T96 = t96 - operator fun component97(): T97 = t97 - operator fun component98(): T98 = t98 - operator fun component99(): T99 = t99 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 + operator fun component84(): T84 = t84 + operator fun component85(): T85 = t85 + operator fun component86(): T86 = t86 + operator fun component87(): T87 = t87 + operator fun component88(): T88 = t88 + operator fun component89(): T89 = t89 + operator fun component90(): T90 = t90 + operator fun component91(): T91 = t91 + operator fun component92(): T92 = t92 + operator fun component93(): T93 = t93 + operator fun component94(): T94 = t94 + operator fun component95(): T95 = t95 + operator fun component96(): T96 = t96 + operator fun component97(): T97 = t97 + operator fun component98(): T98 = t98 + operator fun component99(): T99 = t99 } class Tuple100( - val t1: T1, - val t2: T2, - val t3: T3, - val t4: T4, - val t5: T5, - val t6: T6, - val t7: T7, - val t8: T8, - val t9: T9, - val t10: T10, - val t11: T11, - val t12: T12, - val t13: T13, - val t14: T14, - val t15: T15, - val t16: T16, - val t17: T17, - val t18: T18, - val t19: T19, - val t20: T20, - val t21: T21, - val t22: T22, - val t23: T23, - val t24: T24, - val t25: T25, - val t26: T26, - val t27: T27, - val t28: T28, - val t29: T29, - val t30: T30, - val t31: T31, - val t32: T32, - val t33: T33, - val t34: T34, - val t35: T35, - val t36: T36, - val t37: T37, - val t38: T38, - val t39: T39, - val t40: T40, - val t41: T41, - val t42: T42, - val t43: T43, - val t44: T44, - val t45: T45, - val t46: T46, - val t47: T47, - val t48: T48, - val t49: T49, - val t50: T50, - val t51: T51, - val t52: T52, - val t53: T53, - val t54: T54, - val t55: T55, - val t56: T56, - val t57: T57, - val t58: T58, - val t59: T59, - val t60: T60, - val t61: T61, - val t62: T62, - val t63: T63, - val t64: T64, - val t65: T65, - val t66: T66, - val t67: T67, - val t68: T68, - val t69: T69, - val t70: T70, - val t71: T71, - val t72: T72, - val t73: T73, - val t74: T74, - val t75: T75, - val t76: T76, - val t77: T77, - val t78: T78, - val t79: T79, - val t80: T80, - val t81: T81, - val t82: T82, - val t83: T83, - val t84: T84, - val t85: T85, - val t86: T86, - val t87: T87, - val t88: T88, - val t89: T89, - val t90: T90, - val t91: T91, - val t92: T92, - val t93: T93, - val t94: T94, - val t95: T95, - val t96: T96, - val t97: T97, - val t98: T98, - val t99: T99, - val t100: T100, + val t1: T1, + val t2: T2, + val t3: T3, + val t4: T4, + val t5: T5, + val t6: T6, + val t7: T7, + val t8: T8, + val t9: T9, + val t10: T10, + val t11: T11, + val t12: T12, + val t13: T13, + val t14: T14, + val t15: T15, + val t16: T16, + val t17: T17, + val t18: T18, + val t19: T19, + val t20: T20, + val t21: T21, + val t22: T22, + val t23: T23, + val t24: T24, + val t25: T25, + val t26: T26, + val t27: T27, + val t28: T28, + val t29: T29, + val t30: T30, + val t31: T31, + val t32: T32, + val t33: T33, + val t34: T34, + val t35: T35, + val t36: T36, + val t37: T37, + val t38: T38, + val t39: T39, + val t40: T40, + val t41: T41, + val t42: T42, + val t43: T43, + val t44: T44, + val t45: T45, + val t46: T46, + val t47: T47, + val t48: T48, + val t49: T49, + val t50: T50, + val t51: T51, + val t52: T52, + val t53: T53, + val t54: T54, + val t55: T55, + val t56: T56, + val t57: T57, + val t58: T58, + val t59: T59, + val t60: T60, + val t61: T61, + val t62: T62, + val t63: T63, + val t64: T64, + val t65: T65, + val t66: T66, + val t67: T67, + val t68: T68, + val t69: T69, + val t70: T70, + val t71: T71, + val t72: T72, + val t73: T73, + val t74: T74, + val t75: T75, + val t76: T76, + val t77: T77, + val t78: T78, + val t79: T79, + val t80: T80, + val t81: T81, + val t82: T82, + val t83: T83, + val t84: T84, + val t85: T85, + val t86: T86, + val t87: T87, + val t88: T88, + val t89: T89, + val t90: T90, + val t91: T91, + val t92: T92, + val t93: T93, + val t94: T94, + val t95: T95, + val t96: T96, + val t97: T97, + val t98: T98, + val t99: T99, + val t100: T100, ) : Tuple(100) { - operator fun component1(): T1 = t1 - operator fun component2(): T2 = t2 - operator fun component3(): T3 = t3 - operator fun component4(): T4 = t4 - operator fun component5(): T5 = t5 - operator fun component6(): T6 = t6 - operator fun component7(): T7 = t7 - operator fun component8(): T8 = t8 - operator fun component9(): T9 = t9 - operator fun component10(): T10 = t10 - operator fun component11(): T11 = t11 - operator fun component12(): T12 = t12 - operator fun component13(): T13 = t13 - operator fun component14(): T14 = t14 - operator fun component15(): T15 = t15 - operator fun component16(): T16 = t16 - operator fun component17(): T17 = t17 - operator fun component18(): T18 = t18 - operator fun component19(): T19 = t19 - operator fun component20(): T20 = t20 - operator fun component21(): T21 = t21 - operator fun component22(): T22 = t22 - operator fun component23(): T23 = t23 - operator fun component24(): T24 = t24 - operator fun component25(): T25 = t25 - operator fun component26(): T26 = t26 - operator fun component27(): T27 = t27 - operator fun component28(): T28 = t28 - operator fun component29(): T29 = t29 - operator fun component30(): T30 = t30 - operator fun component31(): T31 = t31 - operator fun component32(): T32 = t32 - operator fun component33(): T33 = t33 - operator fun component34(): T34 = t34 - operator fun component35(): T35 = t35 - operator fun component36(): T36 = t36 - operator fun component37(): T37 = t37 - operator fun component38(): T38 = t38 - operator fun component39(): T39 = t39 - operator fun component40(): T40 = t40 - operator fun component41(): T41 = t41 - operator fun component42(): T42 = t42 - operator fun component43(): T43 = t43 - operator fun component44(): T44 = t44 - operator fun component45(): T45 = t45 - operator fun component46(): T46 = t46 - operator fun component47(): T47 = t47 - operator fun component48(): T48 = t48 - operator fun component49(): T49 = t49 - operator fun component50(): T50 = t50 - operator fun component51(): T51 = t51 - operator fun component52(): T52 = t52 - operator fun component53(): T53 = t53 - operator fun component54(): T54 = t54 - operator fun component55(): T55 = t55 - operator fun component56(): T56 = t56 - operator fun component57(): T57 = t57 - operator fun component58(): T58 = t58 - operator fun component59(): T59 = t59 - operator fun component60(): T60 = t60 - operator fun component61(): T61 = t61 - operator fun component62(): T62 = t62 - operator fun component63(): T63 = t63 - operator fun component64(): T64 = t64 - operator fun component65(): T65 = t65 - operator fun component66(): T66 = t66 - operator fun component67(): T67 = t67 - operator fun component68(): T68 = t68 - operator fun component69(): T69 = t69 - operator fun component70(): T70 = t70 - operator fun component71(): T71 = t71 - operator fun component72(): T72 = t72 - operator fun component73(): T73 = t73 - operator fun component74(): T74 = t74 - operator fun component75(): T75 = t75 - operator fun component76(): T76 = t76 - operator fun component77(): T77 = t77 - operator fun component78(): T78 = t78 - operator fun component79(): T79 = t79 - operator fun component80(): T80 = t80 - operator fun component81(): T81 = t81 - operator fun component82(): T82 = t82 - operator fun component83(): T83 = t83 - operator fun component84(): T84 = t84 - operator fun component85(): T85 = t85 - operator fun component86(): T86 = t86 - operator fun component87(): T87 = t87 - operator fun component88(): T88 = t88 - operator fun component89(): T89 = t89 - operator fun component90(): T90 = t90 - operator fun component91(): T91 = t91 - operator fun component92(): T92 = t92 - operator fun component93(): T93 = t93 - operator fun component94(): T94 = t94 - operator fun component95(): T95 = t95 - operator fun component96(): T96 = t96 - operator fun component97(): T97 = t97 - operator fun component98(): T98 = t98 - operator fun component99(): T99 = t99 - operator fun component100(): T100 = t100 + operator fun component1(): T1 = t1 + operator fun component2(): T2 = t2 + operator fun component3(): T3 = t3 + operator fun component4(): T4 = t4 + operator fun component5(): T5 = t5 + operator fun component6(): T6 = t6 + operator fun component7(): T7 = t7 + operator fun component8(): T8 = t8 + operator fun component9(): T9 = t9 + operator fun component10(): T10 = t10 + operator fun component11(): T11 = t11 + operator fun component12(): T12 = t12 + operator fun component13(): T13 = t13 + operator fun component14(): T14 = t14 + operator fun component15(): T15 = t15 + operator fun component16(): T16 = t16 + operator fun component17(): T17 = t17 + operator fun component18(): T18 = t18 + operator fun component19(): T19 = t19 + operator fun component20(): T20 = t20 + operator fun component21(): T21 = t21 + operator fun component22(): T22 = t22 + operator fun component23(): T23 = t23 + operator fun component24(): T24 = t24 + operator fun component25(): T25 = t25 + operator fun component26(): T26 = t26 + operator fun component27(): T27 = t27 + operator fun component28(): T28 = t28 + operator fun component29(): T29 = t29 + operator fun component30(): T30 = t30 + operator fun component31(): T31 = t31 + operator fun component32(): T32 = t32 + operator fun component33(): T33 = t33 + operator fun component34(): T34 = t34 + operator fun component35(): T35 = t35 + operator fun component36(): T36 = t36 + operator fun component37(): T37 = t37 + operator fun component38(): T38 = t38 + operator fun component39(): T39 = t39 + operator fun component40(): T40 = t40 + operator fun component41(): T41 = t41 + operator fun component42(): T42 = t42 + operator fun component43(): T43 = t43 + operator fun component44(): T44 = t44 + operator fun component45(): T45 = t45 + operator fun component46(): T46 = t46 + operator fun component47(): T47 = t47 + operator fun component48(): T48 = t48 + operator fun component49(): T49 = t49 + operator fun component50(): T50 = t50 + operator fun component51(): T51 = t51 + operator fun component52(): T52 = t52 + operator fun component53(): T53 = t53 + operator fun component54(): T54 = t54 + operator fun component55(): T55 = t55 + operator fun component56(): T56 = t56 + operator fun component57(): T57 = t57 + operator fun component58(): T58 = t58 + operator fun component59(): T59 = t59 + operator fun component60(): T60 = t60 + operator fun component61(): T61 = t61 + operator fun component62(): T62 = t62 + operator fun component63(): T63 = t63 + operator fun component64(): T64 = t64 + operator fun component65(): T65 = t65 + operator fun component66(): T66 = t66 + operator fun component67(): T67 = t67 + operator fun component68(): T68 = t68 + operator fun component69(): T69 = t69 + operator fun component70(): T70 = t70 + operator fun component71(): T71 = t71 + operator fun component72(): T72 = t72 + operator fun component73(): T73 = t73 + operator fun component74(): T74 = t74 + operator fun component75(): T75 = t75 + operator fun component76(): T76 = t76 + operator fun component77(): T77 = t77 + operator fun component78(): T78 = t78 + operator fun component79(): T79 = t79 + operator fun component80(): T80 = t80 + operator fun component81(): T81 = t81 + operator fun component82(): T82 = t82 + operator fun component83(): T83 = t83 + operator fun component84(): T84 = t84 + operator fun component85(): T85 = t85 + operator fun component86(): T86 = t86 + operator fun component87(): T87 = t87 + operator fun component88(): T88 = t88 + operator fun component89(): T89 = t89 + operator fun component90(): T90 = t90 + operator fun component91(): T91 = t91 + operator fun component92(): T92 = t92 + operator fun component93(): T93 = t93 + operator fun component94(): T94 = t94 + operator fun component95(): T95 = t95 + operator fun component96(): T96 = t96 + operator fun component97(): T97 = t97 + operator fun component98(): T98 = t98 + operator fun component99(): T99 = t99 + operator fun component100(): T100 = t100 } diff --git a/src/main/kotlin/com/mingliqiye/utils/tuple/Tuples.kt b/src/main/kotlin/com/mingliqiye/utils/tuple/Tuples.kt index bdbeb49..074e17b 100644 --- a/src/main/kotlin/com/mingliqiye/utils/tuple/Tuples.kt +++ b/src/main/kotlin/com/mingliqiye/utils/tuple/Tuples.kt @@ -27,10325 +27,10325 @@ import java.io.Serializable abstract class Tuple(val size: Int = 1) : Serializable, Iterable { - override fun iterator(): Iterator { - return object : Iterator { - private var index: Int = 0 - override fun next(): Any { - if (!hasNext()) throw NoSuchElementException("element next is None") - return get(index++) - } + override fun iterator(): Iterator { + return object : Iterator { + private var index: Int = 0 + override fun next(): Any { + if (!hasNext()) throw NoSuchElementException("element next is None") + return get(index++) + } - override fun hasNext(): Boolean = index < size - } - } + override fun hasNext(): Boolean = index < size + } + } - open fun toList(): List { - return (0.. { + return (0.. { - return toList().toMutableList() - } + open fun toMutableList(): MutableList { + return toList().toMutableList() + } - open fun toSet(): Set { - return toList().toSet() - } + open fun toSet(): Set { + return toList().toSet() + } - open fun toMutableSet(): MutableSet { - return toList().toMutableSet() - } + open fun toMutableSet(): MutableSet { + return toList().toMutableSet() + } - operator fun get(index: Int): Any { - if (index >= size) { - throw IndexOutOfBoundsException("index $index is out size $size") - } - return this.javaClass.getDeclaredMethod("component${index + 1}").invoke(this) - } + operator fun get(index: Int): Any { + if (index >= size) { + throw IndexOutOfBoundsException("index $index is out size $size") + } + return this.javaClass.getDeclaredMethod("component${index + 1}").invoke(this) + } - companion object { - @JvmStatic - fun of(t1: T1) = Tuple1(t1) + companion object { + @JvmStatic + fun of(t1: T1) = Tuple1(t1) - @JvmStatic - fun of(t1: T1, t2: T2) = Tuple2(t1, t2) + @JvmStatic + fun of(t1: T1, t2: T2) = Tuple2(t1, t2) - @JvmStatic - fun of(t1: T1, t2: T2, t3: T3) = Tuple3(t1, t2, t3) + @JvmStatic + fun of(t1: T1, t2: T2, t3: T3) = Tuple3(t1, t2, t3) - @JvmStatic - fun of(t1: T1, t2: T2, t3: T3, t4: T4) = Tuple4(t1, t2, t3, t4) + @JvmStatic + fun of(t1: T1, t2: T2, t3: T3, t4: T4) = Tuple4(t1, t2, t3, t4) - @JvmStatic - fun of(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) = Tuple5(t1, t2, t3, t4, t5) + @JvmStatic + fun of(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) = Tuple5(t1, t2, t3, t4, t5) - @JvmStatic - fun of(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6) = Tuple6(t1, t2, t3, t4, t5, t6) + @JvmStatic + fun of(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6) = Tuple6(t1, t2, t3, t4, t5, t6) - @JvmStatic - fun of(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7) = - Tuple7(t1, t2, t3, t4, t5, t6, t7) + @JvmStatic + fun of(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7) = + Tuple7(t1, t2, t3, t4, t5, t6, t7) - @JvmStatic - fun of(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8) = - Tuple8(t1, t2, t3, t4, t5, t6, t7, t8) + @JvmStatic + fun of(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8) = + Tuple8(t1, t2, t3, t4, t5, t6, t7, t8) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - ) = Tuple9(t1, t2, t3, t4, t5, t6, t7, t8, t9) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + ) = Tuple9(t1, t2, t3, t4, t5, t6, t7, t8, t9) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - ) = Tuple10(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + ) = Tuple10(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - ) = Tuple11(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + ) = Tuple11(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - ) = Tuple12(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + ) = Tuple12(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - ) = Tuple13(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + ) = Tuple13(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - ) = Tuple14(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + ) = Tuple14(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - ) = Tuple15(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + ) = Tuple15(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - ) = Tuple16(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + ) = Tuple16(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - ) = Tuple17(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + ) = Tuple17(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - ) = Tuple18(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + ) = Tuple18(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - ) = Tuple19(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + ) = Tuple19(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - ) = Tuple20(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + ) = Tuple20(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - ) = Tuple21(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + ) = Tuple21(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - ) = Tuple22(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + ) = Tuple22(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - ) = Tuple23( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + ) = Tuple23( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - ) = Tuple24( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + ) = Tuple24( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - ) = Tuple25( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + ) = Tuple25( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - ) = Tuple26( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + ) = Tuple26( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - ) = Tuple27( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + ) = Tuple27( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - ) = Tuple28( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + ) = Tuple28( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - ) = Tuple29( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + ) = Tuple29( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - ) = Tuple30( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + ) = Tuple30( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - ) = Tuple31( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + ) = Tuple31( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - ) = Tuple32( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + ) = Tuple32( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - ) = Tuple33( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + ) = Tuple33( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - ) = Tuple34( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + ) = Tuple34( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - ) = Tuple35( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + ) = Tuple35( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - ) = Tuple36( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + ) = Tuple36( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - ) = Tuple37( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + ) = Tuple37( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - ) = Tuple38( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + ) = Tuple38( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - ) = Tuple39( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + ) = Tuple39( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - ) = Tuple40( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + ) = Tuple40( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - ) = Tuple41( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + ) = Tuple41( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - ) = Tuple42( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + ) = Tuple42( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - ) = Tuple43( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + ) = Tuple43( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - ) = Tuple44( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + ) = Tuple44( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - ) = Tuple45( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + ) = Tuple45( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - ) = Tuple46( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + ) = Tuple46( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - ) = Tuple47( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + ) = Tuple47( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - ) = Tuple48( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + ) = Tuple48( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - ) = Tuple49( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + ) = Tuple49( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - ) = Tuple50( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + ) = Tuple50( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - ) = Tuple51( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + ) = Tuple51( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - ) = Tuple52( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + ) = Tuple52( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - ) = Tuple53( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + ) = Tuple53( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - ) = Tuple54( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + ) = Tuple54( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - ) = Tuple55( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + ) = Tuple55( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - ) = Tuple56( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + ) = Tuple56( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - ) = Tuple57( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + ) = Tuple57( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - ) = Tuple58( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + ) = Tuple58( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - ) = Tuple59( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + ) = Tuple59( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - ) = Tuple60( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + ) = Tuple60( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - ) = Tuple61( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + ) = Tuple61( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - ) = Tuple62( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + ) = Tuple62( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - ) = Tuple63( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + ) = Tuple63( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - ) = Tuple64( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + ) = Tuple64( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - ) = Tuple65( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + ) = Tuple65( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - ) = Tuple66( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + ) = Tuple66( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - ) = Tuple67( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + ) = Tuple67( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - ) = Tuple68( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + ) = Tuple68( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - ) = Tuple69( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + ) = Tuple69( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - ) = Tuple70( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + ) = Tuple70( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - ) = Tuple71( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + ) = Tuple71( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - ) = Tuple72( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + ) = Tuple72( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - ) = Tuple73( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + ) = Tuple73( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - ) = Tuple74( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + ) = Tuple74( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - ) = Tuple75( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + ) = Tuple75( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - ) = Tuple76( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + ) = Tuple76( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - ) = Tuple77( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + ) = Tuple77( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - ) = Tuple78( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + ) = Tuple78( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - ) = Tuple79( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + ) = Tuple79( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - ) = Tuple80( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + ) = Tuple80( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - ) = Tuple81( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + ) = Tuple81( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - ) = Tuple82( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + ) = Tuple82( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - ) = Tuple83( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + ) = Tuple83( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - t84: T84, - ) = Tuple84( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83, - t84 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + t84: T84, + ) = Tuple84( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83, + t84 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - t84: T84, - t85: T85, - ) = Tuple85( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83, - t84, - t85 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + t84: T84, + t85: T85, + ) = Tuple85( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83, + t84, + t85 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - t84: T84, - t85: T85, - t86: T86, - ) = Tuple86( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83, - t84, - t85, - t86 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + t84: T84, + t85: T85, + t86: T86, + ) = Tuple86( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83, + t84, + t85, + t86 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - t84: T84, - t85: T85, - t86: T86, - t87: T87, - ) = Tuple87( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83, - t84, - t85, - t86, - t87 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + t84: T84, + t85: T85, + t86: T86, + t87: T87, + ) = Tuple87( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83, + t84, + t85, + t86, + t87 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - t84: T84, - t85: T85, - t86: T86, - t87: T87, - t88: T88, - ) = Tuple88( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83, - t84, - t85, - t86, - t87, - t88 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + t84: T84, + t85: T85, + t86: T86, + t87: T87, + t88: T88, + ) = Tuple88( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83, + t84, + t85, + t86, + t87, + t88 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - t84: T84, - t85: T85, - t86: T86, - t87: T87, - t88: T88, - t89: T89, - ) = Tuple89( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83, - t84, - t85, - t86, - t87, - t88, - t89 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + t84: T84, + t85: T85, + t86: T86, + t87: T87, + t88: T88, + t89: T89, + ) = Tuple89( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83, + t84, + t85, + t86, + t87, + t88, + t89 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - t84: T84, - t85: T85, - t86: T86, - t87: T87, - t88: T88, - t89: T89, - t90: T90, - ) = Tuple90( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83, - t84, - t85, - t86, - t87, - t88, - t89, - t90 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + t84: T84, + t85: T85, + t86: T86, + t87: T87, + t88: T88, + t89: T89, + t90: T90, + ) = Tuple90( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83, + t84, + t85, + t86, + t87, + t88, + t89, + t90 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - t84: T84, - t85: T85, - t86: T86, - t87: T87, - t88: T88, - t89: T89, - t90: T90, - t91: T91, - ) = Tuple91( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83, - t84, - t85, - t86, - t87, - t88, - t89, - t90, - t91 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + t84: T84, + t85: T85, + t86: T86, + t87: T87, + t88: T88, + t89: T89, + t90: T90, + t91: T91, + ) = Tuple91( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83, + t84, + t85, + t86, + t87, + t88, + t89, + t90, + t91 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - t84: T84, - t85: T85, - t86: T86, - t87: T87, - t88: T88, - t89: T89, - t90: T90, - t91: T91, - t92: T92, - ) = Tuple92( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83, - t84, - t85, - t86, - t87, - t88, - t89, - t90, - t91, - t92 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + t84: T84, + t85: T85, + t86: T86, + t87: T87, + t88: T88, + t89: T89, + t90: T90, + t91: T91, + t92: T92, + ) = Tuple92( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83, + t84, + t85, + t86, + t87, + t88, + t89, + t90, + t91, + t92 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - t84: T84, - t85: T85, - t86: T86, - t87: T87, - t88: T88, - t89: T89, - t90: T90, - t91: T91, - t92: T92, - t93: T93, - ) = Tuple93( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83, - t84, - t85, - t86, - t87, - t88, - t89, - t90, - t91, - t92, - t93 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + t84: T84, + t85: T85, + t86: T86, + t87: T87, + t88: T88, + t89: T89, + t90: T90, + t91: T91, + t92: T92, + t93: T93, + ) = Tuple93( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83, + t84, + t85, + t86, + t87, + t88, + t89, + t90, + t91, + t92, + t93 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - t84: T84, - t85: T85, - t86: T86, - t87: T87, - t88: T88, - t89: T89, - t90: T90, - t91: T91, - t92: T92, - t93: T93, - t94: T94, - ) = Tuple94( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83, - t84, - t85, - t86, - t87, - t88, - t89, - t90, - t91, - t92, - t93, - t94 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + t84: T84, + t85: T85, + t86: T86, + t87: T87, + t88: T88, + t89: T89, + t90: T90, + t91: T91, + t92: T92, + t93: T93, + t94: T94, + ) = Tuple94( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83, + t84, + t85, + t86, + t87, + t88, + t89, + t90, + t91, + t92, + t93, + t94 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - t84: T84, - t85: T85, - t86: T86, - t87: T87, - t88: T88, - t89: T89, - t90: T90, - t91: T91, - t92: T92, - t93: T93, - t94: T94, - t95: T95, - ) = Tuple95( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83, - t84, - t85, - t86, - t87, - t88, - t89, - t90, - t91, - t92, - t93, - t94, - t95 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + t84: T84, + t85: T85, + t86: T86, + t87: T87, + t88: T88, + t89: T89, + t90: T90, + t91: T91, + t92: T92, + t93: T93, + t94: T94, + t95: T95, + ) = Tuple95( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83, + t84, + t85, + t86, + t87, + t88, + t89, + t90, + t91, + t92, + t93, + t94, + t95 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - t84: T84, - t85: T85, - t86: T86, - t87: T87, - t88: T88, - t89: T89, - t90: T90, - t91: T91, - t92: T92, - t93: T93, - t94: T94, - t95: T95, - t96: T96, - ) = Tuple96( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83, - t84, - t85, - t86, - t87, - t88, - t89, - t90, - t91, - t92, - t93, - t94, - t95, - t96 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + t84: T84, + t85: T85, + t86: T86, + t87: T87, + t88: T88, + t89: T89, + t90: T90, + t91: T91, + t92: T92, + t93: T93, + t94: T94, + t95: T95, + t96: T96, + ) = Tuple96( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83, + t84, + t85, + t86, + t87, + t88, + t89, + t90, + t91, + t92, + t93, + t94, + t95, + t96 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - t84: T84, - t85: T85, - t86: T86, - t87: T87, - t88: T88, - t89: T89, - t90: T90, - t91: T91, - t92: T92, - t93: T93, - t94: T94, - t95: T95, - t96: T96, - t97: T97, - ) = Tuple97( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83, - t84, - t85, - t86, - t87, - t88, - t89, - t90, - t91, - t92, - t93, - t94, - t95, - t96, - t97 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + t84: T84, + t85: T85, + t86: T86, + t87: T87, + t88: T88, + t89: T89, + t90: T90, + t91: T91, + t92: T92, + t93: T93, + t94: T94, + t95: T95, + t96: T96, + t97: T97, + ) = Tuple97( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83, + t84, + t85, + t86, + t87, + t88, + t89, + t90, + t91, + t92, + t93, + t94, + t95, + t96, + t97 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - t84: T84, - t85: T85, - t86: T86, - t87: T87, - t88: T88, - t89: T89, - t90: T90, - t91: T91, - t92: T92, - t93: T93, - t94: T94, - t95: T95, - t96: T96, - t97: T97, - t98: T98, - ) = Tuple98( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83, - t84, - t85, - t86, - t87, - t88, - t89, - t90, - t91, - t92, - t93, - t94, - t95, - t96, - t97, - t98 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + t84: T84, + t85: T85, + t86: T86, + t87: T87, + t88: T88, + t89: T89, + t90: T90, + t91: T91, + t92: T92, + t93: T93, + t94: T94, + t95: T95, + t96: T96, + t97: T97, + t98: T98, + ) = Tuple98( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83, + t84, + t85, + t86, + t87, + t88, + t89, + t90, + t91, + t92, + t93, + t94, + t95, + t96, + t97, + t98 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - t84: T84, - t85: T85, - t86: T86, - t87: T87, - t88: T88, - t89: T89, - t90: T90, - t91: T91, - t92: T92, - t93: T93, - t94: T94, - t95: T95, - t96: T96, - t97: T97, - t98: T98, - t99: T99, - ) = Tuple99( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83, - t84, - t85, - t86, - t87, - t88, - t89, - t90, - t91, - t92, - t93, - t94, - t95, - t96, - t97, - t98, - t99 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + t84: T84, + t85: T85, + t86: T86, + t87: T87, + t88: T88, + t89: T89, + t90: T90, + t91: T91, + t92: T92, + t93: T93, + t94: T94, + t95: T95, + t96: T96, + t97: T97, + t98: T98, + t99: T99, + ) = Tuple99( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83, + t84, + t85, + t86, + t87, + t88, + t89, + t90, + t91, + t92, + t93, + t94, + t95, + t96, + t97, + t98, + t99 + ) - @JvmStatic - fun of( - t1: T1, - t2: T2, - t3: T3, - t4: T4, - t5: T5, - t6: T6, - t7: T7, - t8: T8, - t9: T9, - t10: T10, - t11: T11, - t12: T12, - t13: T13, - t14: T14, - t15: T15, - t16: T16, - t17: T17, - t18: T18, - t19: T19, - t20: T20, - t21: T21, - t22: T22, - t23: T23, - t24: T24, - t25: T25, - t26: T26, - t27: T27, - t28: T28, - t29: T29, - t30: T30, - t31: T31, - t32: T32, - t33: T33, - t34: T34, - t35: T35, - t36: T36, - t37: T37, - t38: T38, - t39: T39, - t40: T40, - t41: T41, - t42: T42, - t43: T43, - t44: T44, - t45: T45, - t46: T46, - t47: T47, - t48: T48, - t49: T49, - t50: T50, - t51: T51, - t52: T52, - t53: T53, - t54: T54, - t55: T55, - t56: T56, - t57: T57, - t58: T58, - t59: T59, - t60: T60, - t61: T61, - t62: T62, - t63: T63, - t64: T64, - t65: T65, - t66: T66, - t67: T67, - t68: T68, - t69: T69, - t70: T70, - t71: T71, - t72: T72, - t73: T73, - t74: T74, - t75: T75, - t76: T76, - t77: T77, - t78: T78, - t79: T79, - t80: T80, - t81: T81, - t82: T82, - t83: T83, - t84: T84, - t85: T85, - t86: T86, - t87: T87, - t88: T88, - t89: T89, - t90: T90, - t91: T91, - t92: T92, - t93: T93, - t94: T94, - t95: T95, - t96: T96, - t97: T97, - t98: T98, - t99: T99, - t100: T100, - ) = Tuple100( - t1, - t2, - t3, - t4, - t5, - t6, - t7, - t8, - t9, - t10, - t11, - t12, - t13, - t14, - t15, - t16, - t17, - t18, - t19, - t20, - t21, - t22, - t23, - t24, - t25, - t26, - t27, - t28, - t29, - t30, - t31, - t32, - t33, - t34, - t35, - t36, - t37, - t38, - t39, - t40, - t41, - t42, - t43, - t44, - t45, - t46, - t47, - t48, - t49, - t50, - t51, - t52, - t53, - t54, - t55, - t56, - t57, - t58, - t59, - t60, - t61, - t62, - t63, - t64, - t65, - t66, - t67, - t68, - t69, - t70, - t71, - t72, - t73, - t74, - t75, - t76, - t77, - t78, - t79, - t80, - t81, - t82, - t83, - t84, - t85, - t86, - t87, - t88, - t89, - t90, - t91, - t92, - t93, - t94, - t95, - t96, - t97, - t98, - t99, - t100 - ) + @JvmStatic + fun of( + t1: T1, + t2: T2, + t3: T3, + t4: T4, + t5: T5, + t6: T6, + t7: T7, + t8: T8, + t9: T9, + t10: T10, + t11: T11, + t12: T12, + t13: T13, + t14: T14, + t15: T15, + t16: T16, + t17: T17, + t18: T18, + t19: T19, + t20: T20, + t21: T21, + t22: T22, + t23: T23, + t24: T24, + t25: T25, + t26: T26, + t27: T27, + t28: T28, + t29: T29, + t30: T30, + t31: T31, + t32: T32, + t33: T33, + t34: T34, + t35: T35, + t36: T36, + t37: T37, + t38: T38, + t39: T39, + t40: T40, + t41: T41, + t42: T42, + t43: T43, + t44: T44, + t45: T45, + t46: T46, + t47: T47, + t48: T48, + t49: T49, + t50: T50, + t51: T51, + t52: T52, + t53: T53, + t54: T54, + t55: T55, + t56: T56, + t57: T57, + t58: T58, + t59: T59, + t60: T60, + t61: T61, + t62: T62, + t63: T63, + t64: T64, + t65: T65, + t66: T66, + t67: T67, + t68: T68, + t69: T69, + t70: T70, + t71: T71, + t72: T72, + t73: T73, + t74: T74, + t75: T75, + t76: T76, + t77: T77, + t78: T78, + t79: T79, + t80: T80, + t81: T81, + t82: T82, + t83: T83, + t84: T84, + t85: T85, + t86: T86, + t87: T87, + t88: T88, + t89: T89, + t90: T90, + t91: T91, + t92: T92, + t93: T93, + t94: T94, + t95: T95, + t96: T96, + t97: T97, + t98: T98, + t99: T99, + t100: T100, + ) = Tuple100( + t1, + t2, + t3, + t4, + t5, + t6, + t7, + t8, + t9, + t10, + t11, + t12, + t13, + t14, + t15, + t16, + t17, + t18, + t19, + t20, + t21, + t22, + t23, + t24, + t25, + t26, + t27, + t28, + t29, + t30, + t31, + t32, + t33, + t34, + t35, + t36, + t37, + t38, + t39, + t40, + t41, + t42, + t43, + t44, + t45, + t46, + t47, + t48, + t49, + t50, + t51, + t52, + t53, + t54, + t55, + t56, + t57, + t58, + t59, + t60, + t61, + t62, + t63, + t64, + t65, + t66, + t67, + t68, + t69, + t70, + t71, + t72, + t73, + t74, + t75, + t76, + t77, + t78, + t79, + t80, + t81, + t82, + t83, + t84, + t85, + t86, + t87, + t88, + t89, + t90, + t91, + t92, + t93, + t94, + t95, + t96, + t97, + t98, + t99, + t100 + ) - } + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/uuid/MysqlUUIDv1.kt b/src/main/kotlin/com/mingliqiye/utils/uuid/MysqlUUIDv1.kt index 80831ec..5b9907c 100644 --- a/src/main/kotlin/com/mingliqiye/utils/uuid/MysqlUUIDv1.kt +++ b/src/main/kotlin/com/mingliqiye/utils/uuid/MysqlUUIDv1.kt @@ -34,13 +34,13 @@ import com.mingliqiye.utils.array.copyTo * @since 4.6.2 */ fun uuidToMysql(uuid: ByteArray): ByteArray { - return ByteArray(16).also { - // 按照MySQL UUID存储格式重新排列字节:前4字节、中间2字节、后2字节、最后8字节 - uuid.copyTo(it, 0, 4, 4) - .copyTo(it, 4, 2, 2) - .copyTo(it, 6, 0, 2) - .copyTo(it, 8, 8, 8) - } + return ByteArray(16).also { + // 按照MySQL UUID存储格式重新排列字节:前4字节、中间2字节、后2字节、最后8字节 + uuid.copyTo(it, 0, 4, 4) + .copyTo(it, 4, 2, 2) + .copyTo(it, 6, 0, 2) + .copyTo(it, 8, 8, 8) + } } /** @@ -52,11 +52,11 @@ fun uuidToMysql(uuid: ByteArray): ByteArray { * @since 4.6.2 */ fun mysqlToUuid(uuid: ByteArray): ByteArray { - return ByteArray(16).also { - // 按照标准UUID格式恢复字节顺序:第6-7字节、第4-5字节、第0-3字节、第8-15字节 - uuid.copyTo(it, 0, 6, 2) - .copyTo(it, 2, 4, 2) - .copyTo(it, 4, 0, 4) - .copyTo(it, 8, 8, 8) - } + return ByteArray(16).also { + // 按照标准UUID格式恢复字节顺序:第6-7字节、第4-5字节、第0-3字节、第8-15字节 + uuid.copyTo(it, 0, 6, 2) + .copyTo(it, 2, 4, 2) + .copyTo(it, 4, 0, 4) + .copyTo(it, 8, 8, 8) + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/uuid/UUID.kt b/src/main/kotlin/com/mingliqiye/utils/uuid/UUID.kt index b2f762b..3159cff 100644 --- a/src/main/kotlin/com/mingliqiye/utils/uuid/UUID.kt +++ b/src/main/kotlin/com/mingliqiye/utils/uuid/UUID.kt @@ -47,736 +47,736 @@ import java.util.UUID as JUUID * V8 请开发者自己实现 */ @Schema( - name = "UUID", - description = "UUID", - type = "string", - format = "uuid" + name = "UUID", + description = "UUID", + type = "string", + format = "uuid" ) class UUID : Serializable { - private val data: ByteArray - private val mostSigBits: Long - private val leastSigBits: Long - private val version: Int - - companion object { - - - private var lastTimestamp = 0L - private var clockSequence = Random.nextInt(0x3FFF + 1) - private val clockSeqHolder = AtomicLong(0) - - /** - * 预期 UUID 字符串中连字符的位置数组。 - */ - @JvmStatic - val expectedHyphenPositions = intArrayOf(8, 13, 18, 23) - - /** - * UUID 纪元偏移量(以天为单位)。 - */ - @JvmStatic - val UUID_EPOCH_OFFSET = 141427L - - - @JvmStatic - fun ofBase64ShortString(baseShortString: String): UUID { - return UUID(BaseType.BASE64.decode(baseShortString)) - } - - @JvmStatic - fun ofBase256ShortString(baseShortString: String): UUID { - return UUID(BaseType.BASE256.decode(baseShortString)) - } - - @JvmStatic - fun ofBase91ShortString(baseShortString: String): UUID { - return UUID(BaseType.BASE91.decode(baseShortString)) - } - - @JvmStatic - fun getV8( - customA: ByteArray, // 6字节 - customB: ByteArray, // 2字节 前4位被替换位版本号 - customC: ByteArray, // 8字节, 前2位被替换位变体 - ): UUID { - require(customA.size == 6) { "customA 必须是6字节" } - require(customB.size == 2) { "customB 必须是2字节" } - require(customC.size == 8) { "customC 必须是8字节" } - val rbyte = ByteArray(16) - customA.copyTo(rbyte, 0, 0, 6) - customB.copyTo(rbyte, 0, 6, 2) - customC.copyTo(rbyte, 0, 8, 8) - rbyte[6] = (rbyte[6].toInt() and 0x0F or 0x80).toByte() - rbyte[8] = (rbyte[8].toInt() and 0x3F or 0x80).toByte() - return UUID(rbyte) - } - - /** - * 生成一个 UUID V1 版本,使用系统时钟、随机数和 MAC 地址。 - * 如果 MAC 地址为空,则使用随机生成的 MAC 地址。 - * - * @return UUID V1 实例 - */ - @JvmStatic - fun getV1(): UUID { - val time = DateTime.now().add(DateTimeOffset.of(UUID_EPOCH_OFFSET, ChronoUnit.DAYS)).to100NanoTime() - val timeLow = (time and 0xFFFFFFFFL).toInt() - val timeMid = ((time shr 32) and 0xFFFFL).toShort() - val timeHighAndVersion = (((time shr 48) and 0x0FFFL) or 0x1000L).toShort() - val clockSeq: Long = if (time == lastTimestamp) { - clockSeqHolder.addAndGet(1) - } else { - clockSeqHolder.set(0) - lastTimestamp = time - 0 - } - val byteBuffer = ByteBuffer.wrap(ByteArray(16)) - byteBuffer.putInt(timeLow) - byteBuffer.putShort(timeMid) - byteBuffer.putShort(timeHighAndVersion) - byteBuffer.putShort((clockSeq and 0x3FFF).toShort()) - byteBuffer.put(macAddressBytes) - - return UUID(byteBuffer.array()) - } - - @JvmStatic - fun getV1RandomMac(): UUID { - val time = DateTime.now().add(DateTimeOffset.of(UUID_EPOCH_OFFSET, ChronoUnit.DAYS)).to100NanoTime() - val timeLow = (time and 0xFFFFFFFFL).toInt() - val timeMid = ((time shr 32) and 0xFFFFL).toShort() - val timeHighAndVersion = (((time shr 48) and 0x0FFFL) or 0x1000L).toShort() - val clockSeq: Long = if (time == lastTimestamp) { - clockSeqHolder.addAndGet(1) - } else { - clockSeqHolder.set(0) - lastTimestamp = time - 0 - } - lastTimestamp = time - - val byteBuffer = ByteBuffer.wrap(ByteArray(16)) - byteBuffer.putInt(timeLow) - byteBuffer.putShort(timeMid) - byteBuffer.putShort(timeHighAndVersion) - byteBuffer.putShort((clockSeq and 0x3FFF).toShort()) - byteBuffer.put(randomByte(6)) - - return UUID(byteBuffer.array()) - } - - /** - * 生成一个 UUID V4 版本,使用加密安全的随机数。 - * - * @return UUID V4 实例 - */ - @JvmStatic - fun getV4(): UUID { - val randomBytes = randomByte(16) - randomBytes[6] = (randomBytes[6].toInt() and 0x0F or 0x40).toByte() - randomBytes[8] = (randomBytes[8].toInt() and 0x3F or 0x80).toByte() - return UUID(randomBytes) - } - - /** - * 生成一个 UUID V3 版本,基于命名空间和名称的 MD5 哈希值。 - * - * @param namepath 命名空间 UUID - * @param user 用户提供的字符串 - * @return UUID V3 实例 - */ - @JvmStatic - fun getV3(namepath: UUID, user: String): UUID { - val md = MessageDigest.getInstance("MD5") - val userB = user.toByteArray() - val array = md.digest( - ByteBuffer.wrap(ByteArray(16 + userB.size)).put(namepath.data).put(userB).array() - ) - array[6] = (array[6].toInt() and 0x0F or 0x30).toByte() - array[8] = (array[8].toInt() and 0x3F or 0x80).toByte() - return UUID(array) - } - - /** - * 生成一个 UUID V5 版本,基于命名空间和名称的 SHA-1 哈希值。 - * - * @param namepath 命名空间 UUID - * @param user 用户提供的字符串 - * @return UUID V5 实例 - */ - @JvmStatic - fun getV5(namepath: UUID, user: String): UUID { - val sha1 = MessageDigest.getInstance("SHA-1") - val userB = user.toByteArray() - val array = sha1.digest( - ByteBuffer.wrap(ByteArray(namepath.data.size + userB.size)).put(namepath.data).put(userB).array() - ) - array[6] = (array[6].toInt() and 0x0F or 0x50).toByte() - array[8] = (array[8].toInt() and 0x3F or 0x80).toByte() - return UUID(ByteBuffer.wrap(ByteArray(16)).put(array, 0, 16).array()) - } - - /** - * 生成一个 UUID V6 版本,使用时间戳和随机节点信息。 - * - * @return UUID V6 实例 - */ - @JvmStatic - fun getV6(): UUID { - val timestamp = DateTime.now().add(DateTimeOffset.of(UUID_EPOCH_OFFSET, ChronoUnit.DAYS)) - .to100NanoTime() and 0x0FFFFFFFFFFFFFFFL - val timeHigh = (timestamp ushr 12) and 0xFFFFFFFFFFFFL - val timeMid = timestamp and 0x0FFFL - val clockSeq = Random.nextInt(16384) and 0x3FFF - val node = Random.nextLong() and 0x0000FFFFFFFFFFFFL - val buffer = ByteBuffer.allocate(16) - buffer.putLong((timeHigh shl 16) or (0x6000L) or (timeMid and 0x0FFF)) - buffer.putShort((0x8000 or (clockSeq and 0x3FFF)).toShort()) - buffer.put((node shr 40).toByte()) - buffer.put((node shr 32).toByte()) - buffer.put((node shr 24).toByte()) - buffer.put((node shr 16).toByte()) - buffer.put((node shr 8).toByte()) - buffer.put(node.toByte()) - return UUID(buffer.array()) - } - - /** - * 生成一个 UUID V7 版本,使用毫秒级时间戳和随机数。 - * - * @return UUID V7 实例 - */ - @JvmStatic - fun getV7(): UUID { - val instant = DateTime.now().toMillisecondTime() - val buffer = ByteBuffer.allocate(16) - buffer.putInt((instant shr 16).toInt()) - buffer.putShort((instant).toShort()) - buffer.put(randomByte(2)) - buffer.putLong(Random.nextLong()) - val bytes = buffer.array() - bytes[6] = (bytes[6].toInt() and 0x0F or 0x70).toByte() - bytes[8] = (bytes[8].toInt() and 0x3F or 0x80).toByte() - return UUID(bytes) - } - - /** - * 根据字符串创建 UUID 实例。 - * - * @param uuid UUID 字符串 - * @return UUID 实例 - */ - @JvmStatic - fun of(uuid: String): UUID { - return UUID(uuid) - } - - /** - * 根据字节数组创建 UUID 实例。 - * - * @param uuid UUID 字节数组 - * @return UUID 实例 - */ - @JvmStatic - fun of(uuid: ByteArray): UUID { - return UUID(uuid) - } - - /** - * 根据高位和低位长整型创建 UUID 实例。 - * - * @param msb 高位长整型 - * @param lsb 低位长整型 - * @return UUID 实例 - */ - @JvmStatic - fun of(msb: Long, lsb: Long): UUID { - return UUID(msb, lsb) - } - - /** - * 从ByteBuffer创建UUID对象 - * - * @param byteBuffer 包含UUID字节数据的ByteBuffer对象,必须包含至少16个字节的数据 - * @return 从ByteBuffer中读取的16个字节创建的UUID对象 - */ - @JvmStatic - fun of(byteBuffer: ByteBuffer): UUID { - val byte = ByteArray(16) - byteBuffer.get(byte) - return UUID(byte) - } - - /** - * 根据 MySQL UUID 字节数组创建 UUID 实例。 - * - * @param byteArray MySQL UUID 字节数组 - * @return UUID 实例 - */ - @JvmStatic - fun ofMysqlUUID(byteArray: ByteArray): UUID { - return UUID(mysqlToUuid(byteArray)) - } - - /** - * 根据 MySQL UUID 实例创建 UUID 实例。 - * - * @param uuid MySQL UUID 实例 - * @return UUID 实例 - */ - @JvmStatic - fun ofMysqlUUID(uuid: UUID): UUID { - return UUID(mysqlToUuid(uuid.data)) - } - - /** - * 获取最大 UUID(所有字节为 0xFF)。 - * - * @return 最大 UUID 实例 - */ - @JvmStatic - fun getMaxUUID(): UUID { - return UUID( - ByteArray( - 16 - ) { 0xFF.toByte() }) - } - - /** - * 获取最小 UUID(所有字节为 0x00)。 - * - * @return 最小 UUID 实例 - */ - @JvmStatic - fun getMinUUID(): UUID { - return UUID( - ByteArray( - 16 - ) { 0x00.toByte() }) - } - - /** - * 将 Java UUID 转换为自定义 UUID 实例。 - * - * @receiver Java UUID 实例 - * @return 自定义 UUID 实例 - */ - @JvmStatic - @JvmName("ofJUUID") - fun JUUID.toMLUUID(): UUID { - return UUID(this) - } - - /** - * 从字符串解析 UUID 字节数组。 - * - * @param uuidString UUID 字符串 - * @return UUID 字节数组 - */ - private fun fromString(uuidString: String): ByteArray { - val cleanStr = when (uuidString.length) { - 36 -> { - for (i in expectedHyphenPositions) { - if (uuidString[i] != '-') { - throw IllegalArgumentException("Invalid UUID string: $uuidString at index $i") - } - } - uuidString.replace("-", "") - } - - 32 -> uuidString - else -> throw IllegalArgumentException("Invalid UUID string: $uuidString") - } - - // 直接按索引提取各段并校验 - val segments = arrayOf( - cleanStr.take(8), - cleanStr.substring(8, 12), - cleanStr.substring(12, 16), - cleanStr.substring(16, 20), - cleanStr.substring(20, 32) - ) - - for (segment in segments) { - if (!segment.matches(Regex("^[0-9A-Fa-f]+$"))) { - throw IllegalArgumentException("Invalid UUID segment: $segment") - } - } - - return cleanStr.chunked(2).map { it.toInt(16).toByte() }.toByteArray() - } - - /** - * 将 MAC 地址字节数组转换为长整型。 - * - * @param mac MAC 地址字节数组(必须为 6 字节) - * @return MAC 地址对应的长整型值 - */ - private fun macBytesToLong(mac: ByteArray): Long { - require(mac.size == 6) { "MAC地址必须是6字节" } - var result = 0L - for (i in 0 until 6) { - result = (result shl 8) or (mac[i].toLong() and 0xFF) - } - return result - } - - fun of(str: String, base: BaseType): UUID { - return UUID(base.baseCodec.decode(str)) - } - - } - - /** - * 构造函数,根据字节数组初始化 UUID。 - * - * @param data UUID 字节数组(必须为 16 字节) - */ - constructor(data: ByteArray) { - require(data.size == 16) { "UUID byte array length must be 16" } - this.data = data - val bb: ByteBuffer = ByteBuffer.wrap(data) - mostSigBits = bb.long - leastSigBits = bb.long - version = (mostSigBits shr 12 and 0xF).toInt() - } - - /** - * 构造函数,根据高位和低位长整型初始化 UUID。 - * - * @param msb 高位长整型 - * @param lsb 低位长整型 - */ - constructor(msb: Long, lsb: Long) { - mostSigBits = msb - leastSigBits = lsb - val bb: ByteBuffer = ByteBuffer.wrap(ByteArray(16)) - bb.putLong(msb) - bb.putLong(lsb) - this.data = bb.array() - version = (mostSigBits shr 12 and 0xF).toInt() - } - - /** - * 构造函数,根据 Java UUID 初始化自定义 UUID。 - * - * @param juuid Java UUID 实例 - */ - constructor(juuid: JUUID) { - mostSigBits = juuid.mostSignificantBits - leastSigBits = juuid.leastSignificantBits - val bb: ByteBuffer = ByteBuffer.wrap(ByteArray(16)) - bb.putLong(mostSigBits) - bb.putLong(leastSigBits) - this.data = bb.array() - version = (mostSigBits shr 12 and 0xF).toInt() - } - - /** - * 构造函数,根据字符串初始化 UUID。 - * - * @param uuid UUID 字符串 - */ - constructor(uuid: String) { - fromString(uuid).let { - val bb: ByteBuffer = ByteBuffer.wrap(it) - mostSigBits = bb.long - leastSigBits = bb.long - this.data = it - version = (mostSigBits shr 12 and 0xF).toInt() - } - } - - /** - * 返回 UUID 的字节数组表示。 - * - * @return UUID 字节数组 - */ - fun toBytes(): ByteArray { - return data - } - - fun writeToByteBuffer(byteBuffer: ByteBuffer): ByteBuffer { - return byteBuffer.put(data) - } - - /** - * 返回 UUID 的高位长整型部分。 - * - * @return 高位长整型 - */ - fun getMostSignificantBits(): Long { - return mostSigBits - } - - /** - * 返回 UUID 的低位长整型部分。 - * - * @return 低位长整型 - */ - fun getLeastSignificantBits(): Long { - return leastSigBits - } - - /** - * 返回 UUID 的字符串表示。 - * - * @param isUpper 是否使用大写字母(默认为 false) - * @return UUID 字符串 - */ - fun getString(isUpper: Boolean = false): String { - return getString().let { - if (isUpper) { - it.uppercase() - } else it - } - } - - /** - * 返回 UUID 的字符串表示。 - * - * @param isUpper 是否使用大写字母(默认为 false) - * @param isnotSpace 是否移除连字符(默认为 false) - * @return UUID 字符串 - */ - fun getString(isUpper: Boolean = false, isnotSpace: Boolean = false): String { - return getString(isUpper).let { - if (isnotSpace) { - it.replace("-", "") - } else it - } - } - - fun getString(uuidFormatType: UUIDFormatType): String { - return getString(isUpper = uuidFormatType.isUpper, isnotSpace = uuidFormatType.isnotSpace) - } - - fun getString(baseType: BaseType): String { - return getString(baseType.baseCodec) - } - - fun getString(baseCodec: BaseCodec): String { - return baseCodec.encode(data) - } - - /** - * 返回标准格式的 UUID 字符串(带连字符)。 - * - * @return 标准格式的 UUID 字符串 - */ - // 优化后的 toString 方法 - fun getString(): String { - return buildString(36) { - val msbHigh = (mostSigBits ushr 32).toInt() - val msbMid = ((mostSigBits ushr 16) and 0xFFFF).toInt() - val msbLow = (mostSigBits and 0xFFFF).toInt() - val lsbHigh = ((leastSigBits ushr 48) and 0xFFFF).toInt() - val lsbLow = (leastSigBits and 0xFFFFFFFFFFFFL) - - append(msbHigh.toHexString()) - append('-') - append(msbMid.toShort().toHexString(4)) - append('-') - append(msbLow.toShort().toHexString(4)) - append('-') - append(lsbHigh.toShort().toHexString(4)) - append('-') - append(lsbLow.toHexString(12)) - } - } - - /** - * 将长整型转换为指定长度的十六进制字符串。 - * - * @param length 字符串长度 - * @return 十六进制字符串 - */ - private fun Long.toHexString(length: Int): String { - return this.toString(16).padStart(length, '0') - } - - /** - * 将短整型转换为指定长度的十六进制字符串。 - * - * @param length 字符串长度 - * @return 十六进制字符串 - */ - private fun Short.toHexString(length: Int): String { - return this.toLong().and(0xFFFF).toString(16).padStart(length, '0') - } - - /** - * 返回 MySQL 格式的 UUID 字节数组。 - * - * @return MySQL 格式的 UUID 字节数组 - */ - fun toMysql(): ByteArray { - return uuidToMysql(this.data) - } - - /** - * 返回 MySQL 格式的 UUID 实例。 - * - * @return MySQL 格式的 UUID 实例 - */ - fun toMysqlUUID(): UUID { - return of(uuidToMysql(this.data)) - } - - /** - * 比较两个 UUID 是否相等。 - * - * @param other 另一个对象 - * @return 如果相等则返回 true,否则返回 false - */ - override fun equals(other: Any?): Boolean { - if (this === other) return true - return when (other) { - is UUID -> { - this.data.contentEquals(other.data) - } - - is JUUID -> { - other.mostSignificantBits == this.getMostSignificantBits() && other.leastSignificantBits == this.getLeastSignificantBits() - } - - else -> { - false - } - } - } - - /** - * 返回对应的 Java UUID 实例。 - * - * @return Java UUID 实例 - */ - fun getUuid(): JUUID { - return JUUID(mostSigBits, leastSigBits) - } - - /** - * 返回 UUID 的版本号。 - * - * @return 版本号 - */ - fun getVersion(): Int { - return version - } - - /** - * 计算 UUID 的哈希码。 - * - * @return 哈希码 - */ - override fun hashCode(): Int { - return data.contentHashCode() - } - - /** - * 返回 UUID 的字符串表示。 - * - * @return 包含 UUID 和版本号的字符串 - */ - override fun toString(): String { - when (version) { - 1 -> { - return "UUID(uuid=${getString()},version=${version},datetime=${getDateTime()},mac=${getMac()})" - } - - 6, 7 -> { - return "UUID(uuid=${getString()},version=${version},datetime=${getDateTime()})" - } - } - return "UUID(uuid=${getString()},version=${version})" - } - - /** - * 根据 UUID 版本提取对应的时间信息。 - * - * @return 对应的时间信息 - */ - fun getDateTime(): DateTime { - - when (version) { - 1 -> { - val timestamp = - ((mostSigBits and 0x0FFFL) shl 48 or (((mostSigBits shr 16) and 0x0FFFFL) shl 32) or (mostSigBits ushr 32)) - val timestampBigInt = BigInteger.valueOf(timestamp) - val nanosecondsBigInt = timestampBigInt.multiply(BigInteger.valueOf(100L)) - val divisor = BigInteger.valueOf(1_000_000_000L) - val seconds = nanosecondsBigInt.divide(divisor) - val nanos = nanosecondsBigInt.remainder(divisor) - return DateTime.of(seconds.toLong(), nanos.toLong()) - .sub(ChronoUnit.DAYS.toDateTimeOffset(UUID_EPOCH_OFFSET)) - } - - 6 -> { - val timeHigh = - (((data[0].toLong() and 0xFF) shl 40) or ((data[1].toLong() and 0xFF) shl 32) or ((data[2].toLong() and 0xFF) shl 24) or ((data[3].toLong() and 0xFF) shl 16) or ((data[4].toLong() and 0xFF) shl 8) or (data[5].toLong() and 0xFF)) - val timeMidAndVersion = ((data[6].toInt() and 0xFF) shl 8) or (data[7].toInt() and 0xFF) - val timeMid = timeMidAndVersion and 0x0FFF - val hundredNanosSinceUuidEpoch = (timeHigh shl 12) or timeMid.toLong() - val seconds = hundredNanosSinceUuidEpoch / 10_000_000 - val nanos = (hundredNanosSinceUuidEpoch % 10_000_000) * 100 - return DateTime.of(seconds, nanos).sub(ChronoUnit.DAYS.toDateTimeOffset(UUID_EPOCH_OFFSET)) - } - - 7 -> { - val times = - (data[0].toLong() and 0xFF shl 40) or (data[1].toLong() and 0xFF shl 32) or (data[2].toLong() and 0xFF shl 24) or (data[3].toLong() and 0xFF shl 16) or (data[4].toLong() and 0xFF shl 8) or (data[5].toLong() and 0xFF) - return DateTime.of(times) - } - - else -> { - throw IllegalArgumentException("UUID version is $version not v1 or v6 or v7 : not supported ") - } - } - } - - /** - * 提取 UUID V1 中的 MAC 地址,默认使用冒号分隔符。 - * - * @return MAC 地址字符串 - */ - fun getMac(): String { - return getMac(":") - } - - fun getBase64ShortString(): String { - return BaseType.BASE64.encode(data).substring(0, 22) - } - - fun getBase91ShortString(): String { - return BaseType.BASE91.encode(data) - } - - fun getBase256ShortString(): String { - return BaseType.BASE256.encode(data) - } - - /** - * 提取 UUID V1 中的 MAC 地址。 - * - * @param spec 分隔符(默认为冒号) - * @return MAC 地址字符串 - */ - fun getMac(spec: String = ":"): String { - if (version != 1) { - throw IllegalArgumentException("UUID version is $version not v1 : not supported ") - } - val macLong = leastSigBits and 0xFFFFFFFFFFFFL - val macBytes = ByteArray(6) - for (i in 0..5) { - macBytes[5 - i] = (macLong shr (8 * i)).toByte() - } - val mac = StringBuilder() - for (i in 0..5) { - mac.append(String.format("%02X", macBytes[i])) - if (i < 5) { - mac.append(spec) - } - } - return mac.toString() - } + private val data: ByteArray + private val mostSigBits: Long + private val leastSigBits: Long + private val version: Int + + companion object { + + + private var lastTimestamp = 0L + private var clockSequence = Random.nextInt(0x3FFF + 1) + private val clockSeqHolder = AtomicLong(0) + + /** + * 预期 UUID 字符串中连字符的位置数组。 + */ + @JvmStatic + val expectedHyphenPositions = intArrayOf(8, 13, 18, 23) + + /** + * UUID 纪元偏移量(以天为单位)。 + */ + @JvmStatic + val UUID_EPOCH_OFFSET = 141427L + + + @JvmStatic + fun ofBase64ShortString(baseShortString: String): UUID { + return UUID(BaseType.BASE64.decode(baseShortString)) + } + + @JvmStatic + fun ofBase256ShortString(baseShortString: String): UUID { + return UUID(BaseType.BASE256.decode(baseShortString)) + } + + @JvmStatic + fun ofBase91ShortString(baseShortString: String): UUID { + return UUID(BaseType.BASE91.decode(baseShortString)) + } + + @JvmStatic + fun getV8( + customA: ByteArray, // 6字节 + customB: ByteArray, // 2字节 前4位被替换位版本号 + customC: ByteArray, // 8字节, 前2位被替换位变体 + ): UUID { + require(customA.size == 6) { "customA 必须是6字节" } + require(customB.size == 2) { "customB 必须是2字节" } + require(customC.size == 8) { "customC 必须是8字节" } + val rbyte = ByteArray(16) + customA.copyTo(rbyte, 0, 0, 6) + customB.copyTo(rbyte, 0, 6, 2) + customC.copyTo(rbyte, 0, 8, 8) + rbyte[6] = (rbyte[6].toInt() and 0x0F or 0x80).toByte() + rbyte[8] = (rbyte[8].toInt() and 0x3F or 0x80).toByte() + return UUID(rbyte) + } + + /** + * 生成一个 UUID V1 版本,使用系统时钟、随机数和 MAC 地址。 + * 如果 MAC 地址为空,则使用随机生成的 MAC 地址。 + * + * @return UUID V1 实例 + */ + @JvmStatic + fun getV1(): UUID { + val time = DateTime.now().add(DateTimeOffset.of(UUID_EPOCH_OFFSET, ChronoUnit.DAYS)).to100NanoTime() + val timeLow = (time and 0xFFFFFFFFL).toInt() + val timeMid = ((time shr 32) and 0xFFFFL).toShort() + val timeHighAndVersion = (((time shr 48) and 0x0FFFL) or 0x1000L).toShort() + val clockSeq: Long = if (time == lastTimestamp) { + clockSeqHolder.addAndGet(1) + } else { + clockSeqHolder.set(0) + lastTimestamp = time + 0 + } + val byteBuffer = ByteBuffer.wrap(ByteArray(16)) + byteBuffer.putInt(timeLow) + byteBuffer.putShort(timeMid) + byteBuffer.putShort(timeHighAndVersion) + byteBuffer.putShort((clockSeq and 0x3FFF).toShort()) + byteBuffer.put(macAddressBytes) + + return UUID(byteBuffer.array()) + } + + @JvmStatic + fun getV1RandomMac(): UUID { + val time = DateTime.now().add(DateTimeOffset.of(UUID_EPOCH_OFFSET, ChronoUnit.DAYS)).to100NanoTime() + val timeLow = (time and 0xFFFFFFFFL).toInt() + val timeMid = ((time shr 32) and 0xFFFFL).toShort() + val timeHighAndVersion = (((time shr 48) and 0x0FFFL) or 0x1000L).toShort() + val clockSeq: Long = if (time == lastTimestamp) { + clockSeqHolder.addAndGet(1) + } else { + clockSeqHolder.set(0) + lastTimestamp = time + 0 + } + lastTimestamp = time + + val byteBuffer = ByteBuffer.wrap(ByteArray(16)) + byteBuffer.putInt(timeLow) + byteBuffer.putShort(timeMid) + byteBuffer.putShort(timeHighAndVersion) + byteBuffer.putShort((clockSeq and 0x3FFF).toShort()) + byteBuffer.put(randomByte(6)) + + return UUID(byteBuffer.array()) + } + + /** + * 生成一个 UUID V4 版本,使用加密安全的随机数。 + * + * @return UUID V4 实例 + */ + @JvmStatic + fun getV4(): UUID { + val randomBytes = randomByte(16) + randomBytes[6] = (randomBytes[6].toInt() and 0x0F or 0x40).toByte() + randomBytes[8] = (randomBytes[8].toInt() and 0x3F or 0x80).toByte() + return UUID(randomBytes) + } + + /** + * 生成一个 UUID V3 版本,基于命名空间和名称的 MD5 哈希值。 + * + * @param namepath 命名空间 UUID + * @param user 用户提供的字符串 + * @return UUID V3 实例 + */ + @JvmStatic + fun getV3(namepath: UUID, user: String): UUID { + val md = MessageDigest.getInstance("MD5") + val userB = user.toByteArray() + val array = md.digest( + ByteBuffer.wrap(ByteArray(16 + userB.size)).put(namepath.data).put(userB).array() + ) + array[6] = (array[6].toInt() and 0x0F or 0x30).toByte() + array[8] = (array[8].toInt() and 0x3F or 0x80).toByte() + return UUID(array) + } + + /** + * 生成一个 UUID V5 版本,基于命名空间和名称的 SHA-1 哈希值。 + * + * @param namepath 命名空间 UUID + * @param user 用户提供的字符串 + * @return UUID V5 实例 + */ + @JvmStatic + fun getV5(namepath: UUID, user: String): UUID { + val sha1 = MessageDigest.getInstance("SHA-1") + val userB = user.toByteArray() + val array = sha1.digest( + ByteBuffer.wrap(ByteArray(namepath.data.size + userB.size)).put(namepath.data).put(userB).array() + ) + array[6] = (array[6].toInt() and 0x0F or 0x50).toByte() + array[8] = (array[8].toInt() and 0x3F or 0x80).toByte() + return UUID(ByteBuffer.wrap(ByteArray(16)).put(array, 0, 16).array()) + } + + /** + * 生成一个 UUID V6 版本,使用时间戳和随机节点信息。 + * + * @return UUID V6 实例 + */ + @JvmStatic + fun getV6(): UUID { + val timestamp = DateTime.now().add(DateTimeOffset.of(UUID_EPOCH_OFFSET, ChronoUnit.DAYS)) + .to100NanoTime() and 0x0FFFFFFFFFFFFFFFL + val timeHigh = (timestamp ushr 12) and 0xFFFFFFFFFFFFL + val timeMid = timestamp and 0x0FFFL + val clockSeq = Random.nextInt(16384) and 0x3FFF + val node = Random.nextLong() and 0x0000FFFFFFFFFFFFL + val buffer = ByteBuffer.allocate(16) + buffer.putLong((timeHigh shl 16) or (0x6000L) or (timeMid and 0x0FFF)) + buffer.putShort((0x8000 or (clockSeq and 0x3FFF)).toShort()) + buffer.put((node shr 40).toByte()) + buffer.put((node shr 32).toByte()) + buffer.put((node shr 24).toByte()) + buffer.put((node shr 16).toByte()) + buffer.put((node shr 8).toByte()) + buffer.put(node.toByte()) + return UUID(buffer.array()) + } + + /** + * 生成一个 UUID V7 版本,使用毫秒级时间戳和随机数。 + * + * @return UUID V7 实例 + */ + @JvmStatic + fun getV7(): UUID { + val instant = DateTime.now().toMillisecondTime() + val buffer = ByteBuffer.allocate(16) + buffer.putInt((instant shr 16).toInt()) + buffer.putShort((instant).toShort()) + buffer.put(randomByte(2)) + buffer.putLong(Random.nextLong()) + val bytes = buffer.array() + bytes[6] = (bytes[6].toInt() and 0x0F or 0x70).toByte() + bytes[8] = (bytes[8].toInt() and 0x3F or 0x80).toByte() + return UUID(bytes) + } + + /** + * 根据字符串创建 UUID 实例。 + * + * @param uuid UUID 字符串 + * @return UUID 实例 + */ + @JvmStatic + fun of(uuid: String): UUID { + return UUID(uuid) + } + + /** + * 根据字节数组创建 UUID 实例。 + * + * @param uuid UUID 字节数组 + * @return UUID 实例 + */ + @JvmStatic + fun of(uuid: ByteArray): UUID { + return UUID(uuid) + } + + /** + * 根据高位和低位长整型创建 UUID 实例。 + * + * @param msb 高位长整型 + * @param lsb 低位长整型 + * @return UUID 实例 + */ + @JvmStatic + fun of(msb: Long, lsb: Long): UUID { + return UUID(msb, lsb) + } + + /** + * 从ByteBuffer创建UUID对象 + * + * @param byteBuffer 包含UUID字节数据的ByteBuffer对象,必须包含至少16个字节的数据 + * @return 从ByteBuffer中读取的16个字节创建的UUID对象 + */ + @JvmStatic + fun of(byteBuffer: ByteBuffer): UUID { + val byte = ByteArray(16) + byteBuffer.get(byte) + return UUID(byte) + } + + /** + * 根据 MySQL UUID 字节数组创建 UUID 实例。 + * + * @param byteArray MySQL UUID 字节数组 + * @return UUID 实例 + */ + @JvmStatic + fun ofMysqlUUID(byteArray: ByteArray): UUID { + return UUID(mysqlToUuid(byteArray)) + } + + /** + * 根据 MySQL UUID 实例创建 UUID 实例。 + * + * @param uuid MySQL UUID 实例 + * @return UUID 实例 + */ + @JvmStatic + fun ofMysqlUUID(uuid: UUID): UUID { + return UUID(mysqlToUuid(uuid.data)) + } + + /** + * 获取最大 UUID(所有字节为 0xFF)。 + * + * @return 最大 UUID 实例 + */ + @JvmStatic + fun getMaxUUID(): UUID { + return UUID( + ByteArray( + 16 + ) { 0xFF.toByte() }) + } + + /** + * 获取最小 UUID(所有字节为 0x00)。 + * + * @return 最小 UUID 实例 + */ + @JvmStatic + fun getMinUUID(): UUID { + return UUID( + ByteArray( + 16 + ) { 0x00.toByte() }) + } + + /** + * 将 Java UUID 转换为自定义 UUID 实例。 + * + * @receiver Java UUID 实例 + * @return 自定义 UUID 实例 + */ + @JvmStatic + @JvmName("ofJUUID") + fun JUUID.toMLUUID(): UUID { + return UUID(this) + } + + /** + * 从字符串解析 UUID 字节数组。 + * + * @param uuidString UUID 字符串 + * @return UUID 字节数组 + */ + private fun fromString(uuidString: String): ByteArray { + val cleanStr = when (uuidString.length) { + 36 -> { + for (i in expectedHyphenPositions) { + if (uuidString[i] != '-') { + throw IllegalArgumentException("Invalid UUID string: $uuidString at index $i") + } + } + uuidString.replace("-", "") + } + + 32 -> uuidString + else -> throw IllegalArgumentException("Invalid UUID string: $uuidString") + } + + // 直接按索引提取各段并校验 + val segments = arrayOf( + cleanStr.take(8), + cleanStr.substring(8, 12), + cleanStr.substring(12, 16), + cleanStr.substring(16, 20), + cleanStr.substring(20, 32) + ) + + for (segment in segments) { + if (!segment.matches(Regex("^[0-9A-Fa-f]+$"))) { + throw IllegalArgumentException("Invalid UUID segment: $segment") + } + } + + return cleanStr.chunked(2).map { it.toInt(16).toByte() }.toByteArray() + } + + /** + * 将 MAC 地址字节数组转换为长整型。 + * + * @param mac MAC 地址字节数组(必须为 6 字节) + * @return MAC 地址对应的长整型值 + */ + private fun macBytesToLong(mac: ByteArray): Long { + require(mac.size == 6) { "MAC地址必须是6字节" } + var result = 0L + for (i in 0 until 6) { + result = (result shl 8) or (mac[i].toLong() and 0xFF) + } + return result + } + + fun of(str: String, base: BaseType): UUID { + return UUID(base.baseCodec.decode(str)) + } + + } + + /** + * 构造函数,根据字节数组初始化 UUID。 + * + * @param data UUID 字节数组(必须为 16 字节) + */ + constructor(data: ByteArray) { + require(data.size == 16) { "UUID byte array length must be 16" } + this.data = data + val bb: ByteBuffer = ByteBuffer.wrap(data) + mostSigBits = bb.long + leastSigBits = bb.long + version = (mostSigBits shr 12 and 0xF).toInt() + } + + /** + * 构造函数,根据高位和低位长整型初始化 UUID。 + * + * @param msb 高位长整型 + * @param lsb 低位长整型 + */ + constructor(msb: Long, lsb: Long) { + mostSigBits = msb + leastSigBits = lsb + val bb: ByteBuffer = ByteBuffer.wrap(ByteArray(16)) + bb.putLong(msb) + bb.putLong(lsb) + this.data = bb.array() + version = (mostSigBits shr 12 and 0xF).toInt() + } + + /** + * 构造函数,根据 Java UUID 初始化自定义 UUID。 + * + * @param juuid Java UUID 实例 + */ + constructor(juuid: JUUID) { + mostSigBits = juuid.mostSignificantBits + leastSigBits = juuid.leastSignificantBits + val bb: ByteBuffer = ByteBuffer.wrap(ByteArray(16)) + bb.putLong(mostSigBits) + bb.putLong(leastSigBits) + this.data = bb.array() + version = (mostSigBits shr 12 and 0xF).toInt() + } + + /** + * 构造函数,根据字符串初始化 UUID。 + * + * @param uuid UUID 字符串 + */ + constructor(uuid: String) { + fromString(uuid).let { + val bb: ByteBuffer = ByteBuffer.wrap(it) + mostSigBits = bb.long + leastSigBits = bb.long + this.data = it + version = (mostSigBits shr 12 and 0xF).toInt() + } + } + + /** + * 返回 UUID 的字节数组表示。 + * + * @return UUID 字节数组 + */ + fun toBytes(): ByteArray { + return data + } + + fun writeToByteBuffer(byteBuffer: ByteBuffer): ByteBuffer { + return byteBuffer.put(data) + } + + /** + * 返回 UUID 的高位长整型部分。 + * + * @return 高位长整型 + */ + fun getMostSignificantBits(): Long { + return mostSigBits + } + + /** + * 返回 UUID 的低位长整型部分。 + * + * @return 低位长整型 + */ + fun getLeastSignificantBits(): Long { + return leastSigBits + } + + /** + * 返回 UUID 的字符串表示。 + * + * @param isUpper 是否使用大写字母(默认为 false) + * @return UUID 字符串 + */ + fun getString(isUpper: Boolean = false): String { + return getString().let { + if (isUpper) { + it.uppercase() + } else it + } + } + + /** + * 返回 UUID 的字符串表示。 + * + * @param isUpper 是否使用大写字母(默认为 false) + * @param isnotSpace 是否移除连字符(默认为 false) + * @return UUID 字符串 + */ + fun getString(isUpper: Boolean = false, isnotSpace: Boolean = false): String { + return getString(isUpper).let { + if (isnotSpace) { + it.replace("-", "") + } else it + } + } + + fun getString(uuidFormatType: UUIDFormatType): String { + return getString(isUpper = uuidFormatType.isUpper, isnotSpace = uuidFormatType.isnotSpace) + } + + fun getString(baseType: BaseType): String { + return getString(baseType.baseCodec) + } + + fun getString(baseCodec: BaseCodec): String { + return baseCodec.encode(data) + } + + /** + * 返回标准格式的 UUID 字符串(带连字符)。 + * + * @return 标准格式的 UUID 字符串 + */ + // 优化后的 toString 方法 + fun getString(): String { + return buildString(36) { + val msbHigh = (mostSigBits ushr 32).toInt() + val msbMid = ((mostSigBits ushr 16) and 0xFFFF).toInt() + val msbLow = (mostSigBits and 0xFFFF).toInt() + val lsbHigh = ((leastSigBits ushr 48) and 0xFFFF).toInt() + val lsbLow = (leastSigBits and 0xFFFFFFFFFFFFL) + + append(msbHigh.toHexString()) + append('-') + append(msbMid.toShort().toHexString(4)) + append('-') + append(msbLow.toShort().toHexString(4)) + append('-') + append(lsbHigh.toShort().toHexString(4)) + append('-') + append(lsbLow.toHexString(12)) + } + } + + /** + * 将长整型转换为指定长度的十六进制字符串。 + * + * @param length 字符串长度 + * @return 十六进制字符串 + */ + private fun Long.toHexString(length: Int): String { + return this.toString(16).padStart(length, '0') + } + + /** + * 将短整型转换为指定长度的十六进制字符串。 + * + * @param length 字符串长度 + * @return 十六进制字符串 + */ + private fun Short.toHexString(length: Int): String { + return this.toLong().and(0xFFFF).toString(16).padStart(length, '0') + } + + /** + * 返回 MySQL 格式的 UUID 字节数组。 + * + * @return MySQL 格式的 UUID 字节数组 + */ + fun toMysql(): ByteArray { + return uuidToMysql(this.data) + } + + /** + * 返回 MySQL 格式的 UUID 实例。 + * + * @return MySQL 格式的 UUID 实例 + */ + fun toMysqlUUID(): UUID { + return of(uuidToMysql(this.data)) + } + + /** + * 比较两个 UUID 是否相等。 + * + * @param other 另一个对象 + * @return 如果相等则返回 true,否则返回 false + */ + override fun equals(other: Any?): Boolean { + if (this === other) return true + return when (other) { + is UUID -> { + this.data.contentEquals(other.data) + } + + is JUUID -> { + other.mostSignificantBits == this.getMostSignificantBits() && other.leastSignificantBits == this.getLeastSignificantBits() + } + + else -> { + false + } + } + } + + /** + * 返回对应的 Java UUID 实例。 + * + * @return Java UUID 实例 + */ + fun getUuid(): JUUID { + return JUUID(mostSigBits, leastSigBits) + } + + /** + * 返回 UUID 的版本号。 + * + * @return 版本号 + */ + fun getVersion(): Int { + return version + } + + /** + * 计算 UUID 的哈希码。 + * + * @return 哈希码 + */ + override fun hashCode(): Int { + return data.contentHashCode() + } + + /** + * 返回 UUID 的字符串表示。 + * + * @return 包含 UUID 和版本号的字符串 + */ + override fun toString(): String { + when (version) { + 1 -> { + return "UUID(uuid=${getString()},version=${version},datetime=${getDateTime()},mac=${getMac()})" + } + + 6, 7 -> { + return "UUID(uuid=${getString()},version=${version},datetime=${getDateTime()})" + } + } + return "UUID(uuid=${getString()},version=${version})" + } + + /** + * 根据 UUID 版本提取对应的时间信息。 + * + * @return 对应的时间信息 + */ + fun getDateTime(): DateTime { + + when (version) { + 1 -> { + val timestamp = + ((mostSigBits and 0x0FFFL) shl 48 or (((mostSigBits shr 16) and 0x0FFFFL) shl 32) or (mostSigBits ushr 32)) + val timestampBigInt = BigInteger.valueOf(timestamp) + val nanosecondsBigInt = timestampBigInt.multiply(BigInteger.valueOf(100L)) + val divisor = BigInteger.valueOf(1_000_000_000L) + val seconds = nanosecondsBigInt.divide(divisor) + val nanos = nanosecondsBigInt.remainder(divisor) + return DateTime.of(seconds.toLong(), nanos.toLong()) + .sub(ChronoUnit.DAYS.toDateTimeOffset(UUID_EPOCH_OFFSET)) + } + + 6 -> { + val timeHigh = + (((data[0].toLong() and 0xFF) shl 40) or ((data[1].toLong() and 0xFF) shl 32) or ((data[2].toLong() and 0xFF) shl 24) or ((data[3].toLong() and 0xFF) shl 16) or ((data[4].toLong() and 0xFF) shl 8) or (data[5].toLong() and 0xFF)) + val timeMidAndVersion = ((data[6].toInt() and 0xFF) shl 8) or (data[7].toInt() and 0xFF) + val timeMid = timeMidAndVersion and 0x0FFF + val hundredNanosSinceUuidEpoch = (timeHigh shl 12) or timeMid.toLong() + val seconds = hundredNanosSinceUuidEpoch / 10_000_000 + val nanos = (hundredNanosSinceUuidEpoch % 10_000_000) * 100 + return DateTime.of(seconds, nanos).sub(ChronoUnit.DAYS.toDateTimeOffset(UUID_EPOCH_OFFSET)) + } + + 7 -> { + val times = + (data[0].toLong() and 0xFF shl 40) or (data[1].toLong() and 0xFF shl 32) or (data[2].toLong() and 0xFF shl 24) or (data[3].toLong() and 0xFF shl 16) or (data[4].toLong() and 0xFF shl 8) or (data[5].toLong() and 0xFF) + return DateTime.of(times) + } + + else -> { + throw IllegalArgumentException("UUID version is $version not v1 or v6 or v7 : not supported ") + } + } + } + + /** + * 提取 UUID V1 中的 MAC 地址,默认使用冒号分隔符。 + * + * @return MAC 地址字符串 + */ + fun getMac(): String { + return getMac(":") + } + + fun getBase64ShortString(): String { + return BaseType.BASE64.encode(data).substring(0, 22) + } + + fun getBase91ShortString(): String { + return BaseType.BASE91.encode(data) + } + + fun getBase256ShortString(): String { + return BaseType.BASE256.encode(data) + } + + /** + * 提取 UUID V1 中的 MAC 地址。 + * + * @param spec 分隔符(默认为冒号) + * @return MAC 地址字符串 + */ + fun getMac(spec: String = ":"): String { + if (version != 1) { + throw IllegalArgumentException("UUID version is $version not v1 : not supported ") + } + val macLong = leastSigBits and 0xFFFFFFFFFFFFL + val macBytes = ByteArray(6) + for (i in 0..5) { + macBytes[5 - i] = (macLong shr (8 * i)).toByte() + } + val mac = StringBuilder() + for (i in 0..5) { + mac.append(String.format("%02X", macBytes[i])) + if (i < 5) { + mac.append(spec) + } + } + return mac.toString() + } } diff --git a/src/main/kotlin/com/mingliqiye/utils/uuid/UUIDFormatType.kt b/src/main/kotlin/com/mingliqiye/utils/uuid/UUIDFormatType.kt index 4138464..f6bf8c0 100644 --- a/src/main/kotlin/com/mingliqiye/utils/uuid/UUIDFormatType.kt +++ b/src/main/kotlin/com/mingliqiye/utils/uuid/UUIDFormatType.kt @@ -30,27 +30,27 @@ package com.mingliqiye.utils.uuid * @property isnotSpace 是否不包含空格(true表示无空格,false表示有空格) */ enum class UUIDFormatType(val isUpper: Boolean, val isnotSpace: Boolean) { - /** - * 大写带分隔符 - * 使用大写字母并保留空格分隔符 - */ - UPPER_SPACE(true, false), + /** + * 大写带分隔符 + * 使用大写字母并保留空格分隔符 + */ + UPPER_SPACE(true, false), - /** - * 小写带分隔符 - * 使用小写字母并保留空格分隔符 - */ - NO_UPPER_SPACE(false, false), + /** + * 小写带分隔符 + * 使用小写字母并保留空格分隔符 + */ + NO_UPPER_SPACE(false, false), - /** - * 小写无分隔符 - * 使用小写字母且不包含空格分隔符 - */ - NO_UPPER_NO_SPACE(false, true), + /** + * 小写无分隔符 + * 使用小写字母且不包含空格分隔符 + */ + NO_UPPER_NO_SPACE(false, true), - /** - * 大写无分隔符 - * 使用大写字母且不包含空格分隔符 - */ - UPPER_NO_SPACE(true, true), + /** + * 大写无分隔符 + * 使用大写字母且不包含空格分隔符 + */ + UPPER_NO_SPACE(true, true), } diff --git a/src/main/kotlin/com/mingliqiye/utils/version/VersionUtils.kt b/src/main/kotlin/com/mingliqiye/utils/version/VersionUtils.kt index afb590c..448150c 100644 --- a/src/main/kotlin/com/mingliqiye/utils/version/VersionUtils.kt +++ b/src/main/kotlin/com/mingliqiye/utils/version/VersionUtils.kt @@ -35,28 +35,28 @@ import kotlin.math.max * @since 3.2.7 */ fun isNew(now: String, other: String): Boolean { - val otherA = now.split(".") - val otherB = other.split(".") + val otherA = now.split(".") + val otherB = other.split(".") - val maxLen = max(otherA.size, otherB.size) + val maxLen = max(otherA.size, otherB.size) - for (i in 0.. i) otherA[i].toInt() else null - val b = if (otherB.size > i) otherB[i].toInt() else null + val a = if (otherA.size > i) otherA[i].toInt() else null + val b = if (otherB.size > i) otherB[i].toInt() else null - if (a == null) { - return true - } - if (b == null) { - return false - } - if (a != b) { - return a < b - } - } + if (a == null) { + return true + } + if (b == null) { + return false + } + if (a != b) { + return a < b + } + } - return false + return false } /** @@ -67,7 +67,7 @@ fun isNew(now: String, other: String): Boolean { * */ fun isOld(now: String, other: String): Boolean { - return (now != other) && !isNew(now, other) + return (now != other) && !isNew(now, other) } /** @@ -77,7 +77,7 @@ fun isOld(now: String, other: String): Boolean { * @return 是否相同 */ fun equals(now: String, other: String): Boolean { - return now == other + return now == other } /** @@ -88,12 +88,11 @@ fun equals(now: String, other: String): Boolean { */ @JvmName("is") fun isOther(now: String, other: String): Boolean? { - return if (isNew(now, other)) { - true - } else if (isOld(now, other)) { - false - } else { - null - } + return if (isNew(now, other)) { + true + } else if (isOld(now, other)) { + false + } else { + null + } } -