-
Notifications
You must be signed in to change notification settings - Fork 5
/
Transformer3WInputEntityData.java
92 lines (83 loc) · 2.64 KB
/
Transformer3WInputEntityData.java
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
86
87
88
89
90
91
92
/*
* © 2021. TU Dortmund University,
* Institute of Energy Systems, Energy Efficiency and Energy Economics,
* Research group Distribution grid planning and operation
*/
package edu.ie3.datamodel.io.factory.input;
import edu.ie3.datamodel.models.UniqueEntity;
import edu.ie3.datamodel.models.input.NodeInput;
import edu.ie3.datamodel.models.input.OperatorInput;
import edu.ie3.datamodel.models.input.connector.type.Transformer3WTypeInput;
import java.util.Map;
import java.util.Objects;
public class Transformer3WInputEntityData
extends TypedConnectorInputEntityData<Transformer3WTypeInput> {
private final NodeInput nodeC;
public Transformer3WInputEntityData(
Map<String, String> fieldsToAttributes,
Class<? extends UniqueEntity> entityClass,
NodeInput nodeA,
NodeInput nodeB,
NodeInput nodeC,
Transformer3WTypeInput type) {
super(fieldsToAttributes, entityClass, nodeA, nodeB, type);
this.nodeC = nodeC;
}
public Transformer3WInputEntityData(
Map<String, String> fieldsToAttributes,
Class<? extends UniqueEntity> entityClass,
OperatorInput operator,
NodeInput nodeA,
NodeInput nodeB,
NodeInput nodeC,
Transformer3WTypeInput type) {
super(fieldsToAttributes, entityClass, operator, nodeA, nodeB, type);
this.nodeC = nodeC;
}
/**
* Creates a new Transformer3WInputEntityData object based on a given {@link
* TypedConnectorInputEntityData} object and given third node
*
* @param entityData The TypedConnectorInputEntityData object to enhance
* @param nodeC The third node
*/
public Transformer3WInputEntityData(
TypedConnectorInputEntityData<Transformer3WTypeInput> entityData, NodeInput nodeC) {
super(entityData, entityData.getType());
this.nodeC = nodeC;
}
public NodeInput getNodeC() {
return nodeC;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
Transformer3WInputEntityData that = (Transformer3WInputEntityData) o;
return Objects.equals(nodeC, that.nodeC);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), nodeC);
}
@Override
public String toString() {
return "Transformer3WInputEntityData{"
+ "fieldsToValues="
+ getFieldsToValues()
+ ", targetClass="
+ getTargetClass()
+ ", operatorInput="
+ getOperatorInput()
+ ", nodeA="
+ getNodeA()
+ ", nodeB="
+ getNodeB()
+ ", nodeC="
+ nodeC
+ ", type="
+ getType()
+ '}';
}
}