diff --git a/api/@ohos.util.static.d.ets b/api/@ohos.util.static.d.ets index cd08bf9840a9a0d7725b87ae07ad603efb41b7a4..ddfbe99dd1b32200af77a7a35c6dbcf3626f0d6b 100644 --- a/api/@ohos.util.static.d.ets +++ b/api/@ohos.util.static.d.ets @@ -402,22 +402,22 @@ declare namespace util { /** * Default constructor used to create a new LruBuffer instance with the default capacity of 64. * - * @param { number } [capacity] - Indicates the capacity to customize for the buffer. + * @param { int } [capacity] - Indicates the capacity to customize for the buffer. * @syscap SystemCapability.Utils.Lang * @since 20 * @arkts 1.2 */ - constructor(capacity?: number); + constructor(capacity?: int); /** * Updates the buffer capacity to a specified capacity. * - * @param { number } newCapacity - Indicates the new capacity to set. + * @param { int } newCapacity - Indicates the new capacity to set. * @syscap SystemCapability.Utils.Lang * @since 20 * @arkts 1.2 */ - updateCapacity(newCapacity: number): void; + updateCapacity(newCapacity: int): void; /** * Returns a string representation of the object. @@ -433,22 +433,22 @@ declare namespace util { /** * Obtains a list of all values in the current buffer. * - * @returns { number } The length of LRUCache + * @returns { int } The length of LRUCache * @syscap SystemCapability.Utils.Lang * @since 20 * @arkts 1.2 */ - get length(): number; + get length(): int; /** * Obtains the capacity of the current buffer. * - * @returns { number } Returns the capacity of the current buffer. + * @returns { int } Returns the capacity of the current buffer. * @syscap SystemCapability.Utils.Lang * @since 20 * @arkts 1.2 */ - getCapacity(): number; + getCapacity(): int; /** * Clears key-value pairs from the current buffer. @@ -462,52 +462,52 @@ declare namespace util { /** * Obtains the number of times createDefault(Object) returned a value. * - * @returns { number } Returns the number of times createDefault(java.lang.Object) returned a value. + * @returns { long } Returns the number of times createDefault(java.lang.Object) returned a value. * @syscap SystemCapability.Utils.Lang * @since 20 * @arkts 1.2 */ - getCreateCount(): number; + getCreateCount(): long; /** * Obtains the number of times that the queried values are not matched. * - * @returns { number } Returns the number of times that the queried values are not matched. + * @returns { long } Returns the number of times that the queried values are not matched. * @syscap SystemCapability.Utils.Lang * @since 20 * @arkts 1.2 */ - getMissCount(): number; + getMissCount(): long; /** * Obtains the number of times that values are evicted from the buffer. * - * @returns { number } Returns the number of times that values are evicted from the buffer. + * @returns { long } Returns the number of times that values are evicted from the buffer. * @syscap SystemCapability.Utils.Lang * @since 20 * @arkts 1.2 */ - getRemovalCount(): number; + getRemovalCount(): long; /** * Obtains the number of times that the queried values are successfully matched. * - * @returns { number } Returns the number of times that the queried values are successfully matched. + * @returns { long } Returns the number of times that the queried values are successfully matched. * @syscap SystemCapability.Utils.Lang * @since 20 * @arkts 1.2 */ - getMatchCount(): number; + getMatchCount(): long; /** * Obtains the number of times that values are added to the buffer. * - * @returns { number } Returns the number of times that values are added to the buffer. + * @returns { long } Returns the number of times that values are added to the buffer. * @syscap SystemCapability.Utils.Lang * @since 20 * @arkts 1.2 */ - getPutCount(): number; + getPutCount(): long; /** * Checks whether the current buffer is empty. @@ -855,15 +855,15 @@ declare namespace util { /** * Used to create a RationalNumber instance with a given numerator and denominator. * - * @param { number } numerator - An integer number - * @param { number } denominator - An integer number + * @param { long } numerator - An integer number + * @param { long } denominator - An integer number * @returns { RationalNumber } * @static * @syscap SystemCapability.Utils.Lang * @since 20 * @arkts 1.2 */ - static parseRationalNumber(numerator: number, denominator: number): RationalNumber; + static parseRationalNumber(numerator: long, denominator: long): RationalNumber; /** * Creates a RationalNumber object based on a given string. @@ -881,12 +881,12 @@ declare namespace util { * Compares the current RationalNumber object to the given object. * * @param { RationalNumber } another - An object of other rational numbers - * @returns { number } Returns 0 or 1, or -1, depending on the comparison. + * @returns { int } Returns 0 or 1, or -1, depending on the comparison. * @syscap SystemCapability.Utils.Lang * @since 20 * @arkts 1.2 */ - compare(another: RationalNumber): number; + compare(another: RationalNumber): int; /** * Compares two objects for equality. @@ -903,45 +903,45 @@ declare namespace util { /** * Gets integer and floating-point values of a rational number object. * - * @returns { number } Returns the integer and floating-point values of a rational number object. + * @returns { double } Returns the integer and floating-point values of a rational number object. * @syscap SystemCapability.Utils.Lang * @since 20 * @arkts 1.2 */ - valueOf(): number; + valueOf(): double; /** * Get the greatest common factor of two integers. * - * @param { number } number1 - Is an integer. - * @param { number } number2 - Is an integer. - * @returns { number } Returns the greatest common factor of two integers, integer type. + * @param { long } number1 - Is an integer. + * @param { long } number2 - Is an integer. + * @returns { long } Returns the greatest common factor of two integers, integer type. * @static * @syscap SystemCapability.Utils.Lang * @since 20 * @arkts 1.2 */ - static getCommonFactor(number1: number, number2: number): number; + static getCommonFactor(number1: long, number2: long): long; /** * Gets the denominator of the current object. * - * @returns { number } Returns the denominator of the current object. + * @returns { long } Returns the denominator of the current object. * @syscap SystemCapability.Utils.Lang * @since 20 * @arkts 1.2 */ - getDenominator(): number; + getDenominator(): long; /** * Gets the numerator of the current object. * - * @returns { number } Returns the numerator of the current object. + * @returns { long } Returns the numerator of the current object. * @syscap SystemCapability.Utils.Lang * @since 20 * @arkts 1.2 */ - getNumerator(): number; + getNumerator(): long; /** * Checks whether the current RationalNumber object represents an infinite value. @@ -1354,12 +1354,12 @@ declare namespace util { * Get the hash code of an object. * * @param { RecordData } obj - The object that need to get hash code. - * @returns { number } Return a hash code of an object. + * @returns { long } Return a hash code of an object. * @syscap SystemCapability.Utils.Lang * @since 20 * @arkts 1.2 */ - function getHash(obj: RecordData): number; + function getHash(obj: RecordData): long; /** * Generate a random RFC 4122 version 4 binary UUID using a cryptographically secure random number generator.