Interface AbstractDialecticalFramework


public interface AbstractDialecticalFramework
The implementing subtypes must ensure the following properties:
  • Immutability
  • All methods return a non-null value if its parameters, e.g. arguments, are from this ADF
  • If a method returns a collection or stream, all its elements are non-null
This makes the usage of AbstractDialecticalFramework implementations more convenient to the user, since it avoids unnecessary nullchecks and therefore leads to more readable code. Immutability should lead to more robust code, since an ADF always remains in a valid state after creation. It makes it also easier to use in a parallel context.
Author:
Mathias Hofer
  • Method Details

    • empty

      Returns:
      AbstractDialecticalFramework empty
    • builder

      Returns:
      Builder builder
    • fromFile

      Parameters:
      file - file
      Returns:
      AbstractDialecticalFramework fromFile
      Throws:
      FileNotFoundException
      IOException
    • fromMap

      Parameters:
      map - map
      Returns:
      Builder fromMap
    • transform

      Creates a new AbstractDialecticalFramework with transformed acceptance conditions.
      Parameters:
      transformer - the transformer to use
      Returns:
      a new ADF with transformed acceptance conditions
    • transform

      Parameters:
      transformer - transformer
      Returns:
      AbstractDialecticalFramework transform
    • transform

      Creates a new AbstractDialecticalFramework with transformed acceptance conditions.
      Parameters:
      transformer - the transformer to use
      Returns:
      a new ADF with transformed acceptance conditions
    • query

      default SemanticsStep query()
      Returns:
      SemanticsStep query
    • size

      default int size()
      Returns:
      size
    • getArguments

      Set<Argument> getArguments()
      Returns:
      an unmodifiable set of all the arguments
    • linksStream

      default Stream<Link> linksStream()
      If the caller just consumes some links, this method should be used. Depending on the implementation, the links may be computed lazily and therefore we may avoid unnecessary computation.
      Returns:
      a stream of the links of this adf
    • links

      Set<Link> links()
      If the caller just consumes some of the links, the method linksStream() should be preferred to this one. Depending on the implementation, the links may be computed lazily and therefore we may avoid unnecessary computation.
      Returns:
      an unmodifiable set of all the links
    • link

      Link link(Argument parent, Argument child)
      Computes the link (parent, child) iff necessary and returns it afterwards.
      Parameters:
      parent - the parent
      child - the child
      Returns:
      the link (parent, child)
      Throws:
      IllegalArgumentException - if the adf does not contain a link (parent, child)
    • linksTo

      Set<Link> linksTo(Argument child)
      Parameters:
      child - the child
      Returns:
      a set of links (parent, child)
    • linksFrom

      Set<Link> linksFrom(Argument parent)
      Parameters:
      parent - the parent
      Returns:
      a set of links (parent, child)
    • parents

      Set<Argument> parents(Argument child)
      Parameters:
      child - child
      Returns:
      Set
    • children

      Set<Argument> children(Argument parent)
      Parameters:
      parent - parent
      Returns:
      Set
    • outgoingDegree

      int outgoingDegree(Argument arg)
      Parameters:
      arg - arg
      Returns:
      outgoingDegree
    • incomingDegree

      int incomingDegree(Argument arg)
      Parameters:
      arg - arg
      Returns:
      incomingDegree
    • contains

      boolean contains(Argument arg)
      Parameters:
      arg - arg
      Returns:
      contains
    • getAcceptanceCondition

      AcceptanceCondition getAcceptanceCondition(Argument argument)
      Guaranteed to be non-null if the ADF contains the argument.
      Parameters:
      argument - some argument of this ADF
      Returns:
      the found acceptance condition, never null
      Throws:
      IllegalArgumentException - if the argument is not contained in the ADF
    • bipolar

      default boolean bipolar()
      Checks if the ADF is bipolar. May compute all links to do so.
      Returns:
      true iff all of the links are bipolar
    • kBipolar

      int kBipolar()
      Returns the count k of non-bipolar links, which makes this ADF k-bipolar.
      Returns:
      k