Class PreprocessorIDPool
java.lang.Object
com.helger.schematron.pure.preprocess.PreprocessorIDPool
Utility lookup cache for all used IDs within a schema.
- Author:
- Philip Helger
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetUniqueID(String sID) Create a unique ID based on the passed one.static voidsetDefaultSeparator(String sDefaultSeparator) Set the separator to be used between the original ID and the counter added internally.toString()
-
Field Details
-
DEFAULT_SEPARATOR
- See Also:
-
-
Constructor Details
-
PreprocessorIDPool
public PreprocessorIDPool()
-
-
Method Details
-
getDefaultSeparator
- Returns:
- The separator to be used between the original ID and the counter
added to make the ID unique. Never
null. The default value isDEFAULT_SEPARATOR. - Since:
- 6.3.5
-
setDefaultSeparator
Set the separator to be used between the original ID and the counter added internally.- Parameters:
sDefaultSeparator- Any non-nullvalue is okay.- Since:
- 6.3.5
-
getSeparator
- Returns:
- The separator to be used between the original ID and the counter
added to make the ID unique. Never
null. The default value isDEFAULT_SEPARATOR. - Since:
- 6.3.5
- See Also:
-
getUniqueID
Create a unique ID based on the passed one. If the passed ID is not yet contained, than a numeric index is appended until the ID is unique.- Parameters:
sID- The source ID. May benull.- Returns:
nullif the passed ID isnullindicating that no ID is present. Otherwise a unique ID is returned.
-
toString
-