Enum Class LocalCache.Strength

java.lang.Object
java.lang.Enum<LocalCache.Strength>
com.google.common.cache.LocalCache.Strength
All Implemented Interfaces:
Serializable, Comparable<LocalCache.Strength>, Constable
Enclosing class:
LocalCache<K,V>

static enum LocalCache.Strength extends Enum<LocalCache.Strength>
  • Enum Constant Details

  • Constructor Details

    • Strength

      private Strength()
  • Method Details

    • values

      public static LocalCache.Strength[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static LocalCache.Strength valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • referenceValue

      abstract <K, V> LocalCache.ValueReference<K,V> referenceValue(LocalCache.Segment<K,V> segment, ReferenceEntry<K,V> entry, V value, int weight)
      Creates a reference for the given value according to this value strength.
    • defaultEquivalence

      abstract Equivalence<Object> defaultEquivalence()
      Returns the default equivalence strategy used to compare and hash keys or values referenced at this strength. This strategy will be used unless the user explicitly specifies an alternate strategy.