org.apache.myfaces.view.facelets.impl
Class SectionUniqueIdCounter

java.lang.Object
  extended by org.apache.myfaces.view.facelets.impl.SectionUniqueIdCounter

public class SectionUniqueIdCounter
extends Object

Hierarchical counter to generate unique ids.

Author:
Leonardo Uribe

Constructor Summary
SectionUniqueIdCounter()
           
SectionUniqueIdCounter(String prefix)
           
SectionUniqueIdCounter(String prefix, int radix)
           
SectionUniqueIdCounter(String prefix, String[] cache)
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SectionUniqueIdCounter

public SectionUniqueIdCounter()

SectionUniqueIdCounter

public SectionUniqueIdCounter(String prefix)

SectionUniqueIdCounter

public SectionUniqueIdCounter(String prefix,
                              String[] cache)

SectionUniqueIdCounter

public SectionUniqueIdCounter(String prefix,
                              int radix)
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()

startUniqueIdSection

public String startUniqueIdSection(String base)

generateUniqueId

public String generateUniqueId()

generateUniqueId

public void generateUniqueId(StringBuilder builderToAdd)

incrementUniqueId

public void incrementUniqueId()

endUniqueIdSection

public void endUniqueIdSection()

endUniqueIdSection

public void endUniqueIdSection(String base)


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.