# Like standard Array or LinkedList, CircularList is a Sequence.
super Sequence[E]
- # NaiveCollection contains working (but inefficient) implementation of
- # the methods of Collection.
- super NaiveCollection[E]
-
# The first node of the list if any
# The special case of an empty list is handled by a null node
private var node: nullable CLNode[E] = null
### Specific private collection and iterator classes
private class PipeUniq[E]
- super NaiveCollection[E]
+ super Collection[E]
var source: Collection[E]
redef fun iterator do return new PipeUniqIterator[E](source.iterator)
end
end
private class PipeSeqUniq[E]
- super NaiveCollection[E]
+ super Collection[E]
var source: Collection[E]
redef fun iterator do return new PipeSeqUniqIterator[E](source.iterator)
end
end
private class PipeJoin[E]
- super NaiveCollection[E]
+ super Collection[E]
var source1: Collection[E]
var source2: Collection[E]
redef fun iterator do return new PipeJoinIterator[E](source1.iterator, source2.iterator)
end
private class PipeAlternate[E]
- super NaiveCollection[E]
+ super Collection[E]
var source: Collection[E]
var odd_item: E
redef fun iterator do return new PipeAlternateIterator[E](source.iterator, odd_item)
end
private class PipeSkip[E]
- super NaiveCollection[E]
+ super Collection[E]
var source: Collection[E]
var skip_item: E
redef fun iterator do return new PipeSkipIterator[E](source.iterator, skip_item)
end
private class PipeSkipIterator[E]
- super NaiveCollection[E]
+ super Collection[E]
super Iterator[E]
var source: Iterator[E]
end
private class PipeHead[E]
- super NaiveCollection[E]
+ super Collection[E]
var source: Collection[E]
var pipe_length: Int
redef fun iterator do return new PipeHeadIterator[E](source.iterator, pipe_length)
end
private class PipeSkipHead[E]
- super NaiveCollection[E]
+ super Collection[E]
var source: Collection[E]
var pipe_length: Int
redef fun iterator
end
private class PipeTail[E]
- super NaiveCollection[E]
+ super Collection[E]
var source: Collection[E]
var pipe_length: Int
redef fun iterator
end
private class PipeSkipTail[E]
- super NaiveCollection[E]
+ super Collection[E]
var source: Collection[E]
var pipe_length: Int
redef fun iterator do return new PipeSkipTailIterator[E](source.iterator, pipe_length)