Source for file HarmoniCharValueIterator.class.php

Documentation is available at HarmoniCharValueIterator.class.php

  1. <?php
  2. require_once(OKI2."/osid/shared/CharValueIterator.php");
  3. require_once(HARMONI."oki2/shared/HarmoniIterator.class.php");
  4. /**
  5. * CharValueIterator provides access to these objects sequentially, one at a
  6. * time. The purpose of all Iterators is to to offer a way for OSID methods
  7. * to return multiple values of a common type and not use an array. Returning
  8. * an array may not be appropriate if the number of values returned is large
  9. * or is fetched remotely. Iterators do not allow access to values by index,
  10. * rather you must access values in sequence. Similarly, there is no way to go
  11. * backwards through the sequence unless you place the values in a data
  12. * structure, such as an array, that allows for access by index. To maximize
  13. * reuse and implementation substitutability, it is important not to reference
  14. * a class in one OSID implementation directly in another. Interfaces should
  15. * be used and new called only on objects in the implementation package. To
  16. * avoid binding a specific implementation of Shared to a specific
  17. * implementaiton of some other OSID, implementations TypeIterator and the
  18. * other primitative-type Iterators should reside in each OSID that requires
  19. * them and not in an implementation of Shared. For example, if an
  20. * implementation of org.osid.logging.LoggingManager needs a class that
  21. * implements org.osid.shared.StringIterator, the class should be in the
  22. * package implementing Logging.
  23. *
  24. * <p>
  25. * OSID Version: 2.0
  26. * </p>
  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: HarmoniCharValueIterator.class.php,v 1.4 2005/01/19 22:28:26 adamfranco Exp $
  34. */
  35. class HarmoniCharValueIterator
  36. extends HarmoniIterator
  37. // implements CharValueIterator
  38.  
  39. {
  40. /**
  41. * Return true if there is an additional CharValue ; 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 hasNextCharValue () {
  58. return $this->hasNext();
  59. }
  60.  
  61. /**
  62. * Return the next char.
  63. *
  64. * @return string (original type: java.lang.Character)
  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 nextCharValue () {
  82. return $this->next();
  83. }
  84. }
  85.  
  86. ?>

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