java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.db.EmptyString
All Implemented Interfaces:
IString

public class EmptyString extends Object implements IString
Represents an empty string.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compare​(char[] chars, boolean caseSensitive)
    Compare this IString record and the specified character array
    int
    compare​(String string, boolean caseSensitive)
    Compare this IString record and the specified String object
    int
    compare​(IString string, boolean caseSensitive)
    Compare this IString record and the specified IString record
    int
    Compare this IString record and the specified char array in a case sensitive manner such that it is compatible with case insensitive comparison.
    int
    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[] name, boolean caseSensitive)
    Compare this IString record and the specified character array
     
    void
    Free the associated record in the Nd
    char[]
    Get an equivalent character array to this IString record
    long
    Get the offset of this IString record in the Nd
    Get an equivalent String object to this IString record
    int
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • create

      public static EmptyString create()
    • getRecord

      public long getRecord()
      Description copied from interface: IString
      Get the offset of this IString record in the Nd
      Specified by:
      getRecord in interface IString
    • compare

      public int compare(IString string, boolean caseSensitive)
      Description copied from interface: IString
      Compare this IString record and the specified IString record
      Specified by:
      compare in interface IString
      caseSensitive - whether to compare in a case-sensitive way
      Returns:
      • -1 if this < string
      • 0 if this == string
      • 1 if this > string
    • compare

      public int compare(String string, boolean caseSensitive)
      Description copied from interface: IString
      Compare this IString record and the specified String object
      Specified by:
      compare in interface IString
      caseSensitive - whether to compare in a case-sensitive way
      Returns:
      • -1 if this < string
      • 0 if this == string
      • 1 if this > string
    • compare

      public int compare(char[] chars, boolean caseSensitive)
      Description copied from interface: IString
      Compare this IString record and the specified character array
      Specified by:
      compare in interface IString
      caseSensitive - whether to compare in a case-sensitive way
      Returns:
      • -1 if this < chars
      • 0 if this == chars
      • 1 if this > chars
    • compareCompatibleWithIgnoreCase

      public int compareCompatibleWithIgnoreCase(IString string)
      Description copied from interface: IString
      Compare this IString record and the specified IString record in a case sensitive manner such that it is compatible with case insensitive comparison.
      Specified by:
      compareCompatibleWithIgnoreCase in interface IString
      Returns:
      • -1 if this < string
      • 0 if this == string
      • 1 if this > string
    • compareCompatibleWithIgnoreCase

      public int compareCompatibleWithIgnoreCase(char[] chars)
      Description copied from interface: IString
      Compare this IString record and the specified char array in a case sensitive manner such that it is compatible with case insensitive comparison.
      Specified by:
      compareCompatibleWithIgnoreCase in interface IString
      Returns:
      • -1 if this < string
      • 0 if this == string
      • 1 if this > string
    • comparePrefix

      public int comparePrefix(char[] name, boolean caseSensitive)
      Description copied from interface: IString
      Compare this IString record and the specified character array
      Specified by:
      comparePrefix in interface IString
      Parameters:
      name - the name to compare to
      caseSensitive - 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
    • getChars

      public char[] getChars()
      Description copied from interface: IString
      Get an equivalent character array to this IString record

      N.B. This method can be expensive: compare and equals can be used for efficient comparisons

      Specified by:
      getChars in interface IString
      Returns:
      an equivalent character array to this IString record
    • getString

      public String getString()
      Description copied from interface: IString
      Get an equivalent String object to this IString record

      N.B. This method can be expensive: compare and equals can be used for efficient comparisons

      Specified by:
      getString in interface IString
      Returns:
      an equivalent String object to this IString record
    • delete

      public void delete()
      Description copied from interface: IString
      Free the associated record in the Nd
      Specified by:
      delete in interface IString
    • length

      public int length()
      Specified by:
      length in interface IString
      Returns:
      the length of the string