OptionalaccessWhen true, reading or writing a present key moves its mapping to the end, so the first
mapping is the least recently used. Default false: insertion order.
OptionalequivalenceDecides key equality by its equals and hash. valueEquivalence honours the
equalsSymbol/hashCodeSymbol protocol; sameValueZeroEquivalence is the default behaviour.
OptionalkeyDerives the primitive key a key is found by; two keys are the same key when their derived keys are SameValueZero-equal. Called once per key per operation, never again for a stored key.
OptionalmaxThe most mappings the map keeps: inserting a new key past it removes mappings from the front (never the one just inserted). A positive safe integer; no bound when omitted.
OptionalonCalled as onEvict(value, key, map), with this undefined, once per mapping removed by
maxSize, in eviction order, after the call that evicted it has finished its changes.
Options for a
LinkedHashMap. At most one ofkeyandequivalencemay be given; with neither, keys compare with SameValueZero, as in nativeMap. WithaccessOrder: trueand amaxSize, the map is a least-recently-used cache.Example