Source for file HarmoniByteValueIterator.class.php

Documentation is available at HarmoniByteValueIterator.class.php

  1. <?php
  2.  
  3. require_once(OKI2."/osid/shared/ByteValueIterator.php");
  4. require_once(HARMONI."oki2/shared/HarmoniIterator.class.php");
  5. /**
  6. * ByteValueIterator 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. * </p>
  28. *
  29. * @package harmoni.osid_v2.shared
  30. *
  31. * @copyright Copyright &copy; 2005, Middlebury College
  32. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  33. *
  34. * @version $Id: HarmoniByteValueIterator.class.php,v 1.4 2005/01/19 22:28:26 adamfranco Exp $
  35. */
  36. class HarmoniByteValueIterator
  37. extends HarmoniIterator
  38. // implements ByteValueIterator
  39.  
  40. {
  41. /**
  42. * Return true if there is an additional ByteValue ; false otherwise.
  43. *
  44. * @return boolean
  45. *
  46. * @throws object SharedException An exception with one of the
  47. * following messages defined in org.osid.shared.SharedException
  48. * may be thrown: {@link }
  49. * org.osid.shared.SharedException#UNKNOWN_TYPE UNKNOWN_TYPE},
  50. * {@link org.osid.shared.SharedException#PERMISSION_DENIED}
  51. * PERMISSION_DENIED}, {@link }
  52. * org.osid.shared.SharedException#CONFIGURATION_ERROR
  53. * CONFIGURATION_ERROR}, {@link }
  54. * org.osid.shared.SharedException#UNIMPLEMENTED UNIMPLEMENTED}
  55. *
  56. * @access public
  57. */
  58. function hasNextByteValue () {
  59. return $this->hasNext();
  60. }
  61.  
  62. /**
  63. * Return the next byte.
  64. *
  65. * @return int (original type: java.lang.Byte)
  66. *
  67. * @throws object SharedException An exception with one of the
  68. * following messages defined in org.osid.shared.SharedException
  69. * may be thrown: {@link }
  70. * org.osid.shared.SharedException#UNKNOWN_TYPE UNKNOWN_TYPE},
  71. * {@link org.osid.shared.SharedException#PERMISSION_DENIED}
  72. * PERMISSION_DENIED}, {@link }
  73. * org.osid.shared.SharedException#CONFIGURATION_ERROR
  74. * CONFIGURATION_ERROR}, {@link }
  75. * org.osid.shared.SharedException#UNIMPLEMENTED UNIMPLEMENTED},
  76. * {@link }
  77. * org.osid.shared.SharedException#NO_MORE_ITERATOR_ELEMENTS
  78. * NO_MORE_ITERATOR_ELEMENTS}
  79. *
  80. * @access public
  81. */
  82. function nextByteValue () {
  83. return $this->next();
  84. }
  85. }
  86.  
  87. ?>

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