Class PathImpl
java.lang.Object
de.bsommerfeld.pathetic.engine.result.PathImpl
- All Implemented Interfaces:
Path,Iterable<PathPosition>
-
Constructor Summary
ConstructorsConstructorDescriptionPathImpl(PathPosition start, PathPosition end, Iterable<PathPosition> positions) -
Method Summary
Modifier and TypeMethodDescriptioncollect()Returns a new Collection of the Path Positions of the path.voidforEach(Consumer<? super PathPosition> action) getEnd()Returns the target position of the pathgetStart()Returns the start position of the pathiterator()intlength()The length of the Path compiled from the number of positionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
spliterator
-
Constructor Details
-
PathImpl
-
-
Method Details
-
getStart
Description copied from interface:PathReturns the start position of the path- Specified by:
getStartin interfacePath- Returns:
PathPositionThe position of the start
-
getEnd
Description copied from interface:PathReturns the target position of the path- Specified by:
getEndin interfacePath- Returns:
PathPositionThe position of the target
-
iterator
- Specified by:
iteratorin interfaceIterable<PathPosition>
-
forEach
- Specified by:
forEachin interfaceIterable<PathPosition>
-
length
public int length()Description copied from interface:PathThe length of the Path compiled from the number of positions -
collect
Description copied from interface:PathReturns a new Collection of the Path Positions of the path.- Specified by:
collectin interfacePath- Returns:
Collectionof the PathPositions
-