Class NumberAnchorGenerator

java.lang.Object
org.yaml.snakeyaml.serializer.NumberAnchorGenerator
All Implemented Interfaces:
AnchorGenerator

public class NumberAnchorGenerator extends Object implements AnchorGenerator
  • Field Details

    • lastAnchorId

      private int lastAnchorId
  • Constructor Details

    • NumberAnchorGenerator

      public NumberAnchorGenerator(int lastAnchorId)
  • Method Details

    • nextAnchor

      public String nextAnchor(Node node)
      Create the anchor name or keep the one when it was already created in the node by the low level API
      Specified by:
      nextAnchor in interface AnchorGenerator
      Parameters:
      node - - the data to anchor
      Returns:
      unique anchor name or existing anchor name