home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_07.cab / ObjectEnumerator.java < prev    next >
Text File  |  1997-10-25  |  2KB  |  48 lines

  1. /*  ********************************************************************************
  2.     ObjectEnumerator.java **********************************************************
  3.     ********************************************************************************  */
  4.  
  5. package aspcomp;
  6.  
  7. import com.ms.com.*;
  8. import java.util.*;
  9.  
  10. /**
  11.  * Allows enumeration over object collections of variants. 
  12.  */
  13.  
  14. public class ObjectEnumerator extends VariantEnumerator
  15. {
  16.  
  17. /*  ********************************************************************************
  18.     Constructor ********************************************************************
  19.     ********************************************************************************  */
  20.  
  21.     public ObjectEnumerator(IEnumVariant iev, Dictionary dict)
  22.     {
  23.         super(iev);
  24.         m_dict = dict;
  25.     }
  26.  
  27.  
  28. /*  ********************************************************************************
  29.     Internal (Private) Variables ***************************************************
  30.     ********************************************************************************  */
  31.  
  32.     private Dictionary m_dict;
  33.  
  34.  
  35. /*  ********************************************************************************
  36.     External (Public) Access Methods ***********************************************
  37.     ********************************************************************************  */
  38.  
  39.     // This method overrides the definition in VariantEnumerator
  40.     public Object nextElement() 
  41.         throws NoSuchElementException,
  42.                ClassCastException,
  43.                AspComponentException
  44.     {
  45.         return m_dict.get(nextVariant());
  46.     }
  47. }
  48.