com.neeve.rog
Interface IRogTraverser<T extends IRogCollectionNodeElement>

All Known Subinterfaces:
IRogList<T>, IRogQueue<T>

public interface IRogTraverser<T extends IRogCollectionNodeElement>

A traverser over an ordered collection.

Threading:
Lists are not safe for concurrent access by multiple threads.

Method Summary
 T first()
          Get the first element in a collection.
 T last()
          Get the last element in a collection.
 T next(T e)
          Get the element after another element in a collection.
 T previous(T e)
          Get the element before another element in a collection.
 

Method Detail

first

T first()
Get the first element in a collection.

Returns:
The first element in the collection.
Threading:
This method is not safe for concurrent access by multiple threads

next

T next(T e)
Get the element after another element in a collection.

Parameters:
e - The element whose succeeding element is to be returned.
Returns:
The element immediately following the specified element in the collection. A value of null is returned if the specified element is the last element in the collection.
Threading:
This method is not safe for concurrent access by multiple threads

previous

T previous(T e)
Get the element before another element in a collection.

Parameters:
e - The element whose preceding element is to be returned.
Returns:
The element immediately preceding the specified element in the collection. A value of null is returned if the specified element is the first element in the collection.
Threading:
This method is not safe for concurrent access by multiple threads

last

T last()
Get the last element in a collection.

Returns:
The last element in the collection.
Threading:
This method is not safe for concurrent access by multiple threads


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.