IWaypointAndLocationProvider
兼具路点能力的数据源
基本信息
| 属性 | 值 |
|---|---|
| 路径 | com.gtnewhorizons.navigator.api.model.locations.IWaypointAndLocationProvider |
| 行数 | 28 |
| 继承 | extends ILocationProvider |
唯一作用:桥接数据点与路点
在 ILocationProvider(数据点)之上 加路点能力,使「这个数据点可以变成一个路点」。
与路点体系的衔接
| 层 | 类型 |
|---|---|
| 路点模型 | Waypoint —— 6 个 final 字段 |
| 路点管理 | WaypointManager(抽象类,3 个抽象方法) |
| 地图侧实现 | JMWaypointManager、XaeroWaypointManager、JourneyMapV6WaypointManager、VoxelMapWaypointManager(死代码) |
⚠️ 桥接的实际执行者在
UniversalInteractableStep ——
README.md 说明
use UniversalInteractableStep … when double-click should toggle a waypoint。
即双击切换路点是默认行为。
⚠️ 本接口只有 28 行(大量是 javadoc),
说明它不声明很多方法 —— 更像是标记接口 + 少量默认,
具体的路点创建由 Waypoint 构造器与
WaypointManager.updateActiveWaypoint(Waypoint) 完成。
命名的三层递进
| 名称 | 位置 |
|---|---|
ILocationProvider |
api/model/locations/ |
IWaypointAndLocationProvider |
api/model/locations/ |
WaypointManager |
api/model/waypoints/(抽象类,非接口) |
⚠️ 三个都在不同包(locations vs waypoints),
但语义耦合。查代码时容易漏。
相关
- ILocationProvider - 父接口
- Waypoint / WaypointManager - 路点侧
- UniversalInteractableStep - 双击切换路点的实现处