Package io.deephaven.base.string.cache
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
areEqual
(@NotNull CharSequence key, @NotNull String value) Compare key (Assumed to be a String *or* a StringCompatible) with value (created by this factory).final @NotNull String
create
(@NotNull StringCompatible protoString) Note: StringCache implementations may choose not hold a lock while invoking this method.final @NotNull String
Note: StringCache implementations may choose not hold a lock while invoking this method.final @NotNull String
empty()
getType()
-
Field Details
-
INSTANCE
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceStringCacheTypeAdapter<String>
- Returns:
- The Class of the STRING_LIKE_TYPE instances created by this adapter.
-
empty
- Specified by:
empty
in interfaceStringCacheTypeAdapter<String>
- Returns:
- The implementation-appropriate empty STRING_LIKE_TYPE instance.
-
create
Description copied from interface:StringCacheTypeAdapter
Note: StringCache implementations may choose not hold a lock while invoking this method.- Specified by:
create
in interfaceStringCacheTypeAdapter<String>
- Parameters:
string
- The input String- Returns:
- A newly allocated STRING_LIKE_TYPE with the same content as string.
-
create
Description copied from interface:StringCacheTypeAdapter
Note: StringCache implementations may choose not hold a lock while invoking this method.- Specified by:
create
in interfaceStringCacheTypeAdapter<String>
- Parameters:
protoString
- The input StringCompatible- Returns:
- A newly allocated STRING_LIKE_TYPE with the same content as protoString.
-
areEqual
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 interfaceStringCacheTypeAdapter<String>
- Parameters:
key
- The keyvalue
- The value- Returns:
- True iff key and value are equal (according to StringCompatible's implementation).
-