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

Method clone

code/src/java/pcgen/cdom/base/CDOMObject.java:1034–1062  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1032 }
1033
1034 @Override
1035 public CDOMObject clone() throws CloneNotSupportedException
1036 {
1037 CDOMObject clone = (CDOMObject) super.clone();
1038 clone.integerChar = integerChar == null ? null : new HashMap<>(integerChar);
1039 clone.stringChar = stringChar == null ? null : new EnumMap<>(stringChar);
1040 clone.formulaChar = formulaChar == null ? null : new HashMap<>(formulaChar);
1041 clone.variableChar = variableChar == null ? null : new HashMap<>(variableChar);
1042 clone.objectChar = objectChar == null ? null : new HashMap<>(objectChar);
1043 clone.factChar = factChar == null ? null : new HashMap<>(factChar);
1044 if (listChar != null)
1045 {
1046 clone.listChar = new ListKeyMapToList();
1047 clone.listChar.addAllLists(listChar);
1048 }
1049 if (factSetChar != null)
1050 {
1051 clone.factSetChar = new FactSetKeyMapToList();
1052 clone.factSetChar.addAllLists(factSetChar);
1053 }
1054 if (mapChar != null)
1055 {
1056 clone.mapChar = new MapKeyMap();
1057 clone.mapChar.putAll(mapChar);
1058 }
1059 clone.cdomListMods = cdomListMods == null ? null : cdomListMods.clone();
1060 clone.ownBonuses(clone);
1061 return clone;
1062 }
1063
1064 public void removeAllFromList(CDOMReference<? extends CDOMList<?>> listRef)
1065 {

Callers 6

processMethod · 0.95
ownBonusesMethod · 0.45
getCopyForNewOwnerMethod · 0.45
getAutoEquipmentMethod · 0.45
getCopyForNewOwnerMethod · 0.45
getCopyForNewOwnerMethod · 0.45

Calls 3

ownBonusesMethod · 0.95
addAllListsMethod · 0.65
putAllMethod · 0.45

Tested by

no test coverage detected