Interface Label

All Known Implementing Classes:
DiffLinesLabel, LinesLabel, VariationLabel

public interface Label
Base interface for labels of VariationTrees and VariationDiffs.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a deep copy of this label.
    Returns the lines which need to be printed before the children of a node.
    Returns the lines which need to be printed after the children of a node.
    static boolean
    Tests whether two labels are observably equal.
    default Label
    Returns a deep copy where the state that is only valid at time is set to its default value.
    default Label
    Returns a deep copy where the state that is only valid at time is copied from other.
  • Method Details

    • getLines

      List<String> getLines()
      Returns the lines which need to be printed before the children of a node. Most lines associated with a node should be included in this list, for example, #ifs are stored here.
    • getTrailingLines

      List<String> getTrailingLines()
      Returns the lines which need to be printed after the children of a node. For example, #endifs are stored as trailing lines.
    • withoutTimeDependentState

      default Label withoutTimeDependentState(Time time)
      Returns a deep copy where the state that is only valid at time is set to its default value. Note that not all implementations need to have time dependent state.
      See Also:
    • withTimeDependentStateFrom

      default Label withTimeDependentStateFrom(Label other, Time time)
      Returns a deep copy where the state that is only valid at time is copied from other. All time independent state must be equal in this and other. Note that not all implementations need to have time dependent state.
      See Also:
    • clone

      Label clone()
      Creates a deep copy of this label.
    • observablyEqual

      static boolean observablyEqual(Label a, Label b)
      Tests whether two labels are observably equal. Observably equal means that the two labels cannot be distinguished by using methods from this interface. The given labels might indeed be of different classes or might be considered unequal regarding Object.equals(Object).