Record Class NodeGraph<Solution_>

java.lang.Object
java.lang.Record
ai.timefold.solver.core.impl.bavet.visual.NodeGraph<Solution_>

public record NodeGraph<Solution_>(Solution_ solution, List<AbstractNode> sources, List<ai.timefold.solver.core.impl.bavet.visual.GraphEdge> edges, List<ai.timefold.solver.core.impl.bavet.visual.GraphSink<Solution_>> sinks) extends Record
  • Constructor Details

    • NodeGraph

      public NodeGraph(Solution_ solution, List<AbstractNode> sources, List<ai.timefold.solver.core.impl.bavet.visual.GraphEdge> edges, List<ai.timefold.solver.core.impl.bavet.visual.GraphSink<Solution_>> sinks)
      Creates an instance of a NodeGraph record class.
      Parameters:
      solution - the value for the solution record component
      sources - the value for the sources record component
      edges - the value for the edges record component
      sinks - the value for the sinks record component
  • Method Details

    • of

      public static <Solution_, Stream_ extends BavetStream> NodeGraph<Solution_> of(Solution_ solution, List<AbstractNode> nodeList, Set<Constraint> constraintSet, Function<AbstractNode,Stream_> nodeToStreamFunction, Function<Stream_,AbstractNode> streamToParentNodeFunction)
    • buildGraphvizDOT

      public String buildGraphvizDOT()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • solution

      public Solution_ solution()
      Returns the value of the solution record component.
      Returns:
      the value of the solution record component
    • sources

      public List<AbstractNode> sources()
      Returns the value of the sources record component.
      Returns:
      the value of the sources record component
    • edges

      public List<ai.timefold.solver.core.impl.bavet.visual.GraphEdge> edges()
      Returns the value of the edges record component.
      Returns:
      the value of the edges record component
    • sinks

      public List<ai.timefold.solver.core.impl.bavet.visual.GraphSink<Solution_>> sinks()
      Returns the value of the sinks record component.
      Returns:
      the value of the sinks record component