namespace sap.ui.vtm.HashUtilities

Control sample: sap.ui.vtm.HashUtilities
Visiblity: public
Available since: N/A
Module: sap/ui/vtm/HashUtilities
Application Component:

A set of utility functions for working with hash values.


Nodes Overview

Node Description

Methods Overview

Method Description
sap.ui.vtm.HashUtilities.combineHashes

Creates a single hash code from a set of hash code values and normalizes it using sap.ui.vtm.HashUtilities.normalizeHash.

sap.ui.vtm.HashUtilities.hashMatrix

Creates a hash code for a sap.ui.vtm.Matrix value.

The resulting hash value can be any integer value. Use sap.ui.vtm.HashUtilities.normalizeHash on the result to create a hash code that is useful as a key in a sap.ui.vtm.Lookup.

sap.ui.vtm.HashUtilities.hashString

Creates a hash code for a string.

The resulting hash value can be any integer value. Use sap.ui.vtm.HashUtilities.normalizeHash on the result to create a hash code that is useful as a key in a sap.ui.vtm.Lookup.

sap.ui.vtm.HashUtilities.normalizeHash

Normalizes a hash code to a range between 0 and an upper bound. Useful for creating a hash code that can be used as a key in a sap.ui.vtm.Lookup (to limit the number of buckets in the lookup).

sap.ui.vtm.HashUtilities.combineHashes

Creates a single hash code from a set of hash code values and normalizes it using sap.ui.vtm.HashUtilities.normalizeHash.

Param Type DefaultValue Description
hashValues int[]

A set of hash code values to combine.

upperLimit int

An upper bound for the hash code. Defaults to 50000.

sap.ui.vtm.HashUtilities.hashMatrix

Creates a hash code for a sap.ui.vtm.Matrix value.

The resulting hash value can be any integer value. Use sap.ui.vtm.HashUtilities.normalizeHash on the result to create a hash code that is useful as a key in a sap.ui.vtm.Lookup.

Param Type DefaultValue Description
vtmMatrix sap.ui.vtm.Matrix

The matrix to hash.

sap.ui.vtm.HashUtilities.hashString

Creates a hash code for a string.

The resulting hash value can be any integer value. Use sap.ui.vtm.HashUtilities.normalizeHash on the result to create a hash code that is useful as a key in a sap.ui.vtm.Lookup.

Param Type DefaultValue Description
stringToHash string

The string to hash.

sap.ui.vtm.HashUtilities.normalizeHash

Normalizes a hash code to a range between 0 and an upper bound. Useful for creating a hash code that can be used as a key in a sap.ui.vtm.Lookup (to limit the number of buckets in the lookup).

Param Type DefaultValue Description
hashValue int

A hash code to normalize.

upperLimit int

An upper bound for the hash code value. Defaults to 50000.