[#BloombergLP-ball-ManagedAttribute-hash]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/ManagedAttribute.adoc[ManagedAttribute]::hash
:relfileprefix: ../../../
:mrdocs:

Return a hash value calculated from the specified `attribute` using the specified `size` as the number of slots&period;

== Synopsis

Declared in `&lt;ball&lowbar;managedattribute&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
hash(
    xref:BloombergLP/ball/ManagedAttribute.adoc[ManagedAttribute] const& attribute,
    int size);
----

== Description

The hash value is guaranteed to be in the range `&lsqb;0 &period;&period; size &hyphen; 1&rsqb;`&period; The behavior is undefined unless `0 &lt; size`&period;

== Return Value

hash value in the range `&lsqb;0 &period;&period; size &hyphen; 1&rsqb;`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *attribute*
| attribute to hash
| *size*
| number of hash slots
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
