package org.apache.hadoop.conf;
/** Base class for things that may be configured with a {@link Configuration}. */
/** Construct a Configured. */
public Configured() {
this(null);
}
/** Construct a Configured. */
public Configured(Configuration conf) {
setConf(conf);
}
// inherit javadoc
public void setConf(Configuration conf) {
this.conf = conf;
}
// inherit javadoc
public Configuration getConf() {
return conf;
/** Base class for things that may be configured with a {@link Configuration}. */
public class Configured implements Configurable {
/** Construct a Configured. */
public Configured() {
this(null);
}
/** Construct a Configured. */
public Configured(Configuration conf) {
setConf(conf);
}
// inherit javadoc
public void setConf(Configuration conf) {
this.conf = conf;
}
// inherit javadoc
public Configuration getConf() {
return conf;
}
这个类里面就两个方法,只是简单地实现了Configurable,它和Configuration类还是有区别的,目前来说,我还不知道这两个类应用上的差别,我知识知道这里面有的方法那里面没有,以后再补充。