Class LongString
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.db.LongString
- All Implemented Interfaces:
IString
This is for strings that take up more than on chunk.
The string will need to be broken up into sections and then
reassembled when necessary.
- Author:
- Doug Schaefer
-
Constructor Summary
ConstructorsConstructorDescriptionLongString(Database db, char[] chars, boolean useBytes)LongString(Database db, long record) -
Method Summary
Modifier and TypeMethodDescriptionintcompare(char[] other, 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[] other)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[] other, boolean caseSensitive)Compare this IString record and the specified character arrayvoiddelete()Free the associated record in the Ndbooleanchar[]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 recordinthashCode()Compatible withString.hashCode()intlength()
-
Constructor Details
-
LongString
-
LongString
- Throws:
IndexException
-
-
Method Details
-
getRecord
public long getRecord()Description copied from interface:IStringGet the offset of this IString record in the Nd -
getChars
Description copied from interface:IStringGet an equivalent character array to this IString recordN.B. This method can be expensive: compare and equals can be used for efficient comparisons
- Specified by:
getCharsin interfaceIString- Returns:
- an equivalent character array to this IString record
- Throws:
IndexException
-
delete
Description copied from interface:IStringFree the associated record in the Nd- Specified by:
deletein interfaceIString- Throws:
IndexException
-
equals
-
hashCode
public int hashCode()Compatible withString.hashCode() -
compare
Description copied from interface:IStringCompare this IString record and the specified IString record- Specified by:
comparein interfaceIStringcaseSensitive- whether to compare in a case-sensitive way- Returns:
- -1 if this < string
- 0 if this == string
- 1 if this > string
- Throws:
IndexException
-
compare
Description copied from interface:IStringCompare this IString record and the specified String object- Specified by:
comparein interfaceIStringcaseSensitive- whether to compare in a case-sensitive way- Returns:
- -1 if this < string
- 0 if this == string
- 1 if this > string
- Throws:
IndexException
-
compare
Description copied from interface:IStringCompare this IString record and the specified character array- Specified by:
comparein interfaceIStringcaseSensitive- whether to compare in a case-sensitive way- Returns:
- -1 if this < chars
- 0 if this == chars
- 1 if this > chars
- Throws:
IndexException
-
compareCompatibleWithIgnoreCase
Description copied from interface:IStringCompare this IString record and the specified IString record in a case sensitive manner such that it is compatible with case insensitive comparison.- Specified by:
compareCompatibleWithIgnoreCasein interfaceIString- Returns:
- -1 if this < string
- 0 if this == string
- 1 if this > string
- Throws:
IndexException
-
comparePrefix
Description copied from interface:IStringCompare this IString record and the specified character array- Specified by:
comparePrefixin interfaceIString- Parameters:
other- 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
-
getString
Description copied from interface:IStringGet an equivalent String object to this IString recordN.B. This method can be expensive: compare and equals can be used for efficient comparisons
- Specified by:
getStringin interfaceIString- Returns:
- an equivalent String object to this IString record
- Throws:
IndexException
-
compareCompatibleWithIgnoreCase
Description copied from interface:IStringCompare this IString record and the specified char array in a case sensitive manner such that it is compatible with case insensitive comparison.- Specified by:
compareCompatibleWithIgnoreCasein interfaceIString- Returns:
- -1 if this < string
- 0 if this == string
- 1 if this > string
- Throws:
IndexException
-
length
public int length()
-