Skip to content

Commit 7333177

Browse files
committed
Add final modifiers.
1 parent 12cb3b8 commit 7333177

File tree

7 files changed

+26
-15
lines changed

7 files changed

+26
-15
lines changed

SwiftState.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
/* Begin PBXBuildFile section */
1010
1F198C5C19972320001C3700 /* QiitaTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F198C5B19972320001C3700 /* QiitaTests.swift */; };
11+
1F1F74BC1C09FAA000675EAA /* ChainHandlerID.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F1F74BB1C09FAA000675EAA /* ChainHandlerID.swift */; };
1112
1F24C72C19D068B900C2FDC7 /* SwiftState.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4872D5AC19B4211900F326B5 /* SwiftState.framework */; };
1213
1F27771E1BE68D1D00C57CC9 /* RouteMappingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F27771C1BE68C7F00C57CC9 /* RouteMappingTests.swift */; };
1314
1F27771F1BE68D1E00C57CC9 /* RouteMappingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F27771C1BE68C7F00C57CC9 /* RouteMappingTests.swift */; };
@@ -73,6 +74,7 @@
7374

7475
/* Begin PBXFileReference section */
7576
1F198C5B19972320001C3700 /* QiitaTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QiitaTests.swift; sourceTree = "<group>"; };
77+
1F1F74BB1C09FAA000675EAA /* ChainHandlerID.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChainHandlerID.swift; sourceTree = "<group>"; };
7678
1F27771C1BE68C7F00C57CC9 /* RouteMappingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteMappingTests.swift; sourceTree = "<group>"; };
7779
1F70FB651BF0F46000E5AC8C /* RouteID.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteID.swift; sourceTree = "<group>"; };
7880
1F70FB681BF0F46E00E5AC8C /* RouteChainID.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteChainID.swift; sourceTree = "<group>"; };
@@ -146,6 +148,7 @@
146148
1F70FB681BF0F46E00E5AC8C /* RouteChainID.swift */,
147149
1F70FB6B1BF0F47700E5AC8C /* RouteMappingID.swift */,
148150
1F70FB6E1BF0F59600E5AC8C /* HandlerID.swift */,
151+
1F1F74BB1C09FAA000675EAA /* ChainHandlerID.swift */,
149152
);
150153
name = Identifiers;
151154
sourceTree = "<group>";
@@ -423,6 +426,7 @@
423426
1FA620241996606300460108 /* Transition.swift in Sources */,
424427
1F70FB661BF0F46000E5AC8C /* RouteID.swift in Sources */,
425428
1FA620201996606300460108 /* EventType.swift in Sources */,
429+
1F1F74BC1C09FAA000675EAA /* ChainHandlerID.swift in Sources */,
426430
1F70FB6C1BF0F47700E5AC8C /* RouteMappingID.swift in Sources */,
427431
1FA620221996606300460108 /* Route.swift in Sources */,
428432
1F70FB6F1BF0F59600E5AC8C /* HandlerID.swift in Sources */,

SwiftState/ChainHandlerID.swift

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// ChainHandlerID.swift
3+
// SwiftState
4+
//
5+
// Created by Yasuhiro Inami on 2015-11-29.
6+
// Copyright © 2015 Yasuhiro Inami. All rights reserved.
7+
//
8+
9+
public final class ChainHandlerID<S: StateType, E: EventType>
10+
{
11+
internal let bundledHandlerIDs: [HandlerID<S, E>]
12+
13+
internal init(bundledHandlerIDs: [HandlerID<S, E>])
14+
{
15+
self.bundledHandlerIDs = bundledHandlerIDs
16+
}
17+
}

SwiftState/HandlerID.swift

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2015 Yasuhiro Inami. All rights reserved.
77
//
88

9-
public class HandlerID<S: StateType, E: EventType>
9+
public final class HandlerID<S: StateType, E: EventType>
1010
{
1111
/// - Note: `nil` is used for error-handlerID
1212
internal let transition: Transition<S>?
@@ -18,14 +18,4 @@ public class HandlerID<S: StateType, E: EventType>
1818
self.transition = transition
1919
self.key = key
2020
}
21-
}
22-
23-
public class ChainHandlerID<S: StateType, E: EventType>
24-
{
25-
internal let bundledHandlerIDs: [HandlerID<S, E>]
26-
27-
internal init(bundledHandlerIDs: [HandlerID<S, E>])
28-
{
29-
self.bundledHandlerIDs = bundledHandlerIDs
30-
}
3121
}

SwiftState/Machine.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Darwin
1111
public typealias HandlerOrder = UInt8
1212
private let _defaultOrder: HandlerOrder = 100
1313

14-
public class Machine<S: StateType, E: EventType>
14+
public final class Machine<S: StateType, E: EventType>
1515
{
1616
// NOTE: `event = nil` is equivalent to `_Event.None`, which happens when non-event-based transition e.g. `tryState()` occurs.
1717
public typealias Context = (event: E?, fromState: S, toState: S, userInfo: Any?)

SwiftState/RouteChainID.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2015 Yasuhiro Inami. All rights reserved.
77
//
88

9-
public class RouteChainID<S: StateType, E: EventType>
9+
public final class RouteChainID<S: StateType, E: EventType>
1010
{
1111
internal let bundledRouteIDs: [RouteID<S, E>]?
1212

SwiftState/RouteID.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2015 Yasuhiro Inami. All rights reserved.
77
//
88

9-
public class RouteID<S: StateType, E: EventType>
9+
public final class RouteID<S: StateType, E: EventType>
1010
{
1111
internal let event: _Event<E>
1212
internal let transition: Transition<S>

SwiftState/RouteMappingID.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2015 Yasuhiro Inami. All rights reserved.
77
//
88

9-
public class RouteMappingID
9+
public final class RouteMappingID
1010
{
1111
internal let key: String
1212

0 commit comments

Comments
 (0)