001package com.killcoding.tool;
002
003import java.io.File;
004
005public class ConfigCustomLoad {
006    
007    protected Runnable loadRun = null;
008    protected ConfigProperties config = null;
009    protected File file = null;
010    protected boolean updated = false;
011    protected boolean useCustom = true;
012    
013    public ConfigCustomLoad(){
014        super();
015    }
016    
017    public void load(Runnable loadRun){
018        this.loadRun = loadRun;
019    }
020    
021    public void load(){
022         
023    }
024    
025    protected void load(File file,ConfigProperties config){
026        this.file = file;
027        this.config = config;
028        
029        if(this.loadRun != null) this.loadRun.run();
030        
031        load();
032    }
033    
034    public ConfigProperties getConfig(){
035        return config;
036    }
037    
038    public File getFile(){
039        return file;
040    }
041    
042    public void setUpdated(boolean updated){
043        this.updated = updated;
044    }
045
046    public boolean isUpdated(){
047        return this.updated;
048    }   
049    
050    public void setUseCustom(boolean useCustom){
051        this.useCustom = useCustom;
052    }
053    
054    public boolean isUseCustom(){
055        return useCustom;
056    }
057    
058}