Class NullValue

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

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

      Fields 
      Modifier and Type Field Description
      static NullValue NULL  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.Object get()
      Always returns null.
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

    • Method Detail

      • get

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

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

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