Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  DeviceInfo.swift   Sprache: JAVA

 

import Foundation

public enum Platform: Int, Sendable {
    case unspecified = 0
    case android = 1
    case ios = 2
    case desktop = 3
    case web = 4

    public init?(rawValue: Int) {
        switch rawValue {
        case 0: self = .unspecified
        case 1: self = .android
        case 2: self = .ios
        case 3: self = .desktop
        case 4: self = .web
        default: self = .unspecified
        }
    }

    public var rawValue: Int {
        switch self {
        case .unspecified: 0
        case .android: 1
        case .ios: 2
        case .desktop: 3
        case .web: 4
        }
    }
    
    public var systemSymbolName: String {
        switch self {
        case .ios:
            "iphone"
        case .android:
            "smartphone"
        case .desktop, .web, .unspecified:
            "desktopcomputer"
        }
    }
}

public struct DeviceInfo: Sendable {
    public let deviceID: UInt64
    public let label: String
    public let lastLoginAt: Date
    public let badge: String?
    public let platform: Platform
    public let platformDetails: String?
    
    public init(
        deviceID: UInt64,
        label: String,
        lastLoginAt: Date,
        badge: String?,
        platform: Platform,
        platformDetails: String?
    ) {
        self.deviceID = deviceID
        self.label = label
        self.lastLoginAt = lastLoginAt
        self.badge = badge
        self.platform = platform
        self.platformDetails = platformDetails
    }
}

// MARK: - Equatable

extension DeviceInfo: Equatable {
    // intentionally left blank: the Swift compiler will synthesize an
    // implementation of func == that will return true iff all properties
    // are equal
}

// MARK: - Identifiable

extension DeviceInfo: Identifiable {
    public typealias ID = UInt64

    public var id: UInt64 {
        deviceID
    }
}

Messung
CHZG
869210092

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1104842
#Domains=499168