|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.neeve.lang.XFactory
public class XFactory
A factory for the X Platform's garbage optimized data structures.
| Nested Class Summary | |
|---|---|
static interface |
XFactory.Provider
|
| Constructor Summary | |
|---|---|
XFactory()
|
|
| Method Summary | ||
|---|---|---|
static
|
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. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XFactory()
| Method Detail |
|---|
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.
XStringpublic static final XString createXString(String value)
XString from the given String
value.
value - The value of the XString
XString
public static final XString createXString(String value,
boolean isNative)
XString from the given String
value.
value - The value of the XStringisNative - If a native (direct) buffer should be used.
XString
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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||