Gets the nameFromModifiers attribute of the Equipment object @param eqModList The list of modifiers @return The nameFromModifiers value
(final List<EquipmentModifier> eqModList)
| 3898 | * @return The nameFromModifiers value |
| 3899 | */ |
| 3900 | private String getNameFromModifiers(final List<EquipmentModifier> eqModList) |
| 3901 | { |
| 3902 | // |
| 3903 | // Get a sorted list so that the description will always come |
| 3904 | // out the same reguardless of the order we've added the modifiers |
| 3905 | // |
| 3906 | final List<EquipmentModifier> eqList = new ArrayList<>(eqModList); |
| 3907 | Globals.sortPObjectList(eqList); |
| 3908 | |
| 3909 | final StringBuilder sMod = new StringBuilder(70); |
| 3910 | |
| 3911 | eqList.stream().map(eqMod -> eqMod.getSafe(ObjectKey.NAME_OPT).returnName(this, eqMod)).forEach(modDesc -> { |
| 3912 | if (sMod.length() > 0 && !modDesc.isEmpty()) |
| 3913 | { |
| 3914 | sMod.append('/'); |
| 3915 | } |
| 3916 | sMod.append(modDesc); |
| 3917 | }); |
| 3918 | |
| 3919 | return sMod.toString(); |
| 3920 | } |
| 3921 | |
| 3922 | /** |
| 3923 | * Gets the specialAbilityList attribute of the Equipment object |
no test coverage detected