#1358: CollectionDebugUtils.kt
projectforge-business/src/main/kotlin/org/projectforge/framework/persistence/utils/CollectionDebugUtils.kt Type: Kotlin Class · Package: org.projectforge.framework.persistence.utils · Source: projectforge-business/src/main/kotlin/org/projectforge/framework/persistence/utils/CollectionDebugUtils.kt 124 lines · 93 code · 24 comments · 7 blank
Kotlin Class implementing CollectionDebugUtils.
Properties
| Property | Declaration |
result | compareCollections(src, dest, withKept) |
differs | false |
sb | StringBuilder() |
srcEntry | findEntry(src, it) |
destEntry | findEntry(dest, it) |
srcJson | JsonUtils.toJson(srcEntry) |
destJson | JsonUtils.toJson(destEntry) |
diffMatchPatch | DiffMatchPatch() |
diffs | diffMatchPatch.diff_main(str1, str2) |
sb | StringBuilder() |
text | if (shortenMiddle) aDiff.text.shortenMiddle(20) else aDiff.text |
newDiffers | differs |
Functions
| Function | Parameters | Return |
showCompareDiff | src: Collection<Any?>?,
dest: Collection<Any?>?,
withKept: Boolean = false,
prefix: String = "" | String? |
findEntry | col: Collection<Any?>?, entry: Any | Any? |
diffStrings | str1: String, str2: String, shortenMiddle: Boolean = false | String |
append | sb: StringBuilder,
col: Collection<Any?>?,
differs: Boolean,
list: String,
prefix: String | Boolean |
Architecture Analysis
Resides in projectforge-business, the core module containing domain logic, services, and persistence. Provides Utility Functions as a Kotlin object singleton with shared stateless helpers used application-wide.
Git History
| Commit | What changed |
|---|
868d6abb75 | 2025 -> 2026 |
48a93dedb5 | Colored console log. UserGroupCache export for debugging and comparing work now. CollectionUtil improved. KotlinStringExtension.shortenMiddle() added. |