Interface ResourceRelationshipList

All Superinterfaces:
AutoCloseable, Closeable, OsidList, OsidList

public interface ResourceRelationshipList extends OsidList

Like all OsidLists , ResourceRelationshipList provides a means for accessing ResourceRelationship elements sequentially either one at a time or many at a time. Examples:

while (rrl.hasNext()) {
     ResourceRelationship relationship = rrl.getNextResourceRelationship();
}            
  
or
while (rrl.hasNext()) {
     ResourceRelationship[] relationships = rrl.getNextResourceRelationships(rrl.available());
}            
  
  • Method Details

    • getNextResourceRelationship

      ResourceRelationship getNextResourceRelationship() throws OperationFailedException
      Gets the next ResourceRelationship in this list.
      Returns:
      the next ResourceRelationship in this list. The hasNext() method should be used to test that a next ResourceRelationship is available before calling this method.
      Throws:
      IllegalStateException - no more elements available in this list
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getNextResourceRelationships

      ResourceRelationship[] getNextResourceRelationships(long n) throws OperationFailedException
      Gets the next set of ResourceRelationship elements in this list which must be less than or equal to the number returned from available() .
      Parameters:
      n - the number of ResourceRelationship elements requested which should be less than or equal to available()
      Returns:
      an array of ResourceRelationship elements. The length of the array is less than or equal to the number specified.
      Throws:
      IllegalStateException - no more elements available in this list
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.