Class SectionUniqueIdCounter
- java.lang.Object
-
- org.apache.myfaces.view.facelets.impl.SectionUniqueIdCounter
-
public class SectionUniqueIdCounter extends Object
Hierarchical counter to generate unique ids.- Author:
- Leonardo Uribe
-
-
Constructor Summary
Constructors Constructor Description SectionUniqueIdCounter()
SectionUniqueIdCounter(String prefix)
SectionUniqueIdCounter(String prefix, int radix)
SectionUniqueIdCounter(String prefix, String[] cache)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endUniqueIdSection()
void
endUniqueIdSection(String base)
String
generateUniqueId()
void
generateUniqueId(StringBuilder builderToAdd)
static String[]
generateUniqueIdCache(String prefix, int count)
Creates an array of the generated unique ids for an specified prefix, than can be used later to prevent calculate the same String over and over.void
incrementUniqueId()
String
startUniqueIdSection()
String
startUniqueIdSection(String base)
-
-
-
Method Detail
-
generateUniqueIdCache
public static String[] generateUniqueIdCache(String prefix, int count)
Creates an array of the generated unique ids for an specified prefix, than can be used later to prevent calculate the same String over and over.- Parameters:
prefix
-count
-- Returns:
-
startUniqueIdSection
public String startUniqueIdSection()
-
generateUniqueId
public String generateUniqueId()
-
generateUniqueId
public void generateUniqueId(StringBuilder builderToAdd)
-
incrementUniqueId
public void incrementUniqueId()
-
endUniqueIdSection
public void endUniqueIdSection()
-
endUniqueIdSection
public void endUniqueIdSection(String base)
-
-