| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_BYTE_LENGTH |
| Constructor and Description |
|---|
ShortString(Database db,
char[] chars,
boolean useBytes) |
ShortString(Database db,
long offset) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(char[] other,
boolean caseSensitive)
Compare this IString record and the specified character array
|
static int |
compare(char[] chars,
char[] other,
boolean caseSensitive) |
int |
compare(IString string,
boolean caseSensitive)
Compare this IString record and the specified IString record
|
int |
compare(java.lang.String other,
boolean caseSensitive)
Compare this IString record and the specified String object
|
static int |
compareChars(char a,
char b,
boolean caseSensitive)
Compare characters case-sensitively, or case-insensitively.
|
int |
compareCompatibleWithIgnoreCase(char[] other)
Compare this IString record and the specified char array in a case sensitive manner
such that it is compatible with case insensitive comparison.
|
static int |
compareCompatibleWithIgnoreCase(char[] chars,
char[] other) |
int |
compareCompatibleWithIgnoreCase(IString string)
Compare this IString record and the specified IString record in a case sensitive manner
such that it is compatible with case insensitive comparison.
|
int |
comparePrefix(char[] other,
boolean caseSensitive)
Compare this IString record and the specified character array
|
static int |
comparePrefix(char[] chars,
char[] other,
boolean caseSensitive) |
void |
delete()
Free the associated record in the Nd
|
boolean |
equals(java.lang.Object obj) |
char[] |
getChars()
Get an equivalent character array to this IString record
|
long |
getRecord()
Get the offset of this IString record in the Nd
|
java.lang.String |
getString()
Get an equivalent String object to this IString record
|
int |
hashCode()
Compatible with
String.hashCode() |
int |
length() |
java.lang.String |
toString() |
public ShortString(Database db, long offset)
public ShortString(Database db, char[] chars, boolean useBytes) throws IndexException
IndexExceptionpublic long getRecord()
IStringpublic void delete()
throws IndexException
IStringdelete in interface IStringIndexExceptionpublic char[] getChars()
throws IndexException
IStringN.B. This method can be expensive: compare and equals can be used for efficient comparisons
getChars in interface IStringIndexExceptionpublic java.lang.String getString()
throws IndexException
IStringN.B. This method can be expensive: compare and equals can be used for efficient comparisons
getString in interface IStringIndexExceptionpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
String.hashCode()hashCode in class java.lang.Objectpublic static int compare(char[] chars,
char[] other,
boolean caseSensitive)
public int compare(char[] other,
boolean caseSensitive)
throws IndexException
IStringcompare in interface IStringcaseSensitive - whether to compare in a case-sensitive wayIndexExceptionpublic int compare(IString string, boolean caseSensitive) throws IndexException
IStringcompare in interface IStringcaseSensitive - whether to compare in a case-sensitive wayIndexExceptionpublic int compare(java.lang.String other,
boolean caseSensitive)
throws IndexException
IStringcompare in interface IStringcaseSensitive - whether to compare in a case-sensitive wayIndexExceptionpublic int compareCompatibleWithIgnoreCase(IString string) throws IndexException
IStringcompareCompatibleWithIgnoreCase in interface IStringIndexExceptionpublic int compareCompatibleWithIgnoreCase(char[] other)
throws IndexException
IStringcompareCompatibleWithIgnoreCase in interface IStringIndexExceptionpublic static int compareCompatibleWithIgnoreCase(char[] chars,
char[] other)
public int comparePrefix(char[] other,
boolean caseSensitive)
throws IndexException
IStringcomparePrefix in interface IStringother - the name to compare tocaseSensitive - whether to compare in a case-sensitive wayIndexExceptionpublic static int comparePrefix(char[] chars,
char[] other,
boolean caseSensitive)
public static int compareChars(char a,
char b,
boolean caseSensitive)
a - a characterb - a charactercaseSensitive - whether to compare case-sensitivelypublic java.lang.String toString()
toString in class java.lang.Object