VMware Tanzu GemFire Native .NET Reference 10.3.0
Apache::Geode::Objects Class Reference

Provides hash code functions similar to those used by Geode server in Java's java.util.Objects and java.util.Arrays classes. More...

#include <Objects.hpp>

Static Public Member Functions

static Int32 GetHashCode (Boolean value)
 Hashes consistent with java.lang.Boolean.hashCode(). More...
 
static Int32 GetHashCode (Char value)
 Hashes consistent with java.lang.Character.hashCode(). More...
 
static Int32 GetHashCode (DateTime value)
 Hashes consistent with java.lang.Date.hashCode(). More...
 
static Int32 GetHashCode (DateTime^ value)
 Hashes consistent with java.util.Date.hashCode(). More...
 
static Int32 GetHashCode (Double value)
 Hashes consistent with java.lang.Double.hashCode(). More...
 
static Int32 GetHashCode (Int16 value)
 Hashes consistent with java.lang.Short.hashCode(). More...
 
static Int32 GetHashCode (Int32 value)
 Hashes consistent with java.lang.Integer.hashCode(). More...
 
static Int32 GetHashCode (Int64 value)
 Hashes consistent with java.lang.Long.hashCode(). More...
 
static Int32 GetHashCode (Object^ value)
 Hashes consistent with java.util.Objects.hashCode(Object). More...
 
static Int32 GetHashCode (SByte value)
 Hashes consistent with java.lang.Byte.hashCode(). More...
 
static Int32 GetHashCode (Single value)
 Hashes consistent with java.lang.Float.hashCode(). More...
 
static Int32 GetHashCode (String^ value)
 Hashes consistent with java.lang.String.hashCode(). More...
 
static Int32 GetHashCode (System::Collections::ICollection^ collection)
 Hashes consistent with java.util.Arrays.hashCode(Object[]) or java.util.List.hashCode(). More...
 
static Int32 GetHashCode (System::Collections::IDictionary^ dictionary)
 Hashes consistent with java.util.Map.hashCode(). More...
 
static Int32 Hash (... array< Object^>^ values)
 Hashes consistent with java.util.Objects.hash(Object ...). More...
 

Detailed Description

Provides hash code functions similar to those used by Geode server in Java's java.util.Objects and java.util.Arrays classes.

Example:

class CustomKey
{
  private int a;
  private double b;
  private String c;

  public CustomKey(int a, double b, String c)
  {
    this.a = a;
    this.b = b;
    this.c = c;
  }

  override public int GetHashCode()
  {
    return Objects.Hash(a, b, c);
  }
};

Member Function Documentation

◆ GetHashCode() [1/14]

static Int32 Apache::Geode::Objects::GetHashCode ( Boolean  value)
static

Hashes consistent with java.lang.Boolean.hashCode().

Parameters
valueBoolean to hash.

◆ GetHashCode() [2/14]

static Int32 Apache::Geode::Objects::GetHashCode ( Char  value)
static

Hashes consistent with java.lang.Character.hashCode().

Parameters
valueCharacter to hash.

◆ GetHashCode() [3/14]

static Int32 Apache::Geode::Objects::GetHashCode ( DateTime  value)
static

Hashes consistent with java.lang.Date.hashCode().

Parameters
valueDate to hash.

◆ GetHashCode() [4/14]

static Int32 Apache::Geode::Objects::GetHashCode ( DateTime^  value)
static

Hashes consistent with java.util.Date.hashCode().

Parameters
valueDate to hash.

◆ GetHashCode() [5/14]

static Int32 Apache::Geode::Objects::GetHashCode ( Double  value)
static

Hashes consistent with java.lang.Double.hashCode().

Parameters
valueDouble to hash.

◆ GetHashCode() [6/14]

static Int32 Apache::Geode::Objects::GetHashCode ( Int16  value)
static

Hashes consistent with java.lang.Short.hashCode().

Parameters
valueShort to hash.

◆ GetHashCode() [7/14]

static Int32 Apache::Geode::Objects::GetHashCode ( Int32  value)
static

Hashes consistent with java.lang.Integer.hashCode().

Parameters
valueInteger to hash.

◆ GetHashCode() [8/14]

static Int32 Apache::Geode::Objects::GetHashCode ( Int64  value)
static

Hashes consistent with java.lang.Long.hashCode().

Parameters
valueLong to hash.

◆ GetHashCode() [9/14]

static Int32 Apache::Geode::Objects::GetHashCode ( Object^  value)
static

Hashes consistent with java.util.Objects.hashCode(Object).

Parameters
valueObject to hash.

◆ GetHashCode() [10/14]

static Int32 Apache::Geode::Objects::GetHashCode ( SByte  value)
static

Hashes consistent with java.lang.Byte.hashCode().

Parameters
valueByte to hash.

◆ GetHashCode() [11/14]

static Int32 Apache::Geode::Objects::GetHashCode ( Single  value)
static

Hashes consistent with java.lang.Float.hashCode().

Parameters
valueFLoat to hash.

◆ GetHashCode() [12/14]

static Int32 Apache::Geode::Objects::GetHashCode ( String^  value)
static

Hashes consistent with java.lang.String.hashCode().

Parameters
valueString to hash.

◆ GetHashCode() [13/14]

static Int32 Apache::Geode::Objects::GetHashCode ( System::Collections::ICollection^  collection)
static

Hashes consistent with java.util.Arrays.hashCode(Object[]) or java.util.List.hashCode().

Parameters
valueArray or List like collection to hash.

◆ GetHashCode() [14/14]

static Int32 Apache::Geode::Objects::GetHashCode ( System::Collections::IDictionary^  dictionary)
static

Hashes consistent with java.util.Map.hashCode().

Parameters
dictionaryMap to hash.

◆ Hash()

static Int32 Apache::Geode::Objects::Hash ( ... array< Object^>^  values)
static

Hashes consistent with java.util.Objects.hash(Object ...).

Parameters
valuesVariable arguments to combine into hash.

Apache Geode C++ Cache .NET API Documentation