Record Class Payloads.Features
java.lang.Object
java.lang.Record
com.dassault_systemes.modeler.kerml.model.Payloads.Features
- Record Components:
sourceToTarget- payloads flowing from source to targettargetToSource- payloads flowing from target to source
- Enclosing class:
Payloads
public static record Payloads.Features(List<Feature> sourceToTarget, List<Feature> targetToSource)
extends Record
Immutable container for directional payload features.
Holds payloads flowing source→target and target→source.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisAny()booleanisBoth()booleanisNone()booleanbooleanReturns the value of thesourceToTargetrecord component.Returns the value of thetargetToSourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Features
Creates an instance of aFeaturesrecord class.- Parameters:
sourceToTarget- the value for thesourceToTargetrecord componenttargetToSource- the value for thetargetToSourcerecord component
-
-
Method Details
-
isSourceToTarget
public boolean isSourceToTarget()- Returns:
- true if there are payloads flowing source→target
-
isTargetToSource
public boolean isTargetToSource()- Returns:
- true if there are payloads flowing target→source
-
isBoth
public boolean isBoth()- Returns:
- true if payloads exist in both directions
-
isAny
public boolean isAny()- Returns:
- true if payloads exist in either direction
-
isNone
public boolean isNone()- Returns:
- true if no payloads exist in either direction
-
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). -
sourceToTarget
Returns the value of thesourceToTargetrecord component.- Returns:
- the value of the
sourceToTargetrecord component
-
targetToSource
Returns the value of thetargetToSourcerecord component.- Returns:
- the value of the
targetToSourcerecord component
-