<commit_before>//
//  NamedNotification.swift
//  ESOcean
//
//  Created by <NAME> on H27/05/03.
//
//

import Foundation

/// This Notification represent almost the same thing as NSNotification.
@objc public class NamedNotification : NSObject, Notification, RawNotificationConvertible, RawNotificationType {
	
	public typealias UserInfo = [NSObject : AnyObject]
	
	public private(set) var name:String
	public private(set) var object:AnyObject?
	public private(set) var userInfo:UserInfo?
	
	public convenience init(_ name:String) {
		
		self.init(name, object: nil, userInfo: nil)
	}
	
	public convenience init(_ name:String, object:AnyObject?) {
		
		self.init(name, object: object, userInfo: nil)
	}
	
	public init(_ name:String, object:AnyObject?, userInfo:UserInfo?) {
		
		self.name = name
		self.object = object
		self.userInfo = userInfo
		
		super.init()
	}
	
//	public func copyWithZone(zone: NSZone) -> AnyObject {
//		
//		let result = NamedNotification(self.name.copy() as! String)
//		
//		if let object = self.object where object.respondsToSelector("copyWithZone:") {
//			
//			result.object = object.copy()
//		}
//		else {
//
//			result.object = self.object
//		}
//		
//		if let userInfo = self.userInfo {
//			
//			result.userInfo = (userInfo as NSDictionary).copy() as? UserInfo
//		}
//		else {
//			
//			result.userInfo = self.userInfo
//		}
//		
//		return result
//	}
	
	/// Initialize with a Raw Notification.
	public required convenience init(rawNotification:NSNotification) {
		
		self.init(rawNotification.name, object:rawNotification.object as? NSObject, userInfo:rawNotification.userInfo)
	}
	
	/// Get a Raw Notification.
	public var rawNotification:NSNotification {
		
		return NSNotification(name: self.name, object: self.object, userInfo: self.userInfo)
	}
}<commit_msg>Remove commented code and unnecessary type conversion.<commit_after>//
//  NamedNotification.swift
//  ESOcean
//
//  Created by <NAME> on H27/05/03.
//
//

import Foundation

/// This Notification represent almost the same thing as NSNotification.
@objc public class NamedNotification : NSObject, Notification, RawNotificationConvertible, RawNotificationType {
	
	public typealias UserInfo = [NSObject : AnyObject]
	
	public private(set) var name:String
	public private(set) var object:AnyObject?
	public private(set) var userInfo:UserInfo?
	
	public convenience init(_ name:String) {
		
		self.init(name, object: nil, userInfo: nil)
	}
	
	public convenience init(_ name:String, object:AnyObject?) {
		
		self.init(name, object: object, userInfo: nil)
	}
	
	public init(_ name:String, object:AnyObject?, userInfo:UserInfo?) {
		
		self.name = name
		self.object = object
		self.userInfo = userInfo
		
		super.init()
	}
	
	/// Initialize with a Raw Notification.
	public required convenience init(rawNotification:NSNotification) {
		
		self.init(rawNotification.name, object:rawNotification.object, userInfo:rawNotification.userInfo)
	}
	
	/// Get a Raw Notification.
	public var rawNotification:NSNotification {
		
		return NSNotification(name: self.name, object: self.object, userInfo: self.userInfo)
	}
}
{'fraction_non_alphanumeric': 0.11749598715890851, 'fraction_numerical': 0.0038523274478330658, 'mean_word_length': 3.6857142857142855, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '3816385', 'n_tokens_mistral': 1049, 'n_tokens_neox': 933, 'n_words': 246}