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 target
targetToSource - 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 Details

    • Features

      public Features(List<Feature> sourceToTarget, List<Feature> targetToSource)
      Creates an instance of a Features record class.
      Parameters:
      sourceToTarget - the value for the sourceToTarget record component
      targetToSource - the value for the targetToSource record 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • sourceToTarget

      public List<Feature> sourceToTarget()
      Returns the value of the sourceToTarget record component.
      Returns:
      the value of the sourceToTarget record component
    • targetToSource

      public List<Feature> targetToSource()
      Returns the value of the targetToSource record component.
      Returns:
      the value of the targetToSource record component