fun Setting(value: Any, type: Int, save: Boolean, file: String) { value = value if (type == MAP) { this.defaultValue = HashMap(value as Map<*, *>) } else if (type == LIST) { this.defaultValue = copyCollection(value as Collection<*>) } else { this.defaultValue = value } save = save type = type file = file }
Creates a new Setting object with some initial values .