Using now extension methods from JavaUtils

This commit is contained in:
dankito 2020-04-22 20:46:03 +02:00
parent a6c3c410df
commit 2070eb5dcd
4 changed files with 2 additions and 31 deletions

View File

@ -1,12 +0,0 @@
package net.dankito.fints.extensions
fun <T> Collection<T>.containsAny(otherCollection: Collection<T>): Boolean {
for (otherItem in otherCollection) {
if (this.contains(otherItem)) {
return true
}
}
return false
}

View File

@ -1,17 +0,0 @@
package net.dankito.fints.extensions
fun String.allIndicesOf(toFind: String): List<Int> {
val indices = mutableListOf<Int>()
var index = -1
do {
index = this.indexOf(toFind, index + 1)
if (index > -1) {
indices.add(index)
}
} while (index > -1)
return indices
}

View File

@ -1,6 +1,5 @@
package net.dankito.fints.messages
import net.dankito.fints.extensions.containsAny
import net.dankito.fints.messages.datenelemente.implementierte.Aufsetzpunkt
import net.dankito.fints.messages.datenelemente.implementierte.Synchronisierungsmodus
import net.dankito.fints.messages.datenelemente.implementierte.tan.TanGeneratorTanMedium
@ -25,6 +24,7 @@ import net.dankito.fints.response.segments.JobParameters
import net.dankito.fints.response.segments.SepaAccountInfoParameters
import net.dankito.fints.response.segments.TanResponse
import net.dankito.fints.util.FinTsUtils
import net.dankito.utils.extensions.containsAny
import kotlin.random.Random

View File

@ -1,8 +1,8 @@
package net.dankito.fints.util
import net.dankito.fints.extensions.allIndicesOf
import net.dankito.fints.messages.Separators
import net.dankito.fints.response.ResponseParser
import net.dankito.utils.extensions.allIndicesOf
import java.util.regex.Matcher
import java.util.regex.Pattern