mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-25 04:17:59 +01:00
Path, Paths, RegexSet: Implement toString
This commit is contained in:
parent
ac5919bcf7
commit
461a2bebd4
3 changed files with 11 additions and 1 deletions
|
@ -120,4 +120,8 @@ class Path(
|
|||
residualDepth = certification.trustDepth.min(residualDepth.decrease(1))
|
||||
edges.add(certification)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "{${root.fingerprint}} => {${edges.map { it.target }.joinToString(" -> ")}} (residual {$residualDepth})"
|
||||
}
|
||||
}
|
|
@ -46,6 +46,8 @@ class Paths(private val _paths: MutableList<Item>) {
|
|||
* @param amount trust amount
|
||||
*/
|
||||
data class Item(val path: Path, val amount: Int) {
|
||||
|
||||
override fun toString(): String {
|
||||
return "$path ($amount)"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -48,4 +48,8 @@ data class RegexSet(val regexStrings: Set<String>) {
|
|||
Pattern.compile(it).matcher(string).find()
|
||||
}
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return regexStrings.joinToString(", ")
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue