Package io.deephaven.base.string.cache
Class StringCacheTypeAdapterCompressedStringImpl
java.lang.Object
io.deephaven.base.string.cache.StringCacheTypeAdapterCompressedStringImpl
- All Implemented Interfaces:
StringCacheTypeAdapter<CompressedString>
public class StringCacheTypeAdapterCompressedStringImpl
extends Object
implements StringCacheTypeAdapter<CompressedString>
Type adapter for CompressedStrings.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanareEqual(@NotNull CharSequence key, @NotNull CompressedString value) Compare key (Assumed to be a String *or* a StringCompatible) with value (created by this factory).final @NotNull CompressedStringcreate(@NotNull StringCompatible protoString) Note: StringCache implementations may choose not hold a lock while invoking this method.final @NotNull CompressedStringNote: StringCache implementations may choose not hold a lock while invoking this method.final @NotNull CompressedStringempty()final @NotNull Class<CompressedString>getType()
-
Field Details
-
INSTANCE
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceStringCacheTypeAdapter<CompressedString>- Returns:
- The Class of the STRING_LIKE_TYPE instances created by this adapter.
-
empty
- Specified by:
emptyin interfaceStringCacheTypeAdapter<CompressedString>- Returns:
- The implementation-appropriate empty STRING_LIKE_TYPE instance.
-
create
Description copied from interface:StringCacheTypeAdapterNote: StringCache implementations may choose not hold a lock while invoking this method.- Specified by:
createin interfaceStringCacheTypeAdapter<CompressedString>- Parameters:
string- The input String- Returns:
- A newly allocated STRING_LIKE_TYPE with the same content as string.
-
create
@NotNull public final @NotNull CompressedString create(@NotNull @NotNull StringCompatible protoString) Description copied from interface:StringCacheTypeAdapterNote: StringCache implementations may choose not hold a lock while invoking this method.- Specified by:
createin interfaceStringCacheTypeAdapter<CompressedString>- 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 CompressedString value) Description copied from interface:StringCacheTypeAdapterCompare key (Assumed to be a String *or* a StringCompatible) with value (created by this factory).- Specified by:
areEqualin interfaceStringCacheTypeAdapter<CompressedString>- Parameters:
key- The keyvalue- The value- Returns:
- True iff key and value are equal (according to StringCompatible's implementation).
-