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

Method getEqModifierString

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

return the list of modifier keys as a period-delimeted string @param bPrimary Description of the Parameter @return The eqModifierString value

(final boolean bPrimary)

Source from the content-addressed store, hash-verified

3800 * @return The eqModifierString value
3801 */
3802 private String getEqModifierString(final boolean bPrimary)
3803 {
3804 final List<EquipmentModifier> eqModList = getEqModifierList(bPrimary);
3805 final StringBuilder aString = new StringBuilder(eqModList.size() * 10);
3806
3807 for (EquipmentModifier eqMod : eqModList)
3808 {
3809 if (aString.length() != 0)
3810 {
3811 aString.append('.');
3812 }
3813
3814 aString.append(eqMod.getKeyName());
3815
3816 // Add the modifiers
3817 for (String strMod : getAssociationList(eqMod))
3818 {
3819 aString.append('|').append(strMod.replace('|', '='));
3820 }
3821 }
3822
3823 if (bPrimary)
3824 {
3825 BigDecimal mod = get(ObjectKey.WEIGHT_MOD);
3826 if (mod != null)
3827 {
3828 if (aString.length() != 0)
3829 {
3830 aString.append('.');
3831 }
3832 aString.append(EQMOD_WEIGHT).append('|').append(mod.toString().replace('.', ','));
3833 }
3834 }
3835
3836 String dmg = get(StringKey.DAMAGE_OVERRIDE);
3837 if (dmg != null)
3838 {
3839 if (aString.length() != 0)
3840 {
3841 aString.append('.');
3842 }
3843 aString.append(EQMOD_DAMAGE).append('|').append(dmg.replace('.', ','));
3844 }
3845 return aString.toString();
3846 }
3847
3848 /**
3849 * Set the Type this item will be indexed under

Callers 1

formatSaveLineMethod · 0.95

Calls 8

getEqModifierListMethod · 0.95
getAssociationListMethod · 0.95
sizeMethod · 0.65
getKeyNameMethod · 0.65
getMethod · 0.65
toStringMethod · 0.65
appendMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected