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

com.base4j.util.setting.AbstractAbsSetting Maven / Gradle / Ivy

The newest version!
package com.base4j.util.setting;

import java.net.URL;
import java.nio.charset.Charset;

import com.base4j.util.getter.AbstractOptNullBasicTypeFromStringGetter;

/**
 * 设定抽象类
 *
 * @author Looly
 */
public abstract class AbstractAbsSetting extends AbstractOptNullBasicTypeFromStringGetter {

    /**
     * 本设置对象的字符集
     */
    protected Charset charset;
    /**
     * 是否使用变量
     */
    protected boolean isUseVariable;
    /**
     * 设定文件的URL
     */
    protected URL settingUrl;

    @Override
    public abstract String getStr(String key, String defaultValue);

    /**
     * @return 配置文件大小(key的个数)
     */
    public abstract int size();

    /**
     * @return 是否为空
     */
    public boolean isEmpty() {
        return size() == 0;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy