From 19acf036685b46de570370784f29a0ff70329541 Mon Sep 17 00:00:00 2001 From: Yusuf Arfan Ismail Date: Sun, 11 Sep 2022 07:26:59 +0100 Subject: [PATCH] fixed some mistakes --- .../github/realyusufismail/jconfig}/JConfig.kt | 0 .../github/realyusufismail/jconfig}/JConfigBuilder.kt | 4 +--- .../github/realyusufismail/jconfig}/JConfigException.kt | 0 .../github/realyusufismail/jconfig}/JConfigImpl.kt | 8 +------- .../github/realyusufismail/jconfig}/JConfigUtils.kt | 0 .../github/realyusufismail/jconfig}/JsonEntry.kt | 0 6 files changed, 2 insertions(+), 10 deletions(-) rename src/main/kotlin/{io.github.realyusufismail.jconfig => io/github/realyusufismail/jconfig}/JConfig.kt (100%) rename src/main/kotlin/{io.github.realyusufismail.jconfig => io/github/realyusufismail/jconfig}/JConfigBuilder.kt (97%) rename src/main/kotlin/{io.github.realyusufismail.jconfig => io/github/realyusufismail/jconfig}/JConfigException.kt (100%) rename src/main/kotlin/{io.github.realyusufismail.jconfig => io/github/realyusufismail/jconfig}/JConfigImpl.kt (82%) rename src/main/kotlin/{io.github.realyusufismail.jconfig => io/github/realyusufismail/jconfig}/JConfigUtils.kt (100%) rename src/main/kotlin/{io.github.realyusufismail.jconfig => io/github/realyusufismail/jconfig}/JsonEntry.kt (100%) diff --git a/src/main/kotlin/io.github.realyusufismail.jconfig/JConfig.kt b/src/main/kotlin/io/github/realyusufismail/jconfig/JConfig.kt similarity index 100% rename from src/main/kotlin/io.github.realyusufismail.jconfig/JConfig.kt rename to src/main/kotlin/io/github/realyusufismail/jconfig/JConfig.kt diff --git a/src/main/kotlin/io.github.realyusufismail.jconfig/JConfigBuilder.kt b/src/main/kotlin/io/github/realyusufismail/jconfig/JConfigBuilder.kt similarity index 97% rename from src/main/kotlin/io.github.realyusufismail.jconfig/JConfigBuilder.kt rename to src/main/kotlin/io/github/realyusufismail/jconfig/JConfigBuilder.kt index 4d07460..84db386 100644 --- a/src/main/kotlin/io.github.realyusufismail.jconfig/JConfigBuilder.kt +++ b/src/main/kotlin/io/github/realyusufismail/jconfig/JConfigBuilder.kt @@ -22,9 +22,7 @@ import com.fasterxml.jackson.databind.ObjectMapper import java.io.File import java.io.IOException -/** - * Used to build a [JConfigBuilder] object. - */ +/** Used to build a [JConfigBuilder] object. */ class JConfigBuilder { private var filename = "config.json" private var directoryPath = "./" diff --git a/src/main/kotlin/io.github.realyusufismail.jconfig/JConfigException.kt b/src/main/kotlin/io/github/realyusufismail/jconfig/JConfigException.kt similarity index 100% rename from src/main/kotlin/io.github.realyusufismail.jconfig/JConfigException.kt rename to src/main/kotlin/io/github/realyusufismail/jconfig/JConfigException.kt diff --git a/src/main/kotlin/io.github.realyusufismail.jconfig/JConfigImpl.kt b/src/main/kotlin/io/github/realyusufismail/jconfig/JConfigImpl.kt similarity index 82% rename from src/main/kotlin/io.github.realyusufismail.jconfig/JConfigImpl.kt rename to src/main/kotlin/io/github/realyusufismail/jconfig/JConfigImpl.kt index 6e39219..1e49875 100644 --- a/src/main/kotlin/io.github.realyusufismail.jconfig/JConfigImpl.kt +++ b/src/main/kotlin/io/github/realyusufismail/jconfig/JConfigImpl.kt @@ -18,8 +18,6 @@ */ package io.github.realyusufismail.jconfig -import java.util.stream.Collectors - class JConfigImpl(entries: List) : JConfig { private var mapEntries: Map = HashMap() @@ -27,11 +25,7 @@ class JConfigImpl(entries: List) : JConfig { init { this.mapEntries = JsonEntry.toMap(entries) - jsonEntries = - this.mapEntries.entries - .stream() - .map { entry: Map.Entry -> JsonEntry(entry.key, entry.value) } - .collect(Collectors.toSet()) + jsonEntries = this.mapEntries.map { JsonEntry(it.key, it.value) }.toSet() } override val entries: Set diff --git a/src/main/kotlin/io.github.realyusufismail.jconfig/JConfigUtils.kt b/src/main/kotlin/io/github/realyusufismail/jconfig/JConfigUtils.kt similarity index 100% rename from src/main/kotlin/io.github.realyusufismail.jconfig/JConfigUtils.kt rename to src/main/kotlin/io/github/realyusufismail/jconfig/JConfigUtils.kt diff --git a/src/main/kotlin/io.github.realyusufismail.jconfig/JsonEntry.kt b/src/main/kotlin/io/github/realyusufismail/jconfig/JsonEntry.kt similarity index 100% rename from src/main/kotlin/io.github.realyusufismail.jconfig/JsonEntry.kt rename to src/main/kotlin/io/github/realyusufismail/jconfig/JsonEntry.kt