| OLD | NEW |
| 1 /* | 1 /* |
| 2 ********************************************************************** | 2 ********************************************************************** |
| 3 * Copyright (C) 1999-2010, International Business Machines | 3 * Copyright (C) 1999-2014, International Business Machines |
| 4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
| 5 ********************************************************************** | 5 ********************************************************************** |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 // | 8 // |
| 9 // UVector64 is a class implementing a vector of 64 bit integers. | 9 // UVector64 is a class implementing a vector of 64 bit integers. |
| 10 // It is similar to UVector32, but holds int64_t values rather than i
nt32_t. | 10 // It is similar to UVector32, but holds int64_t values rather than i
nt32_t. |
| 11 // Most of the code is unchanged from UVector. | 11 // Most of the code is unchanged from UVector. |
| 12 // | 12 // |
| 13 | 13 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 //UBool removeAll(const UVector64& other); | 115 //UBool removeAll(const UVector64& other); |
| 116 | 116 |
| 117 //UBool retainAll(const UVector64& other); | 117 //UBool retainAll(const UVector64& other); |
| 118 | 118 |
| 119 //void removeElementAt(int32_t index); | 119 //void removeElementAt(int32_t index); |
| 120 | 120 |
| 121 void removeAllElements(); | 121 void removeAllElements(); |
| 122 | 122 |
| 123 int32_t size(void) const; | 123 int32_t size(void) const; |
| 124 | 124 |
| 125 //UBool isEmpty(void) const; | 125 inline UBool isEmpty(void) const { return count == 0; } |
| 126 | 126 |
| 127 // Inline. Use this one for speedy size check. | 127 // Inline. Use this one for speedy size check. |
| 128 inline UBool ensureCapacity(int32_t minimumCapacity, UErrorCode &status); | 128 inline UBool ensureCapacity(int32_t minimumCapacity, UErrorCode &status); |
| 129 | 129 |
| 130 // Out-of-line, handles actual growth. Called by ensureCapacity() when nece
ssary. | 130 // Out-of-line, handles actual growth. Called by ensureCapacity() when nece
ssary. |
| 131 UBool expandCapacity(int32_t minimumCapacity, UErrorCode &status); | 131 UBool expandCapacity(int32_t minimumCapacity, UErrorCode &status); |
| 132 | 132 |
| 133 /** | 133 /** |
| 134 * Change the size of this vector as follows: If newSize is | 134 * Change the size of this vector as follows: If newSize is |
| 135 * smaller, then truncate the array, possibly deleting held | 135 * smaller, then truncate the array, possibly deleting held |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 if (count > 0) { | 268 if (count > 0) { |
| 269 count--; | 269 count--; |
| 270 result = elements[count]; | 270 result = elements[count]; |
| 271 } | 271 } |
| 272 return result; | 272 return result; |
| 273 } | 273 } |
| 274 | 274 |
| 275 U_NAMESPACE_END | 275 U_NAMESPACE_END |
| 276 | 276 |
| 277 #endif | 277 #endif |
| OLD | NEW |