本文整理汇总了Java中com.trollworks.toolkit.utility.text.Numbers.formatWithForcedSign方法的典型用法代码示例。如果您正苦于以下问题:Java Numbers.formatWithForcedSign方法的具体用法?Java Numbers.formatWithForcedSign怎么用?Java Numbers.formatWithForcedSign使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.trollworks.toolkit.utility.text.Numbers
的用法示例。
在下文中一共展示了Numbers.formatWithForcedSign方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAmountAsString
import com.trollworks.toolkit.utility.text.Numbers; //导入方法依赖的package包/类
/** @return The amount, as a {@link String}. */
public String getAmountAsString() {
if (mInteger) {
return Numbers.formatWithForcedSign(getIntegerAmount());
}
return Numbers.formatWithForcedSign(mAmount);
}
示例2: getSkillDisplayLevel
import com.trollworks.toolkit.utility.text.Numbers; //导入方法依赖的package包/类
/**
* Creates a string suitable for displaying the level.
*
* @param level The skill level.
* @param relativeLevel The relative skill level.
* @param attribute The attribute the skill is based on.
* @param isContainer Whether this skill is a container or not.
* @return The formatted string.
*/
public static String getSkillDisplayLevel(int level, int relativeLevel, SkillAttribute attribute, boolean isContainer) {
if (isContainer) {
return EMPTY;
}
if (level < 0) {
return "-"; //$NON-NLS-1$
}
return Numbers.format(level) + SLASH + attribute + Numbers.formatWithForcedSign(relativeLevel);
}
示例3: getDisplayLevel
import com.trollworks.toolkit.utility.text.Numbers; //导入方法依赖的package包/类
private static String getDisplayLevel(SkillAttribute attribute, int level, int relativeLevel) {
if (level < 0) {
return "-"; //$NON-NLS-1$
}
return Numbers.format(level) + "/" + attribute + Numbers.formatWithForcedSign(relativeLevel); //$NON-NLS-1$
}
示例4: getTechniqueDisplayLevel
import com.trollworks.toolkit.utility.text.Numbers; //导入方法依赖的package包/类
/**
* Creates a string suitable for displaying the level.
*
* @param level The skill level.
* @param relativeLevel The relative skill level.
* @param modifier The modifer to the skill level.
* @return The formatted string.
*/
public static String getTechniqueDisplayLevel(int level, int relativeLevel, int modifier) {
if (level < 0) {
return "-"; //$NON-NLS-1$
}
return Numbers.format(level) + "/" + Numbers.formatWithForcedSign(relativeLevel + modifier); //$NON-NLS-1$
}