Commit 80204705 authored by Christian Meyer's avatar Christian Meyer
Browse files

EdgeHandler.java: implements Serializable

    to fix exception when serializing SimplePotentialMap
parent d7187450
package de.zmt.pathfinding;
import java.io.Serializable;
import de.zmt.util.MathUtil;
import sim.field.grid.DoubleGrid2D;
......@@ -10,10 +12,15 @@ import sim.field.grid.DoubleGrid2D;
* @author mey
*
*/
public class EdgeHandler {
public class EdgeHandler implements Serializable {
private static final long serialVersionUID = 1L;
/** Default edge handler with {@link Hint#EXTEND}. */
private static final EdgeHandler DEFAULT_EDGE_HANDLER = new EdgeHandler(Hint.EXTEND, 0);
/** Used {@link Hint}. */
private final Hint hint;
/** Custom value used if {@link Hint#CUSTOM}. */
private final double value;
/**
......@@ -29,6 +36,7 @@ public class EdgeHandler {
* Constructs a new {@link EdgeHandler} with {@link Hint#CUSTOM}.
*
* @param value
* the custom value
*/
public EdgeHandler(double value) {
this(Hint.CUSTOM, value);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment