public class XFactory extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
XFactory.Provider |
Constructor and Description |
---|
XFactory() |
Modifier and Type | Method and Description |
---|---|
static <T extends XString> |
createXPooledStringFactory(Class<T> pooledStringClass,
String factoryName,
Map<String,Object> props)
Creates a factory for a poolable string type.
|
static XString |
createXString(int expectedSize)
Preallocates an uninitialized
XString with a backing buffer of
the expectedSize. |
static XString |
createXString(int expectedSize,
boolean mutable)
Preallocates an uninitialized
XString with the given backing buffer size. |
static XString |
createXString(int expectedSize,
boolean mutable,
boolean isNative)
Preallocates an uninitialized
XString with the given backing buffer size. |
static XString |
createXString(String value)
Creates an immutable
XString from the given String
value. |
static XString |
createXString(String value,
boolean isNative)
Creates an immutable
XString from the given String
value. |
public static final XString createXString(int expectedSize)
XString
with a backing buffer of
the expectedSize. Once the XString
is initialized it will become
immutable.expectedSize
- The expected string size.XString
public static final XString createXString(int expectedSize, boolean mutable)
XString
with the given backing buffer size.expectedSize
- The expected string size.mutable
- If the XString should remain mutable after initialization.XString
public static final XString createXString(int expectedSize, boolean mutable, boolean isNative)
XString
with the given backing buffer size.expectedSize
- The expected string size.mutable
- If the XString should remain mutable after initialization.isNative
- If the XString should be backed by a native buffer.XString
public static final XString createXString(String value)
XString
from the given String
value.public static final XString createXString(String value, boolean isNative)
XString
from the given String
value.public static final <T extends XString> XString.Factory<T> createXPooledStringFactory(Class<T> pooledStringClass, String factoryName, Map<String,Object> props) throws RuntimeException
pooledStringClass
- The pooled String class.factoryName
- The factory name which must be unique within the jvm.props
- The factory properties to use.RuntimeException
Copyright © 2019 Neeve Research, LLC. All Rights Reserved.