|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- The type of the concrete XString or subclasspublic static interface XString.Factory<T extends XString>
A factory interface for creating new concrete instances of an XString
Field Summary | |
---|---|
static String |
PROP_INITIAL_LENGTH
Property name used to control the initial length (in UTF-8 encoded bytes) of strings created by a factory. |
static String |
PROP_NATIVE
Property name used to control whether or not strings created by a factory are backed by native buffers. |
static String |
PROP_POOL_PREALLOCATE_COUNT
Property indicating whether or not the pool backing the factory should preallocate XStrings to avoid object promotion at runtime. |
static String |
PROP_POOL_THREADED
Property indicating whether or not the pool backing the factory is a thread safe. |
static String |
PROP_POOLED
Property indicating whether or not the factory is backed by a pool. |
Method Summary | |
---|---|
T |
create()
Returns an empty, mutable XString possibly from a backing pool. |
T |
create(boolean mutable)
Returns an empty XString possibly from a backing pool. |
T |
create(String value)
Creates an immutable XString , possibly from a backing pool, from the given
String value. |
T |
create(String initialValue,
boolean mutable)
Creates an XString possibly from a backing pool. |
T |
create(XString initialValue,
boolean mutable)
Creates an XString possibly from a backing pool. |
T[] |
createArray(int size)
|
Field Detail |
---|
static final String PROP_INITIAL_LENGTH
Specifying a value of 0 will cause no backing buffer for the XString to be preallocated which can be useful for preventing object promotions at runtime.
If the XString is later initialized to a value large than the specified initial length a new backing buffer will be allocated to accommodate the larger size.
static final String PROP_NATIVE
static final String PROP_POOLED
This Property applies to XString.Factory
s for XString
subclasses that support pooling.
static final String PROP_POOL_THREADED
This Property applies to XString.Factory
s for XString
subclasses that support pooling or preallocation.
static final String PROP_POOL_PREALLOCATE_COUNT
This Property only applies to XString.Factory
s for XString
subclasses that support preallocation
Method Detail |
---|
T create()
XString
possibly from a backing pool. When the
the user is done with the XString
, dispose() should be called if the
the XString is a poolable type, to return the object to the pool.
XString
.T[] createArray(int size)
size
- the size of the array to create
T create(boolean mutable)
XString
possibly from a backing pool. When the
the user is done with the XString
, dispose() should be called if the
the XString is a poolable type, to return the object to the pool.
mutable
- Whether or not the XString
supports mutation (after
it is first set)
XString
.T create(String value)
XString
, possibly from a backing pool, from the given
String value. When the the user is done with the XString
, dispose() should
be called if the the XString is a poolable type, to return the object to the pool.
value
- The string value to assign to the XString
.
XString
T create(String initialValue, boolean mutable)
XString
possibly from a backing pool. When the
the user is done with the XString
, dispose() should be called if the
the XString is a poolable type, to return the object to the pool.
initialValue
- The string value to assign to the XString
.mutable
- Whether or not the XString
supports mutation.
XString
T create(XString initialValue, boolean mutable)
XString
possibly from a backing pool. When the
the user is done with the XString
, dispose() should be called
if the the XString is a poolable type, to return the object to the pool.
initialValue
- The string value to assign to the XString
.mutable
- Whether or not the XString
supports mutation.
XString
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |