Class RuleSet<T extends Rule<?,​?>>

  • Type Parameters:
    T - the specific rule class
    All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.Set<T>
    Direct Known Subclasses:
    AspicArgumentationTheory, NLPProgram, Program

    public class RuleSet<T extends Rule<?,​?>>
    extends java.util.HashSet<T>
    This class represents a set of rules and provides several auxiliary methods for accessing such a set.
    Author:
    Matthias Thimm, Tim Janus
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      RuleSet()
      Creates a new empty rule set.
      RuleSet​(java.util.Collection<? extends T> rules)
      Creates a new rule set with the given rules
    • Method Summary

      Modifier and Type Method Description
      java.util.Set<Formula> getConclusions()
      Returns all conclusions of all rules of this rule set.
      java.util.Set<Formula> getPremises()
      Returns all premises appearing in this rule set.
      java.util.Set<T> getRulesWithConclusion​(Formula f)
      Returns all rules this set with the given conclusion
      RuleSet<T> getSyntacticModule​(Formula f)
      Returns the maximal subset of this rule set that is closed under "syntactic" neighbourhood relationship for the given formula.
      • Methods inherited from class java.util.HashSet

        add, clear, clone, contains, isEmpty, iterator, remove, size, spliterator
      • Methods inherited from class java.util.AbstractSet

        equals, hashCode, removeAll
      • Methods inherited from class java.util.AbstractCollection

        addAll, containsAll, retainAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.Set

        addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
    • Constructor Detail

      • RuleSet

        public RuleSet()
        Creates a new empty rule set.
      • RuleSet

        public RuleSet​(java.util.Collection<? extends T> rules)
        Creates a new rule set with the given rules
        Parameters:
        rules - a collection of rules.
    • Method Detail

      • getRulesWithConclusion

        public java.util.Set<T> getRulesWithConclusion​(Formula f)
        Returns all rules this set with the given conclusion
        Parameters:
        f - a formula
        Returns:
        all rules this set with the given conclusion
      • getConclusions

        public java.util.Set<Formula> getConclusions()
        Returns all conclusions of all rules of this rule set.
        Returns:
        all conclusions of all rules of this rule set.
      • getPremises

        public java.util.Set<Formula> getPremises()
        Returns all premises appearing in this rule set.
        Returns:
        all premises appearing in this rule set.
      • getSyntacticModule

        public RuleSet<T> getSyntacticModule​(Formula f)
        Returns the maximal subset of this rule set that is closed under "syntactic" neighbourhood relationship for the given formula. A formula/rule has a "syntactic" neighbourhood relationship with a rule iff they share vocabulary elements.
        Parameters:
        f - some formula
        Returns:
        a rule set.