Class StringCacheTypeAdapterStringImpl

java.lang.Object
io.deephaven.base.string.cache.StringCacheTypeAdapterStringImpl
All Implemented Interfaces:
StringCacheTypeAdapter<String>

public class StringCacheTypeAdapterStringImpl extends Object implements StringCacheTypeAdapter<String>
Type adapter for Strings.
  • Field Details

  • Method Details

    • getType

      @NotNull public final @NotNull Class<String> getType()
      Specified by:
      getType in interface StringCacheTypeAdapter<String>
      Returns:
      The Class of the STRING_LIKE_TYPE instances created by this adapter.
    • empty

      @NotNull public final @NotNull String empty()
      Specified by:
      empty in interface StringCacheTypeAdapter<String>
      Returns:
      The implementation-appropriate empty STRING_LIKE_TYPE instance.
    • create

      @NotNull public final @NotNull String create(@NotNull @NotNull String string)
      Description copied from interface: StringCacheTypeAdapter
      Note: StringCache implementations may choose not hold a lock while invoking this method.
      Specified by:
      create in interface StringCacheTypeAdapter<String>
      Parameters:
      string - The input String
      Returns:
      A newly allocated STRING_LIKE_TYPE with the same content as string.
    • create

      @NotNull public final @NotNull String create(@NotNull @NotNull StringCompatible protoString)
      Description copied from interface: StringCacheTypeAdapter
      Note: StringCache implementations may choose not hold a lock while invoking this method.
      Specified by:
      create in interface StringCacheTypeAdapter<String>
      Parameters:
      protoString - The input StringCompatible
      Returns:
      A newly allocated STRING_LIKE_TYPE with the same content as protoString.
    • areEqual

      public final boolean areEqual(@NotNull @NotNull CharSequence key, @NotNull @NotNull String value)
      Description copied from interface: StringCacheTypeAdapter
      Compare key (Assumed to be a String *or* a StringCompatible) with value (created by this factory).
      Specified by:
      areEqual in interface StringCacheTypeAdapter<String>
      Parameters:
      key - The key
      value - The value
      Returns:
      True iff key and value are equal (according to StringCompatible's implementation).