以下枚举定义是有效的。能否访问“内部属性”auditData或函数auditor?
enum class GWGStatus {
UNCHECKED,
CHECKED {
lateinit var auditDate: Date
fun auditor() : String = "Peter"
}
}
GWGStatus.CHECKED.??? (does not work)
GWGStatus
中声明它们并重载或创建接口并实现它。参考- https://stackoverflow.com/questions/10055848/java-access-enum-specific-methods - Gurupad Mamadapur