<commit_before>//
//  Manager.swift
//  WindowKit
//
//  Created by 林達也 on 2015/12/12.
//  Copyright © 2015年 jp.sora0077. All rights reserved.
//

import Foundation
import UIKit.UIWindow
import UIKit.UIScreen
import UIKit.UIView

public protocol WindowLevel: Hashable {

    var rawValue: UInt { get }
}

public final class Manager<Level: WindowLevel> {
    
    private weak var _keyWindow: UIWindow?
    private var _windows: [Level: UIWindow] = [:]
    
    public init(keyWindow: UIWindow) {
        _keyWindow = keyWindow
    }
    
    subscript (level: Level) -> UIWindow {
        
        if let window = _windows[level] {
            return window
        }
        
        let window = Window(frame: UIScreen.mainScreen().bounds)
        window.windowLevel = UIWindowLevelNormal + UIWindowLevel(level.rawValue)<commit_msg>Add public idenyifier<commit_after>//
//  Manager.swift
//  WindowKit
//
//  Created by 林達也 on 2015/12/12.
//  Copyright © 2015年 jp.sora0077. All rights reserved.
//

import Foundation
import UIKit.UIWindow
import UIKit.UIScreen
import UIKit.UIView

public protocol WindowLevel: Hashable {

    var rawValue: UInt { get }
}

public final class Manager<Level: WindowLevel> {
    
    private weak var _keyWindow: UIWindow?
    private var _windows: [Level: UIWindow] = [:]
    
    public init(keyWindow: UIWindow) {
        _keyWindow = keyWindow
    }
    
    public subscript (level: Level) -> UIWindow {
        
        if let window = _windows[level] {
            return window
        }
        
        let window = Window(frame: UIScreen.mainScreen().bounds)
        window.windowLevel = UIWindowLevelNormal + UIWindowLevel(level.rawValue)
{'fraction_non_alphanumeric': 0.09387997623291741, 'fraction_numerical': 0.019013666072489603, 'mean_word_length': 2.5230125523012554, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '319366', 'n_tokens_mistral': 542, 'n_tokens_neox': 515, 'n_words': 138}