com.github.houbb.number.api.impl.Number Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of number Show documentation
Show all versions of number Show documentation
The number tool for java.
package com.github.houbb.number.api.impl;
import com.github.houbb.heaven.annotation.ThreadSafe;
import com.github.houbb.number.api.INumber;
import com.github.houbb.number.api.INumberContext;
import com.github.houbb.number.support.format.INumberFormat;
/**
* @author binbin.hou
* @since 0.0.1
*/
@ThreadSafe
public class Number implements INumber {
/**
* 转为汉字
*
* @param context 上下文
* @return 结果
* @since 0.0.1
*/
@Override
public String format(final INumberContext context) {
final String text = context.text();
final INumberFormat numberFormat = context.format();
return numberFormat.format(text);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy