1. /*
  2. * @(#)POAIdArray.java 1.4 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. // @(#)POAIdArray.java 1.4 03/01/23
  8. package com.sun.corba.se.internal.ior ;
  9. import java.util.Iterator ;
  10. import org.omg.CORBA_2_3.portable.OutputStream ;
  11. public class POAIdArray extends POAIdBase {
  12. private final String[] poaId ;
  13. public POAIdArray( String[] poaId )
  14. {
  15. this.poaId = poaId ;
  16. }
  17. public int getNumLevels()
  18. {
  19. return poaId.length ;
  20. }
  21. public Iterator iterator()
  22. {
  23. return new Iterator() {
  24. int current = 0 ;
  25. public boolean hasNext() {
  26. return current < poaId.length ;
  27. }
  28. public Object next() {
  29. return poaId[ current++ ] ;
  30. }
  31. public void remove()
  32. {
  33. throw new UnsupportedOperationException() ;
  34. }
  35. } ;
  36. }
  37. }