Source for file HarmoniIntValueIterator.class.php

Documentation is available at HarmoniIntValueIterator.class.php

  1. <?php
  2.  
  3. require_once(OKI2."/osid/shared/IntValueIterator.php");
  4. require_once(HARMONI."oki2/shared/HarmoniIterator.class.php");
  5. /**
  6. * IntValueIterator provides access to these objects sequentially, one at a
  7. * time. The purpose of all Iterators is to to offer a way for OSID methods
  8. * to return multiple values of a common type and not use an array. Returning
  9. * an array may not be appropriate if the number of values returned is large
  10. * or is fetched remotely. Iterators do not allow access to values by index,
  11. * rather you must access values in sequence. Similarly, there is no way to go
  12. * backwards through the sequence unless you place the values in a data
  13. * structure, such as an array, that allows for access by index. To maximize
  14. * reuse and implementation substitutability, it is important not to reference
  15. * a class in one OSID implementation directly in another. Interfaces should
  16. * be used and new called only on objects in the implementation package. To
  17. * avoid binding a specific implementation of Shared to a specific
  18. * implementaiton of some other OSID, implementations TypeIterator and the
  19. * other primitative-type Iterators should reside in each OSID that requires
  20. * them and not in an implementation of Shared. For example, if an
  21. * implementation of org.osid.logging.LoggingManager needs a class that
  22. * implements org.osid.shared.StringIterator, the class should be in the
  23. * package implementing Logging.
  24. *
  25. * <p>
  26. * OSID Version: 2.0
  27. *
  28. * @package harmoni.osid_v2.shared
  29. *
  30. * @copyright Copyright &copy; 2005, Middlebury College
  31. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  32. *
  33. * @version $Id: HarmoniIntValueIterator.class.php,v 1.6 2005/01/19 22:28:26 adamfranco Exp $
  34. */
  35. class HarmoniIntValueIterator
  36. extends HarmoniIterator
  37. // implements IntValueIterator
  38.  
  39. {
  40. /**
  41. * Return true if there is an additional IntValue ; false otherwise.
  42. *
  43. * @return boolean
  44. *
  45. * @throws object SharedException An exception with one of the
  46. * following messages defined in org.osid.shared.SharedException
  47. * may be thrown: {@link }
  48. * org.osid.shared.SharedException#UNKNOWN_TYPE UNKNOWN_TYPE},
  49. * {@link org.osid.shared.SharedException#PERMISSION_DENIED}
  50. * PERMISSION_DENIED}, {@link }
  51. * org.osid.shared.SharedException#CONFIGURATION_ERROR
  52. * CONFIGURATION_ERROR}, {@link }
  53. * org.osid.shared.SharedException#UNIMPLEMENTED UNIMPLEMENTED}
  54. *
  55. * @access public
  56. */
  57. function hasNextIntValue () {
  58. return $this->hasNext();
  59. }
  60.  
  61. /**
  62. * Return the next int.
  63. *
  64. * @return int
  65. *
  66. * @throws object SharedException An exception with one of the
  67. * following messages defined in org.osid.shared.SharedException
  68. * may be thrown: {@link }
  69. * org.osid.shared.SharedException#UNKNOWN_TYPE UNKNOWN_TYPE},
  70. * {@link org.osid.shared.SharedException#PERMISSION_DENIED}
  71. * PERMISSION_DENIED}, {@link }
  72. * org.osid.shared.SharedException#CONFIGURATION_ERROR
  73. * CONFIGURATION_ERROR}, {@link }
  74. * org.osid.shared.SharedException#UNIMPLEMENTED UNIMPLEMENTED},
  75. * {@link }
  76. * org.osid.shared.SharedException#NO_MORE_ITERATOR_ELEMENTS
  77. * NO_MORE_ITERATOR_ELEMENTS}
  78. *
  79. * @access public
  80. */
  81. function nextIntValue () {
  82. return $this->next();
  83. }
  84. }
  85.  
  86. ?>

Documentation generated on Wed, 19 Sep 2007 10:24:04 -0400 by phpDocumentor 1.3.0RC3