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
ConstructorsConstructorDescriptionControlBlockTarget(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 aControlBlockTargetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionapRef()Returns the value of theapRefrecord component.desc()Returns the value of thedescrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanequalsIedName(TControlWithIEDName.IEDName iedName) Compare instance to a TControlWithIEDName.IEDName.booleanequalsTClientLn(TClientLN tClientLn) Compare instance to a TClientLN.static ControlBlockTargetMap TClientLN to ControlBlockTargetstatic ControlBlockTargetfrom(TControlWithIEDName.IEDName iedName) Map TControlWithIEDName.IEDName to ControlBlockTargetfinal inthashCode()Returns a hash code value for this object.iedName()Returns the value of theiedNamerecord component.ldInst()Returns the value of theldInstrecord component.lnClass()Returns the value of thelnClassrecord component.lnInst()Returns the value of thelnInstrecord component.prefix()Returns the value of theprefixrecord component.Map instance to TControlWithIEDName.IEDNamefinal StringtoString()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 aControlBlockTargetrecord class.- Parameters:
apRef- the value for theapRefrecord componentiedName- the value for theiedNamerecord componentldInst- the value for theldInstrecord componentlnInst- the value for thelnInstrecord componentlnClass- the value for thelnClassrecord componentprefix- the value for theprefixrecord componentdesc- the value for thedescrecord 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 theapRefrecord component.- Returns:
- the value of the
apRefrecord component
-
iedName
Returns the value of theiedNamerecord component.- Returns:
- the value of the
iedNamerecord component
-
ldInst
Returns the value of theldInstrecord component.- Returns:
- the value of the
ldInstrecord component
-
lnInst
Returns the value of thelnInstrecord component.- Returns:
- the value of the
lnInstrecord component
-
lnClass
Returns the value of thelnClassrecord component.- Returns:
- the value of the
lnClassrecord component
-
prefix
Returns the value of theprefixrecord component.- Returns:
- the value of the
prefixrecord component
-
desc
Returns the value of thedescrecord component.- Returns:
- the value of the
descrecord component
-