1,11 → 1,13 |
package ak.hostadmiral.core.config; |
|
import java.util.List; |
import java.util.Iterator; |
import java.util.ArrayList; |
|
public class ConfigInitialization |
{ |
private String className; |
private boolean ignore = false; |
private List params = new ArrayList(); // List(ConfigInitParam) |
|
public String getClassName() |
18,6 → 20,21 |
this.className = className; |
} |
|
public boolean getIgnore() |
{ |
return ignore; |
} |
|
public void setIgnore(boolean ignore) |
{ |
this.ignore = ignore; |
} |
|
public void setIgnore(String ignore) |
{ |
this.ignore = Boolean.valueOf(ignore).booleanValue(); |
} |
|
public List getInitParam() |
{ |
return params; |
28,8 → 45,33 |
params.add(param); |
} |
|
public boolean equals(Object obj) |
{ |
if(!(obj instanceof ConfigInitialization)) return false; |
|
ConfigInitialization second = (ConfigInitialization)obj; |
|
return (this.className != null && second.className != null |
&& this.className.equals(second.className)); |
} |
|
public int hashCode() |
{ |
if(className == null) |
return 0; |
else |
return className.hashCode(); |
} |
|
public String toString() |
{ |
return "\t\tinitialization " + className + ": " + params + "\n"; |
StringBuffer paramsStr = new StringBuffer(); |
for(Iterator i = params.iterator(); i.hasNext(); ) { |
ConfigInitParam p = (ConfigInitParam)i.next(); |
paramsStr.append(p); |
} |
|
return "\t\t" + className + (ignore ? " (ignore)" : "") + ":\n" |
+ paramsStr.toString() + "\n"; |
} |
} |