bck
Alejandro Acuña
2024-11-11 f1cb4443aede6d4657bdc3396c8914d3a9f4fa93
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package art.servers.etdserver.configuration;
 
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import java.util.ArrayList;
import java.util.List;
 
 
@JsonRootName(value = "Configuration etd")
 
public class ConfigurationEtd
{
    @JsonProperty("Identifier")
    public String identifier = null;
 
    @JsonProperty("DPS")
    public String dpsIdentifier = null;
 
    @JsonProperty("Lanes")
    public List<EtdConfigurationLaneDPS> llanesDPS = new ArrayList<EtdConfigurationLaneDPS>();
 
 
    @JsonIgnore
    public EtdConfigurationLaneDPS getLaneDPS(int lane)
    {
        try
        {
            for (EtdConfigurationLaneDPS laneDPS : llanesDPS)
            {
                if (laneDPS.lane == lane) return(laneDPS);
            }
        }
        catch (Exception e)
        {
            
        }
 
        return(null);
    }
 
 
    @JsonIgnore
    public List<EtdConfigurationLaneDPS> getLaneEtd(String dps, int laneDps)
    {
        List<EtdConfigurationLaneDPS> result = new ArrayList<EtdConfigurationLaneDPS>();
 
        try
        {
            for (EtdConfigurationLaneDPS laneDPS : llanesDPS)
            {
                if ((laneDPS.dps.equalsIgnoreCase(dps) == true) && (laneDPS.dpsLane == laneDps)) result.add(laneDPS);
            }
        }
        catch (Exception e)
        {
            
        }
 
        return(result);
    }
 
 
    @JsonIgnore
    public String toString()
    {
        try
        {
            String result = "";
            for (EtdConfigurationLaneDPS laneDPS : llanesDPS)
            {
                result += " Dps=" + laneDPS.dps + " - LaneDps=" + laneDPS.dpsLane + " - Lane=" + laneDPS.lane + "\r\n";
            }
 
            return(result);
        }
        catch (Exception e)
        {
            
        }
 
        return(super.toString());
    }
 
}