Class PathfinderUtil.PositionMap<N extends PathfinderUtil.PathNode>

java.lang.Object
de.tomatengames.util.PathfinderUtil.PositionMap<N>
Type Parameters:
N - The specific type of PathfinderUtil.PathNode used
Enclosing class:
PathfinderUtil

public static class PathfinderUtil.PositionMap<N extends PathfinderUtil.PathNode> extends Object
A Map-like structure specifically for PathfinderUtil.PathNodes. They are compared using PathfinderUtil.World.positionHash(PathNode) and PathfinderUtil.World.positionEqual(PathNode, PathNode). Rather than wrapping with additional objects, the contained PathfinderUtil.PathNodes are used for linking directly, meaning that a PathfinderUtil.PathNode must not be used in multiple PathfinderUtil.PositionMaps.
Since:
1.5
  • Constructor Details

    • PositionMap

      public PositionMap(PathfinderUtil.World<N> world, float loadfactor, int initialCapacity)
  • Method Details

    • size

      public int size()
    • forEach

      public void forEach(Consumer<N> out)
    • clear

      public void clear()
    • put

      public void put(N node)
    • get

      public N get(N node)