public class StringDataType extends BasicDataType<String>
| 限定符和类型 | 字段和说明 |
|---|---|
static StringDataType |
INSTANCE |
| 构造器和说明 |
|---|
StringDataType() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
binarySearch(String key,
Object storageObj,
int size,
int initialGuess)
Perform binary search for the key within the storage
|
int |
compare(String a,
String b)
Compare two keys.
|
String[] |
createStorage(int size)
Create storage object of array type to hold values
|
int |
getMemory(String obj)
Calculates the amount of used memory in bytes.
|
String |
read(ByteBuffer buff)
Read an object.
|
void |
write(WriteBuffer buff,
String s)
Write an object.
|
cast, equals, hashCode, isMemoryEstimationAllowed, read, writepublic static final StringDataType INSTANCE
public String[] createStorage(int size)
DataTypesize - number of values to holdpublic int compare(String a, String b)
DataTypecompare 在接口中 Comparator<String>compare 在接口中 DataType<String>compare 在类中 BasicDataType<String>a - the first keyb - the second keypublic int binarySearch(String key, Object storageObj, int size, int initialGuess)
DataTypebinarySearch 在接口中 DataType<String>binarySearch 在类中 BasicDataType<String>key - to search forstorageObj - to search within (an array of type T)size - number of data items in the storageinitialGuess - for key positionpublic int getMemory(String obj)
DataTypepublic String read(ByteBuffer buff)
DataTypepublic void write(WriteBuffer buff, String s)
DataTypeCopyright © 2022. All rights reserved.