Class VariationLabel<L extends Label>

java.lang.Object
org.variantsync.diffdetective.variation.VariationLabel<L>
Type Parameters:
L - the label of the trees (the object language) over which variability is introduced
All Implemented Interfaces:
Label, HasNodeType

public class VariationLabel<L extends Label> extends Object implements Label, HasNodeType
Extends an inner Label, the object language, with variability, the meta language. This class allows encoding of multiple levels of variability in the sense of variation trees of variation trees. Such higher-order variation trees can be encoded in a single tree structure because the result of configuring a variation tree is still a tree. In other words: the object language of a VariationTree<L> is a tree with labels L. The trick is that a variation tree is just a tree with labels VariationLabel<L>.
See Also:
  • Field Details

    • type

      private NodeType type
    • innerLabel

      private L extends Label innerLabel
  • Constructor Details

    • VariationLabel

      public VariationLabel(NodeType type, L innerLabel)
  • Method Details

    • getInnerLabel

      public L getInnerLabel()
    • setInnerLabel

      public void setInnerLabel(L innerLabel)
    • getLines

      public List<String> getLines()
      Description copied from interface: Label
      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.
      Specified by:
      getLines in interface Label
    • getTrailingLines

      public List<String> getTrailingLines()
      Description copied from interface: Label
      Returns the lines which need to be printed after the children of a node. For example, #endifs are stored as trailing lines.
      Specified by:
      getTrailingLines in interface Label
    • getNodeType

      public NodeType getNodeType()
      Description copied from interface: HasNodeType
      Returns the type of this node.
      Specified by:
      getNodeType in interface HasNodeType
    • clone

      public VariationLabel<L> clone()
      Description copied from interface: Label
      Creates a deep copy of this label.
      Specified by:
      clone in interface Label
      Overrides:
      clone in class Object
    • toString

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object