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 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