Class Argument

  • All Implemented Interfaces:
    AcceptanceCondition

    public final class Argument
    extends java.lang.Object
    implements AcceptanceCondition
    An immutable representation of an ADF argument

    This argument can also be used as an AcceptanceCondition, since it is its atomic building block.

    Author:
    Mathias Hofer
    • Constructor Summary

      Constructors 
      Constructor Description
      Argument()  
      Argument​(java.lang.String name)  
    • Method Summary

      Modifier and Type Method Description
      <U,​D>
      U
      accept​(Visitor<U,​D> visitor, D topDownData)
      Passes the topDownData to the right visit method and returns the result of the visit method, performs no modifications on them.
      java.util.stream.Stream<Argument> arguments()  
      boolean contains​(Argument arg)
      Checks if the given argument is contained in this acceptance condition.
      java.util.Set<AcceptanceCondition> getChildren()  
      java.lang.String getName()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Argument

        public Argument()
      • Argument

        public Argument​(java.lang.String name)
        Parameters:
        name - the name of the argument
    • Method Detail

      • arguments

        public java.util.stream.Stream<Argument> arguments()
        Specified by:
        arguments in interface AcceptanceCondition
        Returns:
        recursively computes all the arguments of this acceptance condition
      • getName

        public java.lang.String getName()
        Returns:
        the name
      • contains

        public boolean contains​(Argument arg)
        Description copied from interface: AcceptanceCondition
        Checks if the given argument is contained in this acceptance condition.

        Note that this relation is reflexive, hence each argument contains itself.

        Specified by:
        contains in interface AcceptanceCondition
        Parameters:
        arg - some argument
        Returns:
        true if the argument is contained
      • accept

        public <U,​D> U accept​(Visitor<U,​D> visitor,
                                    D topDownData)
        Description copied from interface: AcceptanceCondition
        Passes the topDownData to the right visit method and returns the result of the visit method, performs no modifications on them.

        This allows for type-safe traversal through the acceptance condition structure.

        Specified by:
        accept in interface AcceptanceCondition
        Type Parameters:
        U - the bottom-up data
        D - the top-down data
        Parameters:
        visitor - the visitor
        topDownData - the data which is passed from the root of the acceptance condition to the leaf
        Returns:
        the result of the visit method
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object