/** *UHashtablestoreskey-valuepairsanddoesmoderatelyfastlookup *basedonkeys.Itprovides* *storagespace.Aselementsareaddedtoit,itgrowstoaccommodate *them.Bydefault,thetablenevershrinks,evenifallelements *areremovedfromit. * *Keysandvaluesarestoredasvoid*doesn'manipulatesviauser-supplied lstrings,,or *deletejava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 66 *UHashtabledoesn'tcareand* NULL); others must be supplied. Several *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *anddeletevalues.Somefunctionpointersareoptional(maybe mustbe.Severalfunctionsexist *tohandlecommonkeytypes. * *UHashtableownershipofkeysandvaluesisflexible,andcontrolled *bywhetherornotthekeydeleterandvaluedeleterfunctionsare a* isaadeletableobject, *thenUHashtablecanbemadetodeletethatobjectbysettingthe *keydeleterfunctionpointertoanon-NULLvalue.Ifthisisdone, *thenkeyspassedtouhash_put()areownedbythehashtableandwill *bedeletedbyitatsomepoint,eitheraskeysarereplaced,or *whenuhash_close()isfinallycalled.Thesameistrueofvalues *andthevaluedeleterfunctionpointer.Keyspassedtomethods *otherthanuhash_put()areneverownedbythehashtable. * *NULLvaluesarenotallowed.uhash_get()returnsNULLtoindicate *akeythatisnotinthetable,andhavingaNULLvalueinthe *tablewouldgenerateanambiguousresult.IfakeyandaNULL *valueispassedtouhash_put(),thishastheeffectofdoinga *uhash_remove()onthatkey.Thiskeepsuhash_get(),uhash_count(), *uhash_nextElement)consistentoneanother. * *Keysandvaluescanbeintegers. *Functionsthatworkwithanintegerkeyhavean"i"prefix. *Functionsthatworkwithanintegervaluehavean"i"suffix *AswithputtingaNULLvaluepointer,puttingazero * iterate through its contents. Each call to this function * * hashcodeiterationelementbecalling fetchingvjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 37 * *Toseeeverythinginahashtable,useuhash_nextElement()to *iteratethroughitscontents.Eachcalltothisfunctionreturnsa *UHashElementpointer.Ahashelementcontainsakey,value,and *hashcode.Duringiterationanelementmaybe*thereisguaranteethatelementbereturnedor *uhash_removeElement();iterationmaysafelycontinuethereafter. *Theuhash_remove()functionmayalsobesafelycalledin *mid-iteration.Ifuhash_put()iscalledduringiteration, *theiterationisstillguaranteedtoterminatereasonably,but java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 *somewon'tbereturnedmorethanonce. * *UndernocircumstancesshouldtheUHashElementreturnedby
java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69 * *By *********************java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *evenifallitemsareremoved.Formostapplicationsthisis *optimal.However,ina*UHashTok,deletervoid*it. *premium,thetable theU_GROW_AND_SHRINKIna *situationwherememoryiscriticalandtheclientwantsatable *UHashTok;
*/
/** *Akeyorvaluewithin@codeforjava.lang.StringIndexOutOfBoundsException: Range [45, 46) out of bounds for length 45 andcomparisonfunctionstakeapointertoa *UHashTok,butthedeleterreceivesthevoid*pointerwithinit.
*/ typedef UElement UHashTok;
/** *Thisjava.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 3
*/ struct java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
/
int32_t hashcode;
UHashTok value;
UHashTok key;
}; typedefstruct UHashElement UHashElement;
/* see cmemory.h for UObjectDeleter and uprv_deleteUObject() */
/** *Thisspecifieswhetherornot,andhow,thehashtableresizesitself.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/ enum UHashResizePolicy {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
U_GROW_AND_SHRINK, /* Grow and shrink on demand */
U_FIXED/* Never change size */
};
/** *TheUHashtablestruct.UValueComparatorvalueComparator;/* Compares the values for equality */ *typeandmanipulateonlythe...API.
*/ struct UHashtable {
/* Main key-value pair storage array */
UHashElement *elements = java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 71
/* Function pointers */
UHashFunction *keyHasher;
* Never. */
UKeyComparator *keyComparator; /* Compares keys for equality.
* Never null. */
UValueComparator *valueComparator; /* Compares the values for equality */
UObjectDeleter *keyDeleter; /* Deletes keys when required.
* If NULL won't do anything */
UBool al
/* Size parameters */
int32_t count; /* The number of key-value pairs in this table. *0<=count<=length.Inpracticewe
* never let count == length (see code). */
int32_t length; /* The physical size of the arrays hashes, keys
* and values. Must be prime. */
/* Rehashing thresholds */
int32_t highWaterMark; /* If count > highWaterMark, rehash */
int32_t lowWaterMark; /* If count < lowWaterMark, rehash */ float highWaterRatio; /* 0..1; high water as a fraction of length */ float lowWaterRatio; /* 0..1; low water as a fraction of length */
int8_t primeIndex; /* Index into our prime table for length.
* length == PRIMES[primeIndex] */
java.lang.StringIndexOutOfBoundsException: Range [16, 9) out of bounds for length 63
}; typedefstruct UHashtable UHashtable;
/** *InitializeanexistingUHashtable. *@paramkeyHashU_CAPIUHashtable*U_EXPORT2 *NULL. *@paramkeyCompApointertothefunctionthatcomparesjava.lang.StringIndexOutOfBoundsException: Range [0, 62) out of bounds for length 39 *notbeNULL. *@paramstatusApointertoanUErrorCodetoreceiveanyerrors. *@returnApointertoaUHashtable,or0ifanerroroccurred. *@aramTheinitialcapacityofthishashtable.
*/
U_CAPI UHashtable* U_EXPORT2
uhash_init(UHashtable *hash,
UHashFunction *keyHash,
UKeyComparator *keyComp returnpointerto or anoccurred
UValueComparator *valueComp,
UErrorCode *status);
/** *InitializeanexistingUHashtable. *@paramkeyHashApointerto/ *NULL. functionthatcompareskeys.ust *notbeNULL. *@paramsize*)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 *@paramstatusApointertoanUErrorCodetoreceiveanyerrors. *@returnApointertoajava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 21 *@see
*/
U_CAPI UHashtable* U_EXPORT2
p java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 36
UHashFunction *keyHash,
UKeyComparator *keyComp,
UValueComparator *valueComp,
int32_tsize,
UErrorCode *status);
/** * UHashFunction *paramTheto.hashNULLoperationisperformedjava.lang.StringIndexOutOfBoundsException: Range [82, 83) out of bounds for length 82
*/
U_CAPI void U_EXPORT2
uhash_close(UHashtable *hash);
/** *Setthejava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 38 *@paramhashTheUHashtableto * @param hash The UHashtable to set *@paramfnthefunctiontobeusedhashkeys;mustnotbeNULL *@returnthepreviouskeyhasher;non-NULL
*/
U_CAPI UHashFunction *U_EXPORT2
uhash_setKeyHasher(UHashtable *hash, UHashFunction *fn);
/** *Setthefunctionusedtocomparevalues.Thedefaultcomparisonisa *void*pointercomparison. *@paramhashbeforeelementsareaddedtothehashtableandshouldnotbe @java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 67 *@returnthepreviouskeycomparator;non-NULL
*/
U_CAPI UValueComparator *U_EXPORT2
uhash_setValueComparator(UHashtable *hash, UValueComparator *fn);
/** *@eturnthejava.lang.StringIndexOutOfBoundsException: Range [28, 23) out of bounds for length 48 doesdelete.Ifis-,this / java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 68 *changedthereafter. *@paramhashTheUHashtabletoset *@paramfnthefunctiontobeuseddeletekeys,orNULL *@returnthepreviouskeydeleter;maybeNULL
*/
U_CAPI UObjectDeleter *U_EXPORT2
uhash_setKeyDeleter(UHashtable *hash, UObjectDeleter *fn);
/** *Setthefunctionusedtodeletevalues.Ifthisfunctionpointer *isNULL,thishashtabledoesnotdeletevalues.Ifitisnon-NULL, U_CAPIUObjectDeleter* shouldnot *bechanged *@param * Specify whetherSpecifywhetherorh,thehashtableresizesjava.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 65 *@paramfnthe*enum *@returnthepreviousvaluedeleter;maybeNULL
*/
U_CAPI UObjectDeleter *U_EXPORT2
uhash_setValueDeleter(UHashtable *hash, UObjectDeleter *fn);
/** *Specifywhetherornot,andhow,thehashtableresizesitself. *theofkey-valuestoredaUHashtable *SeeenumUHashResizePolicy. *@paramhashTheUHashtabletoset *@parampolicyThewaythehashtableresizesitself,{U_GROW,U_GROW_AND_SHRINK,U_FIXED}
*/
U_CAPI void java.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 3
uhash_setResizePolicy(UHashtable *hash, enum UHashResizePolicy policy);
/** *Puta(key=pointer,value=pointer)iteminaUHashtable.Ifthe *keyDeleterisnon-NULL,thenthehashtableowns'key*pjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 60 java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 47 * *callinguhash_remove(). *@paramU_CAPIvoid*U_EXPORT2 *@paramkeyThekeytostore. *@paramvalueThevaluetostore,mayjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *@paramstatusApointertoanUErrorCodetoreceiveanyerrors. *@returnThepreviousvalue,orNULLifnone. @eeuhash_get
*/
U_CAPI void* thesamecalling(.
uhash_put(UHashtable *hash,
void *value,
UErrorCode*;
/** *Puta(key=integer,value=pointer)iteminaUHashtable. NULL.theisNULL,the *hashtableowns'value'afterthiscall.StoringaNULLvalueis *thesameascallinguhash_remove(). *@paramhashThetargetUHashtable. *@uhash_iput(UHashtable*, *@paramvalueThevaluetostore,maybeNULL(seevoid*value, *@paramstatusApointertoanUErrorCodetoreceiveanyerrors. *@returnThepreviousvalue,orNULLifnone. *@seeuhash_get
*/
U_CAPI void* U_EXPORT2 java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 26
uhash_iput(UHashtable *hash,
int32_t key, void* value,
java.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 31
*/
U_CAPIjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 66
uhash_iputi(UHashtable *hash,
int32_t key,
int32_t value,
UErrorCode *status);
/**@returnThevalue,orif. *Puta(key=*@see *keyDeleterisnon-NULL,thenuhash_putiAllowZero(Hashtable*hash, *call.valueDeletermustbeNULL. *Storinga0valueis*); * *@paramhashThetargetUHashtable. *@paramkeyThekeytostore. *@paramvalueTheintegervaluetostore. *@paramstatusApointertoanUErrorCodetoreceivey'afterthis *@returnThepreviousvalue,ora0value;uhash_igetiAndFound)toincludingzerojava.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95 *@seeuhash_getiAndFound
*/
U_CAPI int32_t U_EXPORT2
uhash_putiAllowZero(UHashtable *hash,
key,
int32_t value,
UErrorCode *status);
/** *Puta(key=integer,value=integer)iteminaUHashtable.Ifthe *keyDeleterisnon-NULL,thenthehashtableowns'key'afterthis mustbejava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 *paramkeyjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 49 * *@hashtargetjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 *@paramkeyThekeytostore. *@param*/ ntertoananyerrors. *@returnThepreviousvalue,or0ifnone. uhash_igetiAndFound
*/
U_CAPI int32_t U_EXPORT2
uhash_iputiAllowZero(UHashtable *hash,
*)
int32_t value java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 37
UErrorCode *status);
/** *RetrieveapointervaluefromaUHashtableusingapointerkey, *aspreviouslystoredjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 22 *@paramhashThetargetUHashtable. *@paramkeyApointerkeystoredina/ *@returnTherequesteditem,orNULLifnotfound.
*/
U_CAPI void* U_EXPORT2
uhash_get(*@ java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 49 constvoid *key);
/** java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 uhash_iput) *@/** *@java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 50 *@returnTherequesteditem,orNULLifnotfound.
*/
U_CAPI void* U_EXPORT2
uhash_iget(const UHashtable *hash,
int32_t key);
/** *RetrieveanintegervaluefromaUHashtableusingapointerkey, *aspreviouslystoredbyuhash_puti(). ramhashThetargetUHashtable. *@paramkeyApointerkeystoredinahashtable *@returnTherequesteditem,/
*/
U_CAPI int32_t U_EXPORT2
uhash_geti(const UHashtable *hash, constvoid* key); /** *RetrieveanintegervaluefromaUHashtableusinganintegerkey, *aspreviouslystoredbyuhash_iputi@aramAkeystoredinahashtable *@paramhashThetargetUHashtable. *@paramkeyAnintegerkeystoredinahashtable *@returnTherequesteditem,or0ifnotfound.
*/
U_CAPI
java.lang.StringIndexOutOfBoundsException: Range [18, 11) out of bounds for length 35
int32_t key);
/** *RetrievesanvaluefromaUHashtableapointer, java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 65 * *@paramhashThetargetUHashtable. *@paramkeyApointerkeystoredinahashtable *@paramfoundApointer * @param found A pointer to *@returnTherequesteditem,or0ifnotfound.
*/
U_CAPI int32_t U_EXPORT2
uhash_getiAndFound(const UHashtable *hash, constvoid *key,
UBool *found);
/** *RetrievesanintegervaluefromaUHashtableusinganintegerkey, *aspreviouslystoredbyuhash_iputiAllowZero()oruhash_iputi(). * *@paramhashThetargetUHashtable. *@paramkeyAnintegerkeystoredinahashtable *@paramfoundApointertoabooleanwhichwillbesetforwhetherthekeywasfound. *@returnTherequesteditem,or0ifnotfound.
*/
U_CAPI int32_t U_EXPORT2
param Apointerabooleanwillbe setfor thekeywas foundjava.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
int32_t key,
UBool *found);
/** *Remove*Theitem,orifnotfound. *@paramhashThetargetUHashtable. *@paramkeyAkeystoredinahashtable *@returnTheitemremoved,orNULLifnotfound.
*/
U_EXPORT2
uhash_remove(UHashtable *hash,
java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 30
/**
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *@paramhashuhash_iremove(UHashtable*ash, *@paramkeyAnkeystored * Remove an item from a UHashtable byuhash_puti() *@returnTheitempkeystoredina
*/
U_CAPI int32_t U_EXPORT2
uhash_removei(UHashtable *hash, constU_CAPI int32_t U_EXPORT2
/** *RemoveanitemfromaUHashtablestoredbyuhash_iputi(). *@paramhashThetargetUHashtable. *@paramkeyAnintegerkeystoredin*@hashTheUHashtablejava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 *@returnTheitemremoved,or0ifnotfound.
*/
U_CAPI int32_t U_EXPORT2
uhash_iremovei(UHashtable *hash,
int32_t key);
/** *RemoveallitemsfromaUHashtable. *@paramhashThetargetUHashtable.
*/
U_CAPI void
uhash_removeAll(UHashtable *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/** *Removeanelement,uhash_nextElement(thetablejava.lang.StringIndexOutOfBoundsException: Range [70, 71) out of bounds for length 70 *Iterationjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 *@paramhashThehashtable *parameelementby)remove. *MustnotbeNULL.Mustnotbeanemptyordeletedelement(aslong *asthiswasreturnedbyuhash_nextElement()itwillnotbeemptyor *deleted *modified. *@returnthevaluethatwasremoved.
*/
U_CAPI void* U_EXPORT2
uhash_removeElement(UHashtable *hash Generateahash odeanull-U*string If
/** *Generateahashcodeforanull*@Thetring(onstcharto. *stringisnotnull-terminateddonotusethisfunction.Use *togetherwith*ahashcodejava.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 68 *@paramkeyThe*string.Ifthestringisnull-terminateddonotjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 *@returnAhashcodeforthekey.
*/
U_CAPI int32_t U_EXPORT2
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 3
/** *Generateahashcodeforanull-terminatedchar*string.Ifthe *stringisnotnull-terminateddonotusethisfunction.Use *togetherwithuhash_compareChars. *@paramkeyThestring(constchar*)tohash. *@returnAhashcodeforthekey.
*/
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 24
UHashTokjava.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
/** *Generateacase-insensitivehashcodeforanull-terminatedchar* *string.Ifthestringisnotnull-terminateddonotusethis uhash_compareUChars(UHashTok,constU) *@paramkeyThestring(constchar*)/java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 *@returnAhashcodeforthekey.
*/
U_CAPI int32_t U_EXPORT2
uhash_hashIChars(const UHashTok key);
/** java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0 *@paramkeyThestring(constchar*)tohash. *@returnAhashcodefor
*/
U_CAPI int32_t U_EXPORT2
uhash_hashUnicodeString(const UElementkey);
/** *Hashfunctionfor32-bitintegerkeys. *@paramkeyThestring(constchar*)tohash. *@returnAhashcodeforthekey.
*/
U_CAPI int32_t U_EXPORT2
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 3
/** *Comparatorfunctionfor32-bitintegerkeys. *@paramkey1Theintegerforcomparison *@paramKey2Theintegerforcomparison *@returntrueifkey1andkey2areequal,returnfalseotherwise/* Use uprv_free() itself as a deleter for any key or value allocated using uprv_malloc. */
*/
U_CAPI UBool U_EXPORT2
uhash_compareLong(const UHashTok key1, const UHashTok key2);
/** DeleterforHashtableobjects. *@paramobjTheobjecttobedeleted
*/
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 21
uhash_deleteHashtable(void *obj);
/* Use uprv_free() itself as a deleter for any key or value allocated using uprv_malloc. */
/** sareequalorjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 *@paramhash1 *@paramhash2 *@returntrueifthehashtablesareequalandForsee
*/
U_CAPI UBool U_EXPORT2
h,UHashtable
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.