Class MapleData
java.lang.Object
provider.MapleData
- All Implemented Interfaces:
Iterable<MapleData>, MapleDataEntity
WZ 遊戲資料樹中的單一節點,封裝從 XML 解析出的資料與子節點存取。
實作 MapleDataEntity(持有名稱與父節點參照)並實作 Iterable,
可直接以 for-each 走訪子節點。主要職責:
- 從
FileInputStream解析 WZ XML,取得 DOM 根節點。 - 以
/分隔的路徑字串(支援..向上跳層)導覽子節點 (getChildByPath)。 - 根據 XML 元素名稱推導
MapleDataType,並在getData()將原始 字串轉換為對應的 Java 型別(Integer、Double、Point、MapleCanvas等)。
本類別由 MapleDataProvider.getData(String) 建立,
再由 MapleDataTool 的各型別讀取方法對外提供具型別的值。
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetChildByPath(String path) getData()getName()final MapleDataTypegetType()iterator()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
MapleData
-
-
Method Details
-
getChildByPath
-
getChildren
-
getData
-
getType
-
getParent
- Specified by:
getParentin interfaceMapleDataEntity
-
getName
- Specified by:
getNamein interfaceMapleDataEntity
-
iterator
-