All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.houbb.number.api.impl.Number Maven / Gradle / Ivy

There is a newer version: 0.0.3
Show newest version
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