src/share/vm/utilities/growableArray.hpp

changeset 5548
5888334c9c24
parent 4245
4735d2c84362
child 6198
55fb97c4c58d
equal deleted inserted replaced
5519:bd902affe102 5548:5888334c9c24
192 // Does nothing for resource and arena objects 192 // Does nothing for resource and arena objects
193 ~GrowableArray() { if (on_C_heap()) clear_and_deallocate(); } 193 ~GrowableArray() { if (on_C_heap()) clear_and_deallocate(); }
194 194
195 void clear() { _len = 0; } 195 void clear() { _len = 0; }
196 int length() const { return _len; } 196 int length() const { return _len; }
197 int max_length() const { return _max; }
197 void trunc_to(int l) { assert(l <= _len,"cannot increase length"); _len = l; } 198 void trunc_to(int l) { assert(l <= _len,"cannot increase length"); _len = l; }
198 bool is_empty() const { return _len == 0; } 199 bool is_empty() const { return _len == 0; }
199 bool is_nonempty() const { return _len != 0; } 200 bool is_nonempty() const { return _len != 0; }
200 bool is_full() const { return _len == _max; } 201 bool is_full() const { return _len == _max; }
201 DEBUG_ONLY(E* data_addr() const { return _data; }) 202 DEBUG_ONLY(E* data_addr() const { return _data; })

mercurial