mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-25 01:27:13 +00:00
feat(Kotlin): Replace value with _val (#1254)
* ci(kotlin): Add workflow file. * Update kotlin.yml * style(kotlin): value -> _val --------- Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
package utils
|
||||
|
||||
/* 顶点类 */
|
||||
class Vertex(val value: Int) {
|
||||
class Vertex(val _val: Int) {
|
||||
companion object {
|
||||
/* 输入值列表 vals ,返回顶点列表 vets */
|
||||
fun valsToVets(vals: IntArray): Array<Vertex?> {
|
||||
@@ -22,7 +22,7 @@ class Vertex(val value: Int) {
|
||||
fun vetsToVals(vets: MutableList<Vertex?>): MutableList<Int> {
|
||||
val vals = mutableListOf<Int>()
|
||||
for (vet in vets) {
|
||||
vals.add(vet!!.value)
|
||||
vals.add(vet!!._val)
|
||||
}
|
||||
return vals
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user