| Package | Description |
|---|---|
| fr.arakne.utils.maps.path |
| Modifier and Type | Method and Description |
|---|---|
Path<C> |
Decoder.decode(String encoded)
Decode compressed path without a start cell
|
Path<C> |
Decoder.decode(String encoded,
C start)
Decode compressed path
|
Path<C> |
Pathfinder.findPath(C source,
C target)
Find the shortest path between source and target cells
|
Path<C> |
Path.keepWhile(Predicate<PathStep<C>> condition)
Keep the path steps while the condition is valid
The path will be stop when an invalid step is found
|
Path<C> |
Path.truncate(int newSize)
Truncate the path, to the new size
|
| Modifier and Type | Method and Description |
|---|---|
String |
Decoder.encode(Path<C> path)
Encode the computed path, without the start cell
To decode this path, the start cell must be provided on the decode method
This method should be used by the client to send a path to the server
String encoded = encoder.encode(myPath);
Path decoded = encoder.decode(encoded, startCell);
|
String |
Decoder.encodeWithStartCell(Path<C> path)
Encode the computed path, including the start cell
To decode this path, the start cell should not be provided on the decode method
This method should be used by server to send a path to the client
String encoded = encoder.encodeWithStartCell(myPath);
Path decoded = encoder.decode(encoded);
|
Copyright © 2022. All rights reserved.