Junjie
22 小时以前 ef776e9fd5e4f64e4ad09a3faa12fb7bb646c79c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.zy.core.utils.station.model;
 
import com.zy.core.model.command.StationCommand;
 
public final class RerouteCommandPlan {
    private final boolean skip;
    private final String skipReason;
    private final StationCommand command;
    private final RerouteDecision decision;
    private final String dispatchScene;
 
    private RerouteCommandPlan(boolean skip,
                               String skipReason,
                               StationCommand command,
                               RerouteDecision decision,
                               String dispatchScene) {
        this.skip = skip;
        this.skipReason = skipReason;
        this.command = command;
        this.decision = decision;
        this.dispatchScene = dispatchScene;
    }
 
    public static RerouteCommandPlan skip(String reason) {
        return new RerouteCommandPlan(true, reason, null, null, null);
    }
 
    public static RerouteCommandPlan dispatch(StationCommand command,
                                              RerouteDecision decision,
                                              String dispatchScene) {
        return new RerouteCommandPlan(false, null, command, decision, dispatchScene);
    }
 
    public boolean skip() {
        return skip;
    }
 
    public String skipReason() {
        return skipReason;
    }
 
    public StationCommand command() {
        return command;
    }
 
    public RerouteDecision decision() {
        return decision;
    }
 
    public String dispatchScene() {
        return dispatchScene;
    }
}