halirutan
08/30/2017, 10:42 PMinterface
to hold data-values
public interface SymbolNames {
String BeginPackage = "BeginPackage";
String EndPackage = "EndPackage";
String End = "End";
}
What is the equivalent in Kotlin? When I convert the above to Kotlin it gives me an interface with a companion object. Is this the way to go?karelpeeters
08/30/2017, 10:44 PMhalirutan
08/30/2017, 11:11 PMconst val BeginPackage = "BeginPackage"
const val EndPackage = "EndPackage"
const val End = "End"
An enum doesn't really fits as it's really only a collection of similar things but not enumerable.karelpeeters
08/31/2017, 6:43 AMobject SymbolNames {
...
}
halirutan
09/01/2017, 2:44 AM