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

Method clone

code/src/java/pcgen/core/bonus/BonusObj.java:536–560  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

534 }
535
536 @Override
537 public BonusObj clone() throws CloneNotSupportedException
538 {
539 final BonusObj bonusObj = (BonusObj) super.clone();
540
541 bonusObj.bonusInfo = new ArrayList<>(bonusInfo);
542
543 bonusObj.dependMap = new HashMap<>();
544 bonusObj.setValue(bonusFormula.toString());
545
546 // we want to keep the same references to these objects
547 // creatorObj
548 // targetObj
549
550 // These objects are immutable and do not need explicit cloning
551 // bonusName
552 // bonusType
553 // choiceString
554 // varPart
555 // isApplied
556 // valueIsStatic
557 // pcLevel
558 // typeOfBonus
559 return bonusObj;
560 }
561
562 public void setTokenSource(String tokenName)
563 {

Callers 3

mergeEquipmentListMethod · 0.45
testApplyMethod · 0.45

Calls 2

setValueMethod · 0.95
toStringMethod · 0.65

Tested by

no test coverage detected