Skip to content

Commit

Permalink
refactor(#12): remove the type NotEmptyMutableCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
LVMVRQUXL committed Aug 11, 2022
1 parent 01c536c commit f8b76e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion changelog.md
Expand Up @@ -23,7 +23,7 @@ All notable changes to this project will be documented in this file.
- `NotEmptyList` ([#6](https://github.com/kotools/types/issues/6))
- `NotEmptyCollection` and `NotEmptySet`
([#7](https://github.com/kotools/types/issues/7))
- `NotEmptyMutableCollection` and `NotEmptyMutableList`
- `NotEmptyMutableList`
([#12](https://github.com/kotools/types/issues/12)).
- Overload comparisons of the following types in `kotools.types.number`:
- `NonZeroInt` ([#33](https://github.com/kotools/types/issues/33))
Expand Down

This file was deleted.

Expand Up @@ -84,7 +84,7 @@ public inline infix fun <reified E> Collection<E>.toNotEmptyMutableListOrElse(
@SinceKotoolsTypes("1.3")
public class NotEmptyMutableList<E>(override var head: E, vararg tail: E) :
AbstractMutableList<E>(),
NotEmptyMutableCollection<E> {
NotEmptyCollection<E> {
private val tail: MutableList<E>

init {
Expand All @@ -95,7 +95,7 @@ public class NotEmptyMutableList<E>(override var head: E, vararg tail: E) :

override val size: Int get() = tail.size + super.size

override fun isEmpty(): Boolean = super<NotEmptyMutableCollection>.isEmpty()
override fun isEmpty(): Boolean = super<NotEmptyCollection>.isEmpty()

// ---------- Positional Access Operations ----------

Expand Down

0 comments on commit f8b76e3

Please sign in to comment.