<commit_before>//
// This file is part of Nabigeta
//
// Created by JC on 04/11/14.
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code
//

import Foundation
import UIKit

public class RouteCollection : SequenceType {
    private var routes : Dictionary<String, Routable>

    public init() {
        self.routes = [:]
    }

    public func add(route: Routable) {
        self.routes[route.name] = route
    }

    public func add(name: String, destination: UIViewController.Type, context: AnyObject.Type, url: String? = nil) {
        return self.add(Route(name: name, destination: destination, context: context, url: url, stack: .Current))
    }

    public func add(name: String,
        url: String?,
        destination: UIViewController.Type,
        context: AnyObject.Type,
        stackType: UINavigationController?) {
            return self.add(Route(name: name,destination: destination, context: context, url: url, stack: .Custom(stackType)))
    }

    public func add(name: String, segue: NSString, context: AnyObject.Type, url: String?) {
        return self.add(SegueRoute(name: name, segueIdentifier: segue, context: context, url: url))
    }

    public subscript(name: String) -> Routable? {<commit_msg>[collection] simplified<commit_after>//
// This file is part of Nabigeta
//
// Created by JC on 04/11/14.
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code
//

import Foundation
import UIKit

public class RouteCollection : SequenceType {
    private var routes : Dictionary<String, Routable>

    public init() {
        self.routes = [:]
    }

    public func add(route: Routable) {
        self.routes[route.name] = route
    }

    public subscript(name: String) -> Routable? {
{'fraction_non_alphanumeric': 0.10625674217907227, 'fraction_numerical': 0.006472491909385114, 'mean_word_length': 3.131403118040089, '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': '5198941', 'n_tokens_mistral': 544, 'n_tokens_neox': 515, 'n_words': 178}