This repository was archived by the owner on Feb 8, 2024. It is now read-only.
Releases: kotools/libraries
Releases · kotools/libraries
Kotools Types v4.0.0-beta
All platforms
Added
- Hierarchy of
AnyIntrepresenting integers (#132). - The
lengthproperty to theNotBlankStringtype (#143).
Changed
- Move the
NotBlankStringtype to thekotools.types.textpackage (#133). - Move the following types to the
kotools.types.collectionpackage:NotEmptyList,NotEmptySetandNotEmpty(#138).
Removed
Deprecated declarations from version 3 (#37).
Kotools Types v3.2.0
All platforms
Added
- Explicit builders for all types (#22).
- Types in the
kotools.typespackage:
Changed
- Update random API for getting a random
IntHolder(#17). - Replace the
SinceKotoolsTypesannotation by theSinceKotoolsshared annotation (#54).
Deprecated
- The
randomfunction in the companion object ofIntHolder's subtypes (#17). - Builders throwing an exception without having the
OrThrowsuffix in their name (#22). - Builders having an invalid name, like
PositiveIntOrNull(#22). ConstructionErrorobjects (#22).- The DSL in alpha stage for building numbers (#33).
- The
NotBlankStringtype from thekotools.types.stringpackage (#103). - The following types from the
kotools.types.numberpackage: - The following types from the
kotools.types.collectionspackage:
Kotools Types v3.1.1
Kotools Types v3.2.0-alpha.1
Kotools CSV v2.2.1
Kotools CSV v2.1.2
Fixed
Fix pagination and filter ordering in the reader: the filter is now applied before the pagination (#8).
Kotools CSV v2.0.2
Fixed
Add missing csvWriterAsync function (#6).
Kotools Types v3.1.0
All platforms
Added
NotEmptyMap type representing maps that contain at least one entry (#120).
Changed
- Convert the following types from a class to a sealed interface:
- Promote all deprecations of version 3.0 (#119).
- Stabilize the random API for getting an instance of
IntHolderwith a random value (#118). - The DSL for building numbers is now available in alpha stage in the
kotools.types.numberpackage (#130).
Kotools Types v3.0.1
Kotools Types v3.0.0
All platforms
Added
- Support for the JVM, JS and Native platforms using Kotlin Multiplatform (#62).
- Serialization and deserialization with kotlinx.serialization of
NonZeroInt,PositiveInt,StrictlyPositiveInt,NegativeInt,StrictlyNegativeInt,NotBlankString,NotEmptyListandNotEmptySet(#65). - Beta API for getting an instance of
IntHolderwith a random value.
val x = PositiveInt.random()
val y = PositiveInt.random()
x.value == y.value // false- Experimental DSL for building numbers according to the given context. Here's an example with the
nonZerocontext:
nonZero int 1 // NonZeroInt(value = 1)
nonZero int 0 // throws an exception
nonZero intOrNull -1 // NonZeroInt(value = -1)
nonZero intOrNull 0 // nullChanged
- Update type system for integers with a new
IntHoldertype (#112).
- Builders of
NotEmptyListandNotEmptySetnow work without reifying types (#68). - Improve error management (#70).
Deprecated
// Instead of doing...
NonZeroInt orNull 1
NotBlankString orNull "hello world"
// do this
NonZeroIntOrNull(1)
NotBlankStringOrNull("hello world")- Constructor of
NotEmptyListandNotEmptySet.
// Instead of doing...
NotEmptyList<Int>(1, 2, 3)
NotEmptySet<Int>(4, 5, 6)
// do this
notEmptyListOf<Int>(1, 2, 3)
notEmptySetOf<Int>(4, 5, 6)- Positional access operations of
NotEmptyCollectionreceiving an index of typeInt.
val list = notEmptyListOf(1, 2, 3)
// Instead of doing...
list[1]
// do this
list[PositiveInt(1)] // or list[StrictlyPositiveInt(1)] Removed
NotEmptyMutableListandNotEmptyMutableSet: mutable collections can be empty by definition.- Conversions from subtypes of
IntHolder.
