Class NullValue

  • All Implemented Interfaces:
    Serializable, org.springframework.cache.Cache.ValueWrapper

    public final class NullValue
    extends Object
    implements org.springframework.cache.Cache.ValueWrapper, Serializable
    A placeholder value for storing null in a cache.
    Since:
    5.3
    Author:
    Olaf Bergner
    See Also:
    Serialized Form
    • Field Detail

    • Method Detail

      • get

        public Object get()
        Always returns null.
        Specified by:
        get in interface org.springframework.cache.Cache.ValueWrapper
        Returns:
        null
        See Also:
        Cache.ValueWrapper.get()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object