Record Class ControlBlockTarget
java.lang.Object
java.lang.Record
org.lfenergy.compas.sct.commons.dto.ControlBlockTarget
- Record Components:
apRef
- apRefiedName
- iedName : this field is "value" on TControlWithIEDName.IEDNameldInst
- ldInstlnInst
- lnInstlnClass
- lnClassprefix
- prefixdesc
- desc : this field is only available on TClientLN
public record ControlBlockTarget(String apRef, String iedName, String ldInst, String lnInst, String lnClass, String prefix, String desc)
extends Record
Record that hold the data for TClientLN and TControlWithIEDName.IEDName which have the same fields.
It provides mapping methods "to" and "from" TClientLN and IEDName.
It also provides comparison methods with TClientLN and IEDName.
-
Constructor Summary
ConstructorDescriptionControlBlockTarget
(String apRef, String iedName, String ldInst, String lnInst, String lnClass, String prefix) "desc" field is only available on TClientLN, not on TControlWithIEDName.IEDName, so we provide a constructor without "desc" parameterControlBlockTarget
(String apRef, String iedName, String ldInst, String lnInst, String lnClass, String prefix, String desc) Creates an instance of aControlBlockTarget
record class. -
Method Summary
Modifier and TypeMethodDescriptionapRef()
Returns the value of theapRef
record component.desc()
Returns the value of thedesc
record component.final boolean
Indicates whether some other object is "equal to" this one.boolean
equalsIedName
(TControlWithIEDName.IEDName iedName) Compare instance to a TControlWithIEDName.IEDName.boolean
equalsTClientLn
(TClientLN tClientLn) Compare instance to a TClientLN.static ControlBlockTarget
Map TClientLN to ControlBlockTargetstatic ControlBlockTarget
from
(TControlWithIEDName.IEDName iedName) Map TControlWithIEDName.IEDName to ControlBlockTargetfinal int
hashCode()
Returns a hash code value for this object.iedName()
Returns the value of theiedName
record component.ldInst()
Returns the value of theldInst
record component.lnClass()
Returns the value of thelnClass
record component.lnInst()
Returns the value of thelnInst
record component.prefix()
Returns the value of theprefix
record component.Map instance to TControlWithIEDName.IEDNamefinal String
toString()
Returns a string representation of this record class.Map instance to TClientLN
-
Constructor Details
-
ControlBlockTarget
public ControlBlockTarget(String apRef, String iedName, String ldInst, String lnInst, String lnClass, String prefix) "desc" field is only available on TClientLN, not on TControlWithIEDName.IEDName, so we provide a constructor without "desc" parameter -
ControlBlockTarget
public ControlBlockTarget(String apRef, String iedName, String ldInst, String lnInst, String lnClass, String prefix, String desc) Creates an instance of aControlBlockTarget
record class.- Parameters:
apRef
- the value for theapRef
record componentiedName
- the value for theiedName
record componentldInst
- the value for theldInst
record componentlnInst
- the value for thelnInst
record componentlnClass
- the value for thelnClass
record componentprefix
- the value for theprefix
record componentdesc
- the value for thedesc
record component
-
-
Method Details
-
toTClientLn
Map instance to TClientLN- Returns:
- new instance of TClientLN
-
toIedName
Map instance to TControlWithIEDName.IEDName- Returns:
- new instance of TControlWithIEDName.IEDName
-
from
Map TClientLN to ControlBlockTarget- Parameters:
tClientLN
- tClientLN to map- Returns:
- new instance of ControlBlockTarget
-
from
Map TControlWithIEDName.IEDName to ControlBlockTarget- Parameters:
iedName
- iedName to map- Returns:
- new instance of ControlBlockTarget
-
equalsIedName
Compare instance to a TControlWithIEDName.IEDName. desc value is ignored since TControlWithIEDName.IEDName does not have a desc attribute. Blank lnInst are considered equals. Blank prefix are considered equals.- Parameters:
iedName
- iedName to compare- Returns:
- true if all attributes of this instance (except desc) are equal to the attributes of TControlWithIEDName.IEDName (lnInst and prefix are compared using Utils#equalsOrBothBlank).
- See Also:
-
equalsTClientLn
Compare instance to a TClientLN. Blank lnInst are considered equals. Blank prefix are considered equals. Blank desc are considered equals.- Parameters:
tClientLn
- tClientLn to compare- Returns:
- true if all attributes of this instance are equal to the attributes of TControlWithIEDName.IEDName (lnInst, prefix and desc are compared using Utils#equalsOrBothBlank).
- See Also:
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
apRef
Returns the value of theapRef
record component.- Returns:
- the value of the
apRef
record component
-
iedName
Returns the value of theiedName
record component.- Returns:
- the value of the
iedName
record component
-
ldInst
Returns the value of theldInst
record component.- Returns:
- the value of the
ldInst
record component
-
lnInst
Returns the value of thelnInst
record component.- Returns:
- the value of the
lnInst
record component
-
lnClass
Returns the value of thelnClass
record component.- Returns:
- the value of the
lnClass
record component
-
prefix
Returns the value of theprefix
record component.- Returns:
- the value of the
prefix
record component
-
desc
Returns the value of thedesc
record component.- Returns:
- the value of the
desc
record component
-