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

Method setLocation

code/src/java/pcgen/core/Equipment.java:1288–1299  ·  view source on GitHub ↗

OwnedItem Sets the location attribute of the Equipment object @param newLocation EquipmentLocation containing the new location value

(final EquipmentLocation newLocation)

Source from the content-addressed store, hash-verified

1286 * EquipmentLocation containing the new location value
1287 */
1288 public void setLocation(final EquipmentLocation newLocation)
1289 {
1290 if (EquipmentLocation.CONTAINED.equals(newLocation))
1291 {
1292 location = EquipmentLocation.CARRIED_NEITHER;
1293 }
1294 else
1295 {
1296 location = newLocation;
1297 }
1298 equipped = location.isEquipped();
1299 }
1300
1301 /**
1302 * OwnedItem Gets the hand attribute of the Equipment object

Callers 15

testTypeMethod · 0.95
testWieldMethod · 0.95
testTypeMethod · 0.95
testWieldMethod · 0.95
testNotEquippedMethod · 0.95
testTypeMethod · 0.95
testWieldMethod · 0.95
testTypeMethod · 0.95

Calls 2

equalsMethod · 0.65
isEquippedMethod · 0.45

Tested by 15

testTypeMethod · 0.76
testWieldMethod · 0.76
testTypeMethod · 0.76
testWieldMethod · 0.76
testNotEquippedMethod · 0.76
testTypeMethod · 0.76
testWieldMethod · 0.76
testTypeMethod · 0.76