Skip to content

Commit c1dabab

Browse files
committed
chore: toString()
1 parent ba76102 commit c1dabab

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/main/kotlin/spp/protocol/view/rule/ViewRule.kt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,19 @@ open class ViewRule(
6464
override fun hashCode(): Int {
6565
return name.hashCode()
6666
}
67+
68+
override fun toString(): String {
69+
return buildString {
70+
append("ViewRule(")
71+
append("name=$name, ")
72+
append("exp=$exp")
73+
if (partitions.isNotEmpty()) {
74+
append(", partitions=$partitions")
75+
}
76+
if (meterIds.isNotEmpty()) {
77+
append(", meterIds=$meterIds")
78+
}
79+
append(")")
80+
}
81+
}
6782
}

0 commit comments

Comments
 (0)