jfreerails.world.common
Interface FreerailsPathIterator

All Superinterfaces:
FreerailsMutableSerializable, java.io.Serializable
All Known Subinterfaces:
PathWalker
All Known Implementing Classes:
FreerailsPathIteratorImpl, PathWalkerImpl, RandomPathFinder, SimplePathIteratorImpl, ToAndFroPathIterator, TrainPathIterator

public interface FreerailsPathIterator
extends FreerailsMutableSerializable

This interface lets the caller retrieve a path made up of a series of straight lines. E.g. it lets the path a train takes across a section of track be retrieved without revealing the underlying objects that represent the track.

Author:
luke

Method Summary
 boolean hasNext()
          Tests whether the path has another segment.
 void nextSegment(IntLine line)
          Gets the next segment of the path and places its coordinates in the specified IntLine; then moves the iterator forwards by one path segment.
 

Method Detail

hasNext

boolean hasNext()
Tests whether the path has another segment.


nextSegment

void nextSegment(IntLine line)
Gets the next segment of the path and places its coordinates in the specified IntLine; then moves the iterator forwards by one path segment. (The coordinates are placed the passed-in IntLine rather than a new object to avoid the cost of object creation.)

Parameters:
line -