Package org.thymeleaf.context
Class IdentifierSequences
Object
org.thymeleaf.context.IdentifierSequences
Objects of this class are kept at ITemplateContext
in order to provide templates
with a way to create unique id
attribute values during template processing.
- Since:
- 3.0.0
- Author:
- Daniel Fernández
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a new index (ID count) for a specific value of theid
attribute, and increments the count.getNextIDSeq
(String id) Returns the index (ID count) for a specific value of theid
attribute without incrementing the count.Returns the last index (ID count) returned for a specific value of theid
attribute (without incrementing the count).
-
Constructor Details
-
IdentifierSequences
public IdentifierSequences()
-
-
Method Details
-
getAndIncrementIDSeq
Returns a new index (ID count) for a specific value of the
id
attribute, and increments the count.- Parameters:
id
- the ID for which the count will be computed- Returns:
- the new count, ready to be used
-
getNextIDSeq
Returns the index (ID count) for a specific value of the
id
attribute without incrementing the count.- Parameters:
id
- the ID for which the count will be retrieved- Returns:
- the current count
-
getPreviousIDSeq
Returns the last index (ID count) returned for a specific value of the
id
attribute (without incrementing the count).- Parameters:
id
- the ID for which the last count will be retrieved- Returns:
- the count
-