A small menubar app that allows you to switch between R versions quickly (if you have multiple versions of R framework installed). https://rud.is/rswitch
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
745 B

//
// SimpleDictionary.swift
// SwiftSoup
//
// Created by Nabil Chatbi on 30/10/16.
// Copyright © 2016 Nabil Chatbi.. All rights reserved.
//
import Foundation
public class SimpleDictionary<KeyType: Hashable, ValueType> {
public typealias DictionaryType = [KeyType: ValueType]
public private(set) var values = DictionaryType()
public init() {
}
public var count: Int {
return values.count
}
public func remove(_ key: KeyType) {
values.removeValue(forKey: key)
}
public func contains(_ key: KeyType) -> Bool {
return self.values[key] != nil
}
public func put(_ value: ValueType, forKey key: KeyType) {
self.values[key] = value
}
public func get(_ key: KeyType) -> ValueType? {
return self.values[key]
}
}