本文整理匯總了Java中org.apache.commons.configuration.HierarchicalConfiguration.containsKey方法的典型用法代碼示例。如果您正苦於以下問題:Java HierarchicalConfiguration.containsKey方法的具體用法?Java HierarchicalConfiguration.containsKey怎麽用?Java HierarchicalConfiguration.containsKey使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.commons.configuration.HierarchicalConfiguration
的用法示例。
在下文中一共展示了HierarchicalConfiguration.containsKey方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getInterfaceMode
import org.apache.commons.configuration.HierarchicalConfiguration; //導入方法依賴的package包/類
private static DeviceInterfaceDescription.Mode
getInterfaceMode(HierarchicalConfiguration intfConfig) {
if (intfConfig.containsKey(TRUNK_MODE_KEY)) {
return DeviceInterfaceDescription.Mode.TRUNK;
} else if (intfConfig.containsKey(ACCESS_KEY)) {
return DeviceInterfaceDescription.Mode.ACCESS;
} else {
return DeviceInterfaceDescription.Mode.NORMAL;
}
}
示例2: configSuccess
import org.apache.commons.configuration.HierarchicalConfiguration; //導入方法依賴的package包/類
/**
* Parses a config reply and returns the result.
* @param reply a tree-like source
* @return the configuration result
*/
public static boolean configSuccess(HierarchicalConfiguration reply) {
if (reply != null) {
if (reply.containsKey("ok")) {
return true;
}
}
return false;
}
示例3: getVlanForAccess
import org.apache.commons.configuration.HierarchicalConfiguration; //導入方法依賴的package包/類
private static VlanId getVlanForAccess(HierarchicalConfiguration intfConfig) {
if (intfConfig.containsKey(ACCESS_KEY)) {
return VlanId.vlanId(intfConfig.getString(ACCESS_KEY));
}
return null;
}
示例4: getVlansForTrunk
import org.apache.commons.configuration.HierarchicalConfiguration; //導入方法依賴的package包/類
private static List<VlanId> getVlansForTrunk(HierarchicalConfiguration intfConfig) {
if (intfConfig.containsKey(TRUNK_VLAN_KEY)) {
return parseVlans(intfConfig.getStringArray(TRUNK_VLAN_KEY));
}
return null;
}
示例5: getInterfaceLimit
import org.apache.commons.configuration.HierarchicalConfiguration; //導入方法依賴的package包/類
private static short getInterfaceLimit(HierarchicalConfiguration intfConfig) {
if (intfConfig.containsKey(RATE_LIMIT_KEY)) {
return intfConfig.getShort(RATE_LIMIT_KEY);
}
return NO_LIMIT;
}