Class NumberAnchorGenerator

  • All Implemented Interfaces:
    AnchorGenerator

    public class NumberAnchorGenerator
    extends java.lang.Object
    implements AnchorGenerator
    Simple generate of the format id + number
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int lastAnchorId  
    • Constructor Summary

      Constructors 
      Constructor Description
      NumberAnchorGenerator​(int lastAnchorId)
      Create
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Anchor nextAnchor​(Node node)
      Create value increasing the number
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • lastAnchorId

        private int lastAnchorId
    • Constructor Detail

      • NumberAnchorGenerator

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

      • 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'