Class StringValue

  • All Implemented Interfaces:
    CacheValue

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

      Constructors 
      Constructor Description
      StringValue​(@NotNull java.lang.String value)  
    • Constructor Detail

      • StringValue

        public StringValue​(@NotNull
                           @NotNull java.lang.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 java.lang.String s)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • asString

        public java.lang.String asString()
      • fromString

        public static StringValue fromString​(java.lang.String value)