Package com.structurizr.model
Class SequentialIntegerIdGeneratorStrategy
java.lang.Object
com.structurizr.model.SequentialIntegerIdGeneratorStrategy
- All Implemented Interfaces:
IdGenerator
An ID generator that simply uses a sequential number when generating IDs for model elements and relationships.
This is the default ID generator; any non-numeric IDs are ignored.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when loading/deserializing a model, to indicate that the specified ID has been found (and shouldn't be reused when generating new IDs).generateId(Element element) Generates an ID for the specified model element.generateId(Relationship relationship) Generates an ID for the specified model relationship.
-
Constructor Details
-
SequentialIntegerIdGeneratorStrategy
public SequentialIntegerIdGeneratorStrategy()
-
-
Method Details
-
generateId
Description copied from interface:IdGeneratorGenerates an ID for the specified model element.- Specified by:
generateIdin interfaceIdGenerator- Parameters:
element- an Element instance- Returns:
- the ID, as a String
-
generateId
Description copied from interface:IdGeneratorGenerates an ID for the specified model relationship.- Specified by:
generateIdin interfaceIdGenerator- Parameters:
relationship- a Relationship instance- Returns:
- the ID, as a String
-
found
Description copied from interface:IdGeneratorCalled when loading/deserializing a model, to indicate that the specified ID has been found (and shouldn't be reused when generating new IDs).- Specified by:
foundin interfaceIdGenerator- Parameters:
id- the ID that has been found
-