Class StringValue

  • All Implemented Interfaces:
    CacheValue

    public final class StringValue
    extends Object
    implements CacheValue
    A cache value wrapping a simple string.
    • Constructor Detail

      • StringValue

        public StringValue​(@NotNull
                           @NotNull String value)
    • Method Detail

      • getMemory

        public int getMemory()
        Description copied from interface: CacheValue
        The estimated amount of memory used by this object, in bytes.
        Specified by:
        getMemory in interface CacheValue
        Returns:
        the estimated number of bytes
      • getMemory

        public static int getMemory​(@NotNull
                                    @NotNull String s)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • asString

        public String asString()