A node sequence has the following characteristics:
Warning: This is a facade provided for use by user code, not for implementation by user code. User implementations of this interface are highly likely to be incompatible with future releases of the product at both binary and source levels.
@mock.generate It incorporates the iterator caching optimization:
calls to iterator() are amortized O(n/k) time if called k times between modifications of the sequence. This is accomplished by making a list of the positions of the sequence whenever iterating through the list is necessary, and using it until there is a modification to the Sequence.
This implementation does not use fictitious positions at the beginning or end of the Sequence, and the head and tail node have null pointers past the beginning or end of the Sequence.
The non-interface methods for inserting positions are implemented separately in order to allow greater constant-factor efficiency and comprehensibility in the Sequence insertion methods and to allow later separation of their functionality. @author Benoit Hudson @author Mark Handy @author Andrew Schwerin @author Ryan Shaun Baker @version JDSL 2.1.1
|
|