java.lang.Object
org.tweetyproject.web.services.sequenceexplanation.AttackDTO

public final class AttackDTO extends Object
DTO for serializing an attack between two arguments.
Author:
Oleksandr Dzhychko
  • Constructor Details

    • AttackDTO

      public AttackDTO(@NonNull @NotNull @NotNull String attacker, @NonNull @NotNull @NotNull String attacked)
      Initialize new instance from given arguments
      Parameters:
      attacker - name of attacker argument
      attacked - name of attacked argument
  • Method Details

    • from

      public static List<AttackDTO> from(Collection<Attack> attacks)
      Serialize a collection of attacks
      Parameters:
      attacks - set of attacks
      Returns:
      List of serialized objects
    • from

      public static AttackDTO from(Attack attack)
      Serialize an attacks
      Parameters:
      attack - an attack
      Returns:
      serialized attack
    • getAttacker

      public String getAttacker()
      get attacker argument name
      Returns:
      name of attacker argument
    • getAttacked

      public String getAttacked()
      get attacked argument name
      Returns:
      name of attacked argument