Class Paths.Wrapper
raft.kilavuz.runtime
java.lang.Object
  raft.kilavuz.runtime.Paths.Wrapper
All Implemented Interfaces:
Enclosing class:

public static class Paths.Wrapper
extends Object
implements PathIterator
utility class to wrap another PathIterator which delegates calls to wrapped one. think of this as a kind of adapter to intercept and modify certain properties of returned PathPosition, animation, direction etc. generally speaking modifying location is not suggested as subsequent segments in path depends on last position of this segment.

Fields inherited from interface raft.kilavuz.runtime.PathIterator
INDEFINITE
Constructor Summary
Paths.Wrapper(PathIterator path)
created a Wrapper wrapping given path.
Method Summary
first()
should return first position in sequence.
boolean
hasNext()
return true if sequnce is not ended.
last()
should return last position in sequence.
next(float time)
should return next position in sequence, should never return null.
float
remaining()
returns time left in seconds.
Constructor Detail
Paths.Wrapper
public Paths.Wrapper(PathIterator path)
created a Wrapper wrapping given path.
Parameters:
path - the path to be wrapped
Method Detail
next
public PathPosition next(float time)
Description copied from interface: PathIterator
should return next position in sequence, should never return null. return last if has already reached end. the implementation should return last if the sequence is completed or time > remaining()
Specified by:
next in interface PathIterator
Parameters:
time - passed seconds, should be positive.
Returns:
next position in sequence

first
public PathPosition first()
Description copied from interface: PathIterator
should return first position in sequence. this method should not rewind iterator pointer
Specified by:
first in interface PathIterator
Returns:
first position in sequence

last
public PathPosition last()
Description copied from interface: PathIterator
should return last position in sequence. may return null for indefinite sequences. this method should not advance iterator pointer
Specified by:
last in interface PathIterator
Returns:
last position in sequence

hasNext
public boolean hasNext()
Description copied from interface: PathIterator
return true if sequnce is not ended. should be consistent with remaining, that is if hasNext returns false, remanining should return 0 and vice versa
Specified by:
hasNext in interface PathIterator

remaining
public float remaining()
Description copied from interface: PathIterator
returns time left in seconds. returns INDEFINITE if sequence is infinite or cannnot be calculated. should be consistent with hasNext, that is if hasNext returns false, remanining should return 0 and vice versa
Specified by:
remaining in interface PathIterator
See Also:
Java API documentation generated with DocFlex/Doclet v1.5.2
DocFlex/Doclet is both a multi-format Javadoc doclet and a free edition of DocFlex/Javadoc. If you need to customize your Javadoc without writing a full-blown doclet from scratch, DocFlex/Javadoc may be the only tool able to help you! Find out more at www.docflex.com