Collapse All Expand All

C#

Oracle® Coherence .NET API Reference
AbstractKeyBasedCache..::.Equals Method
AbstractKeyBasedCache Class See Also Send Feedback

Oracle® Coherence .NET API Reference Release 3.6
E15727-01
Compares the specified object with this cache for equality.

Namespace: Tangosol.Net.Cache.Support
Assembly: Coherence (in Coherence.dll) Version: 3.6.0.0 (3.6.0.0)

# Syntax

C#
    public override bool Equals(
    	Object o
    )

#### Parameters

o
  Type: System..::.Object
  Object to be compared for equality with this cache.

#### Return Value

true if the specified object is equal to this cache.

# Remarks

Returns true if the given object is also a cache and the two caches represent the same mappings. More formally, two caches

    t1

and

    t2

represent the same mappings if

    t1.Keys.Equals(t2.Keys)

and for every key

    k

in

    t1.Keys

,

     (t1[k]==null ? t2[k]==null :
                t1[k].Equals(t2[k])

. This ensures that the Equals method works properly across different implementations of the cache interface.

# See Also

AbstractKeyBasedCache Class
Tangosol.Net.Cache.Support Namespace