Class HasseDiagram


  • public class HasseDiagram
    extends java.lang.Object
    Model of hasse diagram, which exists f. e. after folding a partial language in hasse diagrams This hasse diagrams holds the labels as nodes, the init node and the amount of nodes
    Author:
    Robin Bergenthum, Raphael Meyer
    • Constructor Summary

      Constructors 
      Constructor Description
      HasseDiagram()
      The default constructor
      HasseDiagram​(java.util.ArrayList<java.lang.String> word, java.util.HashMap<java.lang.String,​java.util.ArrayList<java.lang.String>> concurrent, int amount)
      Constructor which takes word, concurrent and amount to establish a HasseDiagram
    • Constructor Detail

      • HasseDiagram

        public HasseDiagram()
        The default constructor
      • HasseDiagram

        public HasseDiagram​(java.util.ArrayList<java.lang.String> word,
                            java.util.HashMap<java.lang.String,​java.util.ArrayList<java.lang.String>> concurrent,
                            int amount)
        Constructor which takes word, concurrent and amount to establish a HasseDiagram
        Parameters:
        word - a word from a language
        concurrent - a HashMap with concurrent entries calculated from previous steps like later-than, lifecycle, alpha
        amount - an amount for the distribution of the word in the language
    • Method Detail

      • printHasse

        public void printHasse()
        Prints Hasse Informations (usefull for statistics and debug)
      • isEqual

        public boolean isEqual​(HasseDiagram otherHasse)
        Checks if a given hasse - diagram is equal to another one
        Parameters:
        otherHasse - a hasse diagram which could be equal with the current
        Returns:
        true, if hasse diagrams are equal
      • getEvents

        public java.util.ArrayList<Node> getEvents()
        Returns:
        the events of the current hasse
      • setEvents

        public void setEvents​(java.util.ArrayList<Node> events)
        Parameters:
        events - sets the event of the current hasse
      • getInit

        public Node getInit()
        Returns:
        the initialize node
      • setInit

        public void setInit​(Node init)
        Parameters:
        init - set the initialize node
      • getAmount

        public int getAmount()
        Returns:
        the amount for the distribution of the word in the language
      • setAmount

        public void setAmount​(int amount)
        Parameters:
        amount - set the amount for the distribution of the word in the language