src/share/vm/libadt/vectset.cpp

changeset 3247
f350490a45fd
parent 2556
3763ca6579b7
child 3900
d2a62e0f25eb
     1.1 --- a/src/share/vm/libadt/vectset.cpp	Thu Oct 27 14:40:25 2011 -0700
     1.2 +++ b/src/share/vm/libadt/vectset.cpp	Thu Oct 27 18:20:50 2011 -0700
     1.3 @@ -350,6 +350,21 @@
     1.4    return (int)_xor;
     1.5  }
     1.6  
     1.7 +//------------------------------iterate----------------------------------------
     1.8 +// Used by Set::print().
     1.9 +class VSetI_ : public SetI_ {
    1.10 +  VectorSetI vsi;
    1.11 +public:
    1.12 +  VSetI_( const VectorSet *vset, uint &elem ) : vsi(vset) { elem = vsi.elem; }
    1.13 +
    1.14 +  uint next(void) { ++vsi; return vsi.elem; }
    1.15 +  int  test(void) { return vsi.test(); }
    1.16 +};
    1.17 +
    1.18 +SetI_ *VectorSet::iterate(uint &elem) const {
    1.19 +  return new(ResourceObj::C_HEAP) VSetI_(this, elem);
    1.20 +}
    1.21 +
    1.22  //=============================================================================
    1.23  //------------------------------next-------------------------------------------
    1.24  // Find and return the next element of a vector set, or return garbage and

mercurial