abstract class Crystalline::Graph::AbstractIterator(T)
- Crystalline::Graph::AbstractIterator(T)
- Reference
- Object
Included Modules
- Enumerable(T)
Direct Known Subclasses
Defined in:
graph/iterator.crInstance Method Summary
- #at_beginning?
- #at_end?
- #backward
- #current
- #current_edge
-
#each(&)
Must yield this collection's elements to the block.
-
#empty?
Returns
true
ifself
is empty,false
otherwise. -
#first
Returns the first element in the collection.
- #forward
- #last
- #move_backward_until(&)
- #move_forward_until(&)
- #peek
- #set_to_begin
- #set_to_end
Instance Method Detail
def each(&)
#
Description copied from module Enumerable(T)
Must yield this collection's elements to the block.
def empty?
#
Description copied from module Enumerable(T)
Returns true
if self
is empty, false
otherwise.
([] of Int32).empty? # => true
([1]).empty? # => false
def first
#
Description copied from module Enumerable(T)
Returns the first element in the collection. Raises Enumerable::EmptyError
if the collection is empty.
([1, 2, 3]).first # => 1
([] of Int32).first # raises Enumerable::EmptyError