Record Class ActCall<T,R>

java.lang.Object
java.lang.Record
jp.co.moneyforward.autotest.framework.action.ActCall<T,R>
Type Parameters:
T - Type input parameter
All Implemented Interfaces:
Call

public record ActCall<T,R>(String outputVariableName, Act<T,R> act, String inputVariableName) extends Record implements Call
An act that models a call to a form, such as a function or an assertion.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ActCall(String outputVariableName, Act<T,R> act, String inputVariableName)
    Creates an instance of this class.
  • Method Summary

    Modifier and Type
    Method
    Description
    act()
    Returns the value of the act record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the inputVariableName record component.
    Returns the value of the outputVariableName record component.
    com.github.dakusui.actionunit.core.Action
    toAction(ActionComposer actionComposer)
    Converts this call to action to an action object.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ActCall

      public ActCall(String outputVariableName, Act<T,R> act, String inputVariableName)
      Creates an instance of this class.
      Parameters:
      outputVariableName - A name of a field for output.
      act - An act to be called.
      inputVariableName - A name of a field for input.
      See Also:
  • Method Details

    • toAction

      public com.github.dakusui.actionunit.core.Action toAction(ActionComposer actionComposer)
      Description copied from interface: Call

      Converts this call to action to an action object.

      This is an Node#accept method in the Visitor pattern. Usually implementations of this method should call back by actionComposer#create(this) to make a double dispatch happen.

      Each value in the ongoingResolverBundle is a function that resolves a value of a variable designated by a corresponding key.

      Specified by:
      toAction in interface Call
      Parameters:
      actionComposer - A visitor, which creates an action from this object.
      Returns:
      An action created by actionComposer.
    • 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.
    • outputVariableName

      public String outputVariableName()
      Returns the value of the outputVariableName record component.
      Returns:
      the value of the outputVariableName record component
    • act

      public Act<T,R> act()
      Returns the value of the act record component.
      Returns:
      the value of the act record component
    • inputVariableName

      public String inputVariableName()
      Returns the value of the inputVariableName record component.
      Returns:
      the value of the inputVariableName record component