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

Method specify

code/src/java/pcgen/core/prereq/Prerequisite.java:526–548  ·  view source on GitHub ↗
(String assoc)

Source from the content-addressed store, hash-verified

524 }
525
526 public Prerequisite specify(String assoc) throws CloneNotSupportedException
527 {
528 final Prerequisite copy = (Prerequisite) super.clone();
529 //PREMULT has no key or operand
530 if (copy.key != null)
531 {
532 copy.key = copy.key.replaceAll(PERCENT_CHOICE_PATTERN, assoc);
533 }
534 if (copy.operand != null)
535 {
536 copy.operand = copy.operand.replaceAll(PERCENT_CHOICE_PATTERN, assoc);
537 }
538
539 if (prerequisites != null)
540 {
541 copy.prerequisites = new ArrayList<>();
542 for (Prerequisite subreq : prerequisites)
543 {
544 copy.prerequisites.add(subreq.specify(assoc));
545 }
546 }
547 return copy;
548 }
549
550 public int getPrerequisiteCount()
551 {

Callers 1

getBonusListMethod · 0.80

Calls 3

addMethod · 0.65
cloneMethod · 0.45
replaceAllMethod · 0.45

Tested by

no test coverage detected