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