Class AgentFilteringFromTraversalIterator

Description

AgentIterator provides access to these objects sequentially, one at a time.

The purpose of all Iterators is to to offer a way for OSID methods to return multiple values of a common type and not use an array. Returning an array may not be appropriate if the number of values returned is large or is fetched remotely. Iterators do not allow access to values by index, rather you must access values in sequence. Similarly, there is no way to go backwards through the sequence unless you place the values in a data structure, such as an array, that allows for access by index.

<p> OSID Version: 2.0 </p>

Located in /harmoni/core/oki2/agent/AgentFilteringFromTraversalIterator.class.php (line 27)

SObject
   |
   --HarmoniIterator
      |
      --HarmoniAgentIterator
         |
         --AgentFilteringFromTraversalIterator
Direct descendents
Class Description
GroupsOnlyFromTraversalIterator AgentIterator provides access to these objects sequentially, one at a time.
MembersOnlyFromTraversalIterator AgentIterator provides access to these objects sequentially, one at a time.
Variable Summary
integer $_count
object Agent $_nextAgent
Method Summary
object AgentFilteringFromTraversalIterator (object TraversalInfoIterator $traversalInfoIterator)
integer count ()
boolean hasNext ()
object Agent next ()
object Agent _getAgent (object Id $id)
boolean _shouldSelect (object Id $id)
Variables
integer $_count (line 43)
  • since: 8/30/05
  • access: private
object Agent $_nextAgent (line 50)
  • since: 8/30/05
  • access: private
object $_traversalInfoIterator (line 36)
  • since: 8/30/05
  • access: private

Inherited Variables

Inherited from HarmoniIterator

HarmoniIterator::$_elements
HarmoniIterator::$_i
Methods
Constructor AgentFilteringFromTraversalIterator (line 60)

Constructor

  • since: 8/30/05
  • access: public
object AgentFilteringFromTraversalIterator (object TraversalInfoIterator $traversalInfoIterator)
  • object TraversalInfoIterator $traversalInfoIterator
count (line 159)

Gives the number of items in the iterator

  • since: 8/31/05
  • access: public
integer count ()

Redefinition of:
HarmoniIterator::count()
Gives the number of items in the iterator
hasNext (line 91)

Return true if there is an additional Agent ; false otherwise.

  • access: public
  • throws: object AgentException An exception with one of the following messages defined in org.osid.agent.AgentException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
boolean hasNext ()

Redefinition of:
HarmoniIterator::hasNext()
next (line 118)

Return the next Agent.

  • access: public
  • throws: object AgentException An exception with one of the following messages defined in org.osid.agent.AgentException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NO_MORE_ITERATOR_ELEMENTS
object Agent next ()

Redefinition of:
HarmoniIterator::next()
_getAgent (line 198)

create a new Agent of the appropriate class and return it.

  • since: 8/31/05
  • access: private
object Agent _getAgent (object Id $id)
  • object Id $id

Redefined in descendants as:
_selectNextAgent (line 132)

Select the next id in the TraversalInfoIterator that corresponds to a Group.

  • since: 8/30/05
  • access: private
void _selectNextAgent ()
_shouldSelect (line 185)

Return True if we should select the Agent with the given id, FALSE if we are filtering it.

  • since: 8/31/05
  • access: private
boolean _shouldSelect (object Id $id)
  • object Id $id

Redefined in descendants as:

Inherited Methods

Inherited From HarmoniAgentIterator

HarmoniAgentIterator::hasNextAgent()
HarmoniAgentIterator::nextAgent()

Inherited From HarmoniIterator

HarmoniIterator::HarmoniIterator()
HarmoniIterator::add()
HarmoniIterator::count()
HarmoniIterator::hasNext()
HarmoniIterator::next()
HarmoniIterator::skipNext()

Inherited From SObject

SObject::asA()
SObject::asString()
SObject::copy()
SObject::copySameFrom()
SObject::copyTwoLevel()
SObject::deepCopy()
SObject::isEqual()
SObject::isEqualTo()
SObject::isNotEqualTo()
SObject::isNotReferenceTo()
SObject::isReferenceTo()
SObject::newFrom()
SObject::postCopy()
SObject::printableString()
SObject::shallowCopy()
SObject::_deepCopyArray()

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