RISC JKU

at.jku.risc.stout.hoau.data

Class EquationSystem<T extends Equation>

    • Constructor Summary

      Constructors 
      Constructor and Description
      EquationSystem() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void add(T equation)
      Adds a new equation to this system.
      void clear()
      Removes all the equations of this system.
      EquationSystem<T> clone() 
      T getFirst()
      Retrieves the first element of this system of equations or returns null if it is empty.
      T getLast()
      Retrieves the last element of this system of equations or returns null if it is empty.
      boolean isEmpty()
      Tests whether the system of equations is empty.
      Iterator<T> iterator() 
      abstract T newEquation()
      You have to implement this method, so that an algorithm is able to instantiate new Equations of arbitrary types.
      T newEquation(TermNode left, TermNode right)
      Instantiates an equation of the specified type and initializes it with the given TermNodes.
      T popFirst()
      Retrieves and removes the first element of this system of equations or returns null if it is empty.
      T popLast()
      Retrieves and removes the last element of this system of equations or returns null if it is empty.
      int size()
      Returns the number of equations in this system.
      String toString() 
    • Field Detail

      • EQ_PREFIX1

        public static String EQ_PREFIX1
        The output will look like "EQ_PREFIX1#i# EQ_PREFIX2" where #i# is the index of an equation.
      • EQ_PREFIX2

        public static String EQ_PREFIX2
        If EQ_PREFIX2 is null then the output of the index will also be omitted.
      • EQ_SEPARATOR

        public static String EQ_SEPARATOR
        The separator is used to separate the equations of this system.
    • Constructor Detail

      • EquationSystem

        public EquationSystem()
    • Method Detail

      • add

        public void add(T equation)
        Adds a new equation to this system.
      • clear

        public void clear()
        Removes all the equations of this system.
      • getFirst

        public T getFirst()
        Retrieves the first element of this system of equations or returns null if it is empty.
      • getLast

        public T getLast()
        Retrieves the last element of this system of equations or returns null if it is empty.
      • isEmpty

        public boolean isEmpty()
        Tests whether the system of equations is empty.
      • newEquation

        public abstract T newEquation()
        You have to implement this method, so that an algorithm is able to instantiate new Equations of arbitrary types.
      • newEquation

        public T newEquation(TermNode left,
                    TermNode right)
        Instantiates an equation of the specified type and initializes it with the given TermNodes.
      • popFirst

        public T popFirst()
        Retrieves and removes the first element of this system of equations or returns null if it is empty.
      • popLast

        public T popLast()
        Retrieves and removes the last element of this system of equations or returns null if it is empty.
      • size

        public int size()
        Returns the number of equations in this system.