* Converts the specified value to a Int64 using the appropriate from* function for its type. * @param {!Int64|!UInt64|number|string} value Value * @returns {!Int64} The corresponding Int64 value
(value)
| 202 | * @returns {!Int64} The corresponding Int64 value |
| 203 | */ |
| 204 | static fromValue (value) { |
| 205 | if (typeof value === 'number') { |
| 206 | return Int64.fromNumber(value) |
| 207 | } |
| 208 | if (typeof value === 'string') { |
| 209 | return Int64.fromString(value, 10) |
| 210 | } |
| 211 | return Int64.fromBits(value.low, value.high) |
| 212 | } |
| 213 | |
| 214 | /** |
| 215 | * Converts the Int64 to its bytes representation |