swift | fix style guidelines

This commit is contained in:
Damian Rzeszot 2017-10-09 12:02:29 +02:00
parent d01e5242e1
commit 9a9e52b54b
7 changed files with 21 additions and 21 deletions

View File

@ -459,10 +459,10 @@ var suitValue: Suit = .hearts
// Nicht-Integer-Enums brauchen direkt zugewiesene "Rohwerte" // Nicht-Integer-Enums brauchen direkt zugewiesene "Rohwerte"
enum BookName: String { enum BookName: String {
case John = "John" case john = "John"
case Luke = "Luke" case luke = "Luke"
} }
print("Name: \(BookName.John.rawValue)") print("Name: \(BookName.john.rawValue)")
// Enum mit assoziierten Werten // Enum mit assoziierten Werten
enum Furniture { enum Furniture {

View File

@ -463,10 +463,10 @@ var suitValue: Suit = .hearts
// Enums de tipo no-entero requiere asignaciones de valores crudas directas // Enums de tipo no-entero requiere asignaciones de valores crudas directas
enum BookName: String { enum BookName: String {
case John = "John" case john = "John"
case Luke = "Luke" case luke = "Luke"
} }
print("Name: \(BookName.John.rawValue)") print("Name: \(BookName.john.rawValue)")
// Enum con valores asociados // Enum con valores asociados
enum Furniture { enum Furniture {

View File

@ -463,10 +463,10 @@ var suitValue: Suit = .hearts
// Enums que não sejam inteiros obrigam a atribuições valor bruto (raw value) diretas // Enums que não sejam inteiros obrigam a atribuições valor bruto (raw value) diretas
enum BookName: String { enum BookName: String {
case John = "John" case john = "John"
case Luke = "Luke" case luke = "Luke"
} }
print("Name: \(BookName.John.rawValue)") print("Name: \(BookName.john.rawValue)")
// Enum com valores associados // Enum com valores associados
enum Furniture { enum Furniture {

View File

@ -553,10 +553,10 @@ var suitValue: Suit = .hearts
// Значения нецелочисленных перечислений должны быть указаны явно // Значения нецелочисленных перечислений должны быть указаны явно
// или могут выводится с помощью функции `rawValue` из имени // или могут выводится с помощью функции `rawValue` из имени
enum BookName: String { enum BookName: String {
case John case john
case Luke = "Лука" case luke = "Лука"
} }
print("Имя: \(BookName.John.rawValue)") print("Имя: \(BookName.john.rawValue)")
// Перечисление (enum) со связанными значениями // Перечисление (enum) со связанными значениями
enum Furniture { enum Furniture {

View File

@ -536,10 +536,10 @@ var suitValue: Suit = .hearts
// String enums can have direct raw value assignments // String enums can have direct raw value assignments
// or their raw values will be derived from the Enum field // or their raw values will be derived from the Enum field
enum BookName: String { enum BookName: String {
case John case john
case Luke = "Luke" case luke = "Luke"
} }
print("Name: \(BookName.John.rawValue)") print("Name: \(BookName.john.rawValue)")
// Enum with associated Values // Enum with associated Values
enum Furniture { enum Furniture {

View File

@ -459,10 +459,10 @@ var kartTipi: Kart = .kupa
// Integer olmayan enumlar direk değer (rawValue) atama gerektirir. // Integer olmayan enumlar direk değer (rawValue) atama gerektirir.
enum KitapAdi: String { enum KitapAdi: String {
case John = "John" case john = "John"
case Luke = "Luke" case luke = "Luke"
} }
print("Name: \(KitapAdi.John.rawValue)") print("Name: \(KitapAdi.john.rawValue)")
// Değerlerle ilişkilendirilmiş Enum // Değerlerle ilişkilendirilmiş Enum
enum Mobilya { enum Mobilya {

View File

@ -461,10 +461,10 @@ var suitValue: Suit = .hearts
// 非整型的枚举类型需要在定义时赋值 // 非整型的枚举类型需要在定义时赋值
enum BookName: String { enum BookName: String {
case John = "John" case john = "John"
case Luke = "Luke" case luke = "Luke"
} }
print("Name: \(BookName.John.rawValue)") print("Name: \(BookName.john.rawValue)")
// 与特定数据类型关联的枚举 // 与特定数据类型关联的枚举
enum Furniture { enum Furniture {