MCPcopy Create free account
hub / github.com/PCGen/pcgen / chooseItemToBeMoved

Method chooseItemToBeMoved

code/src/java/pcgen/io/PCGIOHandler.java:445–457  ·  view source on GitHub ↗

Pick one of two equipment sets sharing a path to be moved to a new path. Only non containers will be moved to avoid issues with contents. @param equipSet1 The first equipment set at a path. @param equipSet2 The second equipment set at a path. @return The equipment set that should be move,d or null

(EquipSet equipSet1, EquipSet equipSet2)

Source from the content-addressed store, hash-verified

443 * @return The equipment set that should be move,d or null if none are safe.
444 */
445 private EquipSet chooseItemToBeMoved(EquipSet equipSet1, EquipSet equipSet2)
446 {
447 if (!equipSet2.getItem().isContainer())
448 {
449 return equipSet2;
450 }
451 if (!equipSet1.getItem().isContainer())
452 {
453 return equipSet1;
454 }
455 // Currently be really conservative
456 return null;
457 }
458
459 /**
460 * reads from the given partyFile and returns the list of

Callers 1

Calls 2

isContainerMethod · 0.65
getItemMethod · 0.45

Tested by

no test coverage detected