Class NumberAnchorGenerator

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

public class NumberAnchorGenerator extends Object implements AnchorGenerator
Simple generate of the format id + number
  • Field Details

    • lastAnchorId

      private int lastAnchorId
  • Constructor Details

    • NumberAnchorGenerator

      public NumberAnchorGenerator(int lastAnchorId)
      Create
      Parameters:
      lastAnchorId - - the number to start from
  • Method Details

    • nextAnchor

      public Anchor nextAnchor(Node node)
      Create value increasing the number
      Specified by:
      nextAnchor in interface AnchorGenerator
      Parameters:
      node - - ignored
      Returns:
      value with format 'id001'