package karballo.pgn

import java.util.*

class GameNodeVariation : GameNode() {

    var variation = ArrayList<GameNode>()

    fun add(gameNode: GameNode) {
        variation.add(gameNode)
    }

    operator fun get(index: Int): GameNode {
        return variation[index]
    }

    fun size(): Int {
        return variation.size
    }

    override fun toString(): String {
        return "GameNodeVariation{" +
                "variation=" + variation +
                "}\n"
    }
}

package karballo.pgn

class GameNodeVariation : GameNode() {

    var variation = ArrayList<GameNode>()

    fun add(gameNode: GameNode) {
        variation.add(gameNode)
    }

    operator fun get(index: Int): GameNode {
        return variation[index]
    }

    fun size(): Int {
        return variation.size
    }

    override fun toString(): String {
        return "GameNodeVariation{" +
                "variation=" + variation +
                "}\n"
    }
}

Use Kotlin types instead Java types
Use Kotlin types instead Java types

albertoruibal/karballo