|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.id.AbstractStringIdentifierGenerator
public abstract class AbstractStringIdentifierGenerator
Abstract superclass for StringIdentifierGenerator implementations.
Field Summary | |
---|---|
protected static int |
ALPHA_NUMERIC_CHARSET_SIZE
Number of alphanumeric characters. |
protected static int |
DEFAULT_ALPHANUMERIC_IDENTIFIER_SIZE
Default size of an alphanumeric identifier. |
protected static int |
MAX_INT_ALPHANUMERIC_VALUE_LENGTH
Maximum length for an alphanumeric string representing an integer value. |
protected static int |
MAX_INT_NUMERIC_VALUE_LENGTH
Maximum length for a numeric string representing an integer value. |
protected static int |
MAX_LONG_ALPHANUMERIC_VALUE_LENGTH
Maximum length for an alphanumeric string representing a long value. |
protected static int |
MAX_LONG_NUMERIC_VALUE_LENGTH
Maximum length for a numeric string representing a long value. |
Fields inherited from interface org.apache.commons.id.StringIdentifierGenerator |
---|
INFINITE_MAX_LENGTH |
Constructor Summary | |
---|---|
protected |
AbstractStringIdentifierGenerator()
Constructor. |
Method Summary | |
---|---|
long |
maxLength()
Returns the maximum length (number or characters) for an identifier from this sequence. |
long |
minLength()
Returns the minimum length (number of characters) for an identifier from this sequence. |
java.lang.Object |
nextIdentifier()
Gets the next identifier in the sequence. |
abstract java.lang.String |
nextStringIdentifier()
Gets the next identifier in the sequence. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int MAX_LONG_NUMERIC_VALUE_LENGTH
protected static final int ALPHA_NUMERIC_CHARSET_SIZE
protected static final int MAX_LONG_ALPHANUMERIC_VALUE_LENGTH
protected static final int MAX_INT_NUMERIC_VALUE_LENGTH
protected static final int MAX_INT_ALPHANUMERIC_VALUE_LENGTH
protected static final int DEFAULT_ALPHANUMERIC_IDENTIFIER_SIZE
Constructor Detail |
---|
protected AbstractStringIdentifierGenerator()
Method Detail |
---|
public abstract java.lang.String nextStringIdentifier()
StringIdentifierGenerator
nextStringIdentifier
in interface StringIdentifierGenerator
public long maxLength()
The default implementation returns StringIdentifierGenerator.INFINITE_MAX_LENGTH
. Implementations
with bounded length identifiers should override this method to
return the maximum length of a generated identifier.
maxLength
in interface StringIdentifierGenerator
StringIdentifierGenerator.INFINITE_MAX_LENGTH
if there is no upper boundpublic long minLength()
The default implementation returns 0. Implementations with identifiers having a postive minimum length should override this method to return the maximum length of a generated identifier.
minLength
in interface StringIdentifierGenerator
public java.lang.Object nextIdentifier()
IdentifierGenerator
nextIdentifier
in interface IdentifierGenerator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |