Class ErrorGraphNodeList
java.lang.Object
net.okapia.osid.jamocha.spi.AbstractOsidList
net.okapia.osid.jamocha.topology.graphnode.spi.AbstractGraphNodeList
net.okapia.osid.jamocha.topology.graphnode.ErrorGraphNodeList
- All Implemented Interfaces:
Closeable, AutoCloseable, OsidList, OsidList, GraphNodeList
This list is to implement an error condition through the OsidList
interface.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newErrorGraphNodeList.ErrorGraphNodeList(String message) Creates a newErrorGraphNodeList.ErrorGraphNodeList(String message, Exception e) Creates a newErrorGraphNodeList. -
Method Summary
Methods inherited from class AbstractGraphNodeList
getNextGraphNodesModifier and TypeMethodDescriptiongetNextGraphNodes(long n) Gets the next set ofGraphNodeelements in this list.Methods inherited from class AbstractOsidList
close
-
Constructor Details
-
ErrorGraphNodeList
Creates a newErrorGraphNodeList.- Parameters:
e- an Exception- Throws:
NullArgumentException-eisnull
-
ErrorGraphNodeList
Creates a newErrorGraphNodeList.- Parameters:
message- a text message for the exception- Throws:
NullArgumentException-messageisnull
-
ErrorGraphNodeList
Creates a newErrorGraphNodeList.- Parameters:
message- a text message for the exceptione- an exception- Throws:
NullArgumentException-messageoreisnull
-
-
Method Details
-
hasNext
Tests if there are more elements in this list.- Specified by:
hasNextin interfaceOsidList- Specified by:
hasNextin classAbstractOsidList- Returns:
trueif more elements are available in this list,falseif the end of the list has been reached- Throws:
IllegalStateException- this list is closed
-
available
Gets the number of elements available for retrieval. The number returned by this method may be less than or equal to the total number of elements in this list. To determine if the end of the list has been reached, the methodhasNext()should be used. This method conveys what is known about the number of remaining elements at a point in time and can be used to determine a minimum size of the remaining elements, if known. A valid return is zero even ifhasNext()is true. This method does not imply asynchronous usage. All OSID methods may block.- Specified by:
availablein interfaceOsidList- Overrides:
availablein classAbstractOsidList- Returns:
- the number of elements available for retrieval
- Throws:
IllegalStateException- this list is closed
-
skip
Skip the specified number of elements in the list. If the number skipped is greater than the number of elements in the list, hasNext() becomes false and available() returns zero as there are no more elements to retrieve.- Specified by:
skipin interfaceOsidList- Overrides:
skipin classAbstractGraphNodeList- Parameters:
n- the number of elements to skip- Throws:
InvalidArgumentException-nis less than zero
-
getNextGraphNode
Gets the nextGraphNodein this list.- Specified by:
getNextGraphNodein interfaceGraphNodeList- Returns:
- the next
GraphNodein this list. ThehasNext()method should be used to test that a nextGraphNodeis available before calling this method. - Throws:
IllegalStateException- no more elements available in this list or this list is closedOperationFailedException- unable to complete request
-