Class SimFieldLink

java.lang.Object
net.simplace.sim.model.SimFieldLink

public class SimFieldLink extends Object
Edge of the solution graph between two field containers, holding the variable links between them.
Author:
Andreas Enders
  • Constructor Details

    • SimFieldLink

      public SimFieldLink(FWSimFieldContainer tSourceSimO, FWSimFieldContainer tDestSimO)
      Parameters:
      tSourceSimO - source field container
      tDestSimO - destination field container
  • Method Details

    • getSourceSimObject

      public FWSimFieldContainer getSourceSimObject()
      Returns:
      the iSourceVertex
    • setSourceSimObject

      public void setSourceSimObject(FWSimFieldContainer aSourceVertex)
      Parameters:
      aSourceVertex - source field container
    • setDestSimObject

      public void setDestSimObject(FWSimFieldContainer aDestVertex)
      Parameters:
      aDestVertex - destination field container
    • getDestSimObject

      public FWSimFieldContainer getDestSimObject()
      Returns:
      the iDestVertex
    • getSimLinks

      public List<SimVarLink> getSimLinks()
      Returns:
      the simLinkList
    • addSimLink

      public void addSimLink(SimVarLink aSimLink)
      Parameters:
      aSimLink - variable link to add
    • removeSimLink

      public void removeSimLink(SimVarLink aSimVarLink)
      Parameters:
      aSimVarLink - variable link to remove
    • isInOrder

      public boolean isInOrder()
      Returns:
      true if the order number of the source is not greater than that of the destination (checked at each call, so a changed order of execution is shown at once); false means the destination gets the value of the previous step
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • equals

      public boolean equals(Object obj)
      Identity, consistent with hashCode(): edges are keys in the graph's hash maps. (It compared toString(), i.e. order numbers and link count, which changes when links are added, while hashCode was identity.)
      Overrides:
      equals in class Object
      See Also:
    • getSimVarLinksInfo

      public String getSimVarLinksInfo()
      Returns:
      the variable links of this edge as HTML, e.g. for an info dialog of the GUI
    • clone

      public SimFieldLink clone()
      Overrides:
      clone in class Object
      See Also:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object