类 RidingRelationship
java.lang.Object
top.r3944realms.superleadrope.util.model.RidingRelationship
骑乘关系数据结构
-
构造器概要
构造器构造器说明Instantiates a new Riding relationship.RidingRelationship(List<RidingRelationship> passengers, UUID vehicleId, UUID entityId) Instantiates a new Riding relationship. -
方法概要
修饰符和类型方法说明voidaddPassenger(RidingRelationship passenger) Add passenger.intbatchFindAndReplace(Map<UUID, UUID> replacements) 查找并替换所有UUID(支持批量替换)booleancontainsEntity(UUID entityId) 检查是否包含特定实体findAllOccurrences(UUID targetUuid) 查找所有出现的UUID位置intfindAndReplaceAll(UUID oldUuid, UUID newUuid) 查找并替换所有匹配的UUID获取树中所有唯一的UUID集合Gets entity id.Gets passengers.int获取所有嵌套乘客的数量Gets vehicle id.voidsetEntityId(UUID entityId) Sets entity id.voidsetPassengers(List<RidingRelationship> passengers) Sets passengers.voidsetVehicleId(UUID vehicleId) Sets vehicle id.toString()
-
构造器详细资料
-
RidingRelationship
public RidingRelationship()Instantiates a new Riding relationship. -
RidingRelationship
Instantiates a new Riding relationship.- 参数:
passengers- the passengersvehicleId- the vehicle identityId- the entity id
-
-
方法详细资料
-
getEntityId
Gets entity id.- 返回:
- the entity id
-
setEntityId
Sets entity id.- 参数:
entityId- the entity id
-
getPassengers
Gets passengers.- 返回:
- the passengers
-
setPassengers
Sets passengers.- 参数:
passengers- the passengers
-
addPassenger
Add passenger.- 参数:
passenger- the passenger
-
getVehicleId
Gets vehicle id.- 返回:
- the vehicle id
-
setVehicleId
Sets vehicle id.- 参数:
vehicleId- the vehicle id
-
getTotalPassengerCount
public int getTotalPassengerCount()获取所有嵌套乘客的数量- 返回:
- the total passenger count
-
containsEntity
检查是否包含特定实体- 参数:
entityId- the entity id- 返回:
- the boolean
-
findAndReplaceAll
查找并替换所有匹配的UUID- 参数:
oldUuid- 要查找的旧UUIDnewUuid- 要替换的新UUID- 返回:
- 替换的数量 int
-
findAllOccurrences
查找所有出现的UUID位置- 参数:
targetUuid- 要查找的UUID- 返回:
- 包含位置的列表 ,格式为"角色(实体/载具)-索引"
-
batchFindAndReplace
查找并替换所有UUID(支持批量替换)- 参数:
replacements- 替换映射表,key为旧UUID,value为新UUID- 返回:
- 总替换数量 int
-
getAllUniqueUUIDs
获取树中所有唯一的UUID集合- 返回:
- 包含所有UUID的集合 all unique uui ds
-
toString
-