Interface IString
- All Known Implementing Classes:
EmptyString,LongString,ShortString
public interface IString
Interface for strings stored in the database. There is more than one string
format. This interface hides that fact.
- Author:
- Doug Schaefer
-
Method Summary
Modifier and TypeMethodDescriptionintcompare(char[] chars, boolean caseSensitive)Compare this IString record and the specified character arrayintCompare this IString record and the specified String objectintCompare this IString record and the specified IString recordintcompareCompatibleWithIgnoreCase(char[] chars)Compare this IString record and the specified char array in a case sensitive manner such that it is compatible with case insensitive comparison.intcompareCompatibleWithIgnoreCase(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.intcomparePrefix(char[] name, boolean caseSensitive)Compare this IString record and the specified character arrayvoiddelete()Free the associated record in the Ndchar[]getChars()Get an equivalent character array to this IString recordlongGet the offset of this IString record in the NdGet an equivalent String object to this IString recordintlength()
-
Method Details
-
getRecord
long getRecord()Get the offset of this IString record in the Nd -
compare
Compare this IString record and the specified IString record- Parameters:
string-caseSensitive- whether to compare in a case-sensitive way- Returns:
- -1 if this < string
- 0 if this == string
- 1 if this > string
- Throws:
IndexException
-
compare
Compare this IString record and the specified String object- Parameters:
string-caseSensitive- whether to compare in a case-sensitive way- Returns:
- -1 if this < string
- 0 if this == string
- 1 if this > string
- Throws:
IndexException
-
compare
Compare this IString record and the specified character array- Parameters:
chars-caseSensitive- whether to compare in a case-sensitive way- Returns:
- -1 if this < chars
- 0 if this == chars
- 1 if this > chars
- Throws:
IndexException
-
compareCompatibleWithIgnoreCase
Compare this IString record and the specified IString record in a case sensitive manner such that it is compatible with case insensitive comparison.- Parameters:
string-- Returns:
- -1 if this < string
- 0 if this == string
- 1 if this > string
- Throws:
IndexException
-
compareCompatibleWithIgnoreCase
Compare this IString record and the specified char array in a case sensitive manner such that it is compatible with case insensitive comparison.- Parameters:
chars-- Returns:
- -1 if this < string
- 0 if this == string
- 1 if this > string
- Throws:
IndexException
-
comparePrefix
Compare this IString record and the specified character array- Parameters:
name- the name to compare tocaseSensitive- whether to compare in a case-sensitive way- Returns:
- -1 if this < chars
- 0 if this has a prefix chars
- 1 if this > chars and does not have the prefix
- Throws:
IndexException
-
getChars
Get an equivalent character array to this IString recordN.B. This method can be expensive: compare and equals can be used for efficient comparisons
- Returns:
- an equivalent character array to this IString record
- Throws:
IndexException
-
getString
Get an equivalent String object to this IString recordN.B. This method can be expensive: compare and equals can be used for efficient comparisons
- Returns:
- an equivalent String object to this IString record
- Throws:
IndexException
-
delete
Free the associated record in the Nd- Throws:
IndexException
-
length
int length()- Returns:
- the length of the string
-