[Swift] Remove Triple.swift.

This is not in use.  It never has been, as far as I can see.
This commit is contained in:
Ewan Mellor 2017-11-10 15:02:05 -08:00
parent b4c34da1f0
commit 19c0ecaedf
No known key found for this signature in database
GPG Key ID: 7CE1C6BC9EC8645D
1 changed files with 0 additions and 38 deletions

View File

@ -1,38 +0,0 @@
///
/// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
/// Use of this file is governed by the BSD 3-clause license that
/// can be found in the LICENSE.txt file in the project root.
///
public class Triple<A:Hashable, B:Hashable, C:Hashable>: Hashable, CustomStringConvertible {
public let a: A
public let b: B
public let c: C
public init(_ a: A, _ b: B, _ c: C) {
self.a = a
self.b = b
self.c = c
}
public var hashValue: Int {
var hash = MurmurHash.initialize()
hash = MurmurHash.update(hash, a)
hash = MurmurHash.update(hash, b)
hash = MurmurHash.update(hash, c)
return MurmurHash.finish(hash, 3)
}
public var description: String {
return "\(a),\(b),(c)"
}
}
public func ==<A, B, C>(lhs: Triple<A, B, C>, rhs: Triple<A, B, C>) -> Bool {
if lhs === rhs {
return true
}
// return false
return lhs.a == rhs.a && lhs.b == rhs.b && lhs.c == rhs.c
}