Class Options

  • All Implemented Interfaces:
    Key

    public final class Options
    extends java.lang.Object
    implements Key
    A set of Options to apply to in memory and disk cache keys.
    • Constructor Summary

      Constructors 
      Constructor Description
      Options()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      For caching to work correctly, implementations must implement this method and Key.hashCode().
      <T> T get​(Option<T> option)  
      int hashCode()
      For caching to work correctly, implementations must implement this method and Key.equals(Object).
      void putAll​(Options other)  
      <T> Options set​(Option<T> option, T value)  
      java.lang.String toString()  
      void updateDiskCacheKey​(java.security.MessageDigest messageDigest)
      Adds all uniquely identifying information to the given digest.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Options

        public Options()
    • Method Detail

      • putAll

        public void putAll​(@NonNull
                           Options other)
      • set

        @NonNull
        public <T> Options set​(@NonNull
                               Option<T> option,
                               @NonNull
                               T value)
      • get

        @Nullable
        public <T> T get​(@NonNull
                         Option<T> option)
      • equals

        public boolean equals​(java.lang.Object o)
        Description copied from interface: Key
        For caching to work correctly, implementations must implement this method and Key.hashCode().
        Specified by:
        equals in interface Key
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Description copied from interface: Key
        For caching to work correctly, implementations must implement this method and Key.equals(Object).
        Specified by:
        hashCode in interface Key
        Overrides:
        hashCode in class java.lang.Object
      • updateDiskCacheKey

        public void updateDiskCacheKey​(@NonNull
                                       java.security.MessageDigest messageDigest)
        Description copied from interface: Key
        Adds all uniquely identifying information to the given digest.

        Note - Using MessageDigest.reset() inside of this method will result in undefined behavior.

        Specified by:
        updateDiskCacheKey in interface Key
      • toString

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