Class Instruction


  • public class Instruction
    extends Object
    Implements Instruction class. Instruction is an essential component of the execution plan. An execution is expressed as a set of instruction objects.
    Version:
    1.0
    Author:
    Axel-C. Ngonga Ngomo (ngonga@informatik.uni-leipzig.de), Kleanthi Georgala (georgala@informatik.uni-leipzig.de)
    • Constructor Detail

      • Instruction

        public Instruction​(Instruction.Command c,
                           String measure,
                           String thrs,
                           int source,
                           int target,
                           int result)
        Constructor of Instruction class.
        Parameters:
        c - Command
        measure - Measure expression
        thrs - Threshold
        source - Source index
        target - Target index
        result - Result index
    • Method Detail

      • getResultIndex

        public int getResultIndex()
        Returns the result index of the instruction.
        Returns:
        the result index of the instruction
      • setResultIndex

        public void setResultIndex​(int resultIndex)
        Sets the result index of the instruction.
        Parameters:
        resultIndex - The resultIndex to set
      • getCommand

        public Instruction.Command getCommand()
        Returns the command of the instruction.
        Returns:
        command of the instruction
      • setCommand

        public void setCommand​(Instruction.Command command)
        Sets the command of the instruction.
        Parameters:
        command - The command to set
      • getMeasureExpression

        public String getMeasureExpression()
        Returns the measure expression of the instruction.
        Returns:
        the measure expression of the instruction
      • setMeasureExpression

        public void setMeasureExpression​(String measureExpression)
        Sets the measure expression of the instruction.
        Parameters:
        measureExpression - The measure expression to set
      • getSourceIndex

        public int getSourceIndex()
        Returns the resource index of the instruction.
        Returns:
        the resource index of the instruction
      • setSourceIndex

        public void setSourceIndex​(int resourceIndex)
        Sets the source index of the instruction.
        Parameters:
        resourceIndex - The resourceIndex to set
      • getTargetIndex

        public int getTargetIndex()
        Returns the target index of the instruction.
        Returns:
        the target index of the instruction
      • setTargetIndex

        public void setTargetIndex​(int targetIndex)
        Sets the target index of the instruction.
        Parameters:
        targetIndex - The targetIndex to set
      • getThreshold

        public String getThreshold()
        Returns the threshold of the instruction.
        Returns:
        the threshold of the instruction
      • setThreshold

        public void setThreshold​(String threshold)
        Sets the threshold of the instruction.
        Parameters:
        threshold - The threshold to set
      • getMainThreshold

        public String getMainThreshold()
        Returns the mainThreshold of the instruction.
        Returns:
        the mainThreshold
      • setMainThreshold

        public void setMainThreshold​(String threshold)
        Sets the mainThreshold of the instruction.
        Parameters:
        threshold - The mainThreshold to set
      • equals

        public boolean equals​(Object other)
        Compares the current instruction with another instruction. If the other instruction is null then it returns false. Otherwise, the function checks if each field of the current instruction is equal to the corresponding field of the other instruction.
        Overrides:
        equals in class Object
        Returns:
        true if both instructions are equal, and false otherwise
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • toString

        public String toString()
        String representation of Instruction.
        Overrides:
        toString in class Object
        Returns:
        a string representations of instruction