本文整理汇总了Java中org.apache.commons.collections.KeyValue.getValue方法的典型用法代码示例。如果您正苦于以下问题:Java KeyValue.getValue方法的具体用法?Java KeyValue.getValue怎么用?Java KeyValue.getValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.collections.KeyValue
的用法示例。
在下文中一共展示了KeyValue.getValue方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRPCFriendlyAddressing
import org.apache.commons.collections.KeyValue; //导入方法依赖的package包/类
public String[][] getRPCFriendlyAddressing() {
String[][] toReturn = new String[this.addressing.length][2] ;
for(int i=0;i<toReturn.length;i++)
for (KeyValue val : this.addressing) {
toReturn[i][0] = ( String ) val.getKey( );
toReturn[i][1] = ( String ) val.getValue( );
}
return toReturn;
}
示例2: getAddressingValues
import org.apache.commons.collections.KeyValue; //导入方法依赖的package包/类
public String [ ] getAddressingValues ( ) {
final String result[] = new String [ this.getAddressing( ).length ];
int counter = 0;
for ( final KeyValue predicate : this.getAddressing( ) )
result[ counter++ ] = ( String ) predicate.getValue( );
return result;
}
示例3: getPredicateValueWithException
import org.apache.commons.collections.KeyValue; //导入方法依赖的package包/类
public String getPredicateValueWithException ( String key ) {
key = key.trim( );
for ( KeyValue predicate : this.predicates ) {
if ( predicate.getKey( ).toString( ).trim( ).equalsIgnoreCase( key ) ) {
final String value = ( String ) predicate.getValue( );
if (value.trim().length()>0)
return ( value);
}
}
throw new RuntimeException("The required parameter: >"+key+"<+ is missing.from the virtual sensor configuration file.");
}
示例4: getPredicateValue
import org.apache.commons.collections.KeyValue; //导入方法依赖的package包/类
/**
* Note that the key for the value is case insensitive.
*
* @param key
* @return
*/
public String getPredicateValue ( String key ) {
key = key.trim( );
for ( KeyValue predicate : this.predicates ) {
if ( predicate.getKey( ).toString( ).trim( ).equalsIgnoreCase( key ) ) return ( ( String ) predicate.getValue( ));
}
return null;
}
示例5: evaluate
import org.apache.commons.collections.KeyValue; //导入方法依赖的package包/类
public void evaluate(LoggedInInfo loggedInInfo, Denominator deno, Numerator numer,List<KeyValue> additionalFields){
denominator = deno;
numerator = numer;
List demoList = deno.getDenominatorList();
denominatorCount = demoList.size();
setReportResultList(new ArrayList<Hashtable<String,Object>>());
for (int i = 0; i < demoList.size(); i++){
String demo = (String) demoList.get(i);
boolean bool = numer.evaluate(loggedInInfo, demo);
//Object obj = numer.getOutputValues(); // PROBLEM IS THAT THIS WILL ALWAYS HAVE A VALUE
Hashtable<String,Object> h = new Hashtable<String,Object>();
h.put("_demographic_no",demo);
h.put("_report_result",new Boolean(bool));
if (additionalFields != null){
for(KeyValue field:additionalFields){
String key = (String) field.getKey();
String val = (String) field.getValue();
EctMeasurementsDataBeanHandler ect = new EctMeasurementsDataBeanHandler(Integer.valueOf(demo), val);
Collection<EctMeasurementsDataBean> v = ect.getMeasurementsDataVector();
//Execute for the value and attach it to the key in the hashtable
//Object obj =
if(v.iterator().hasNext()){
h.put(key, v.iterator().next());
}
}
}
getReportResultList().add(h);
// if (obj != null){
// getReportResultList().add(obj);
// }
if (bool){
numeratorCount++;
}
}
}
示例6: evaluate
import org.apache.commons.collections.KeyValue; //导入方法依赖的package包/类
public void evaluate(Denominator deno, Numerator numer,List<KeyValue> additionalFields){
denominator = deno;
numerator = numer;
List demoList = deno.getDenominatorList();
denominatorCount = demoList.size();
setReportResultList(new ArrayList<Hashtable<String,Object>>());
for (int i = 0; i < demoList.size(); i++){
String demo = (String) demoList.get(i);
boolean bool = numer.evaluate(demo);
//Object obj = numer.getOutputValues(); // PROBLEM IS THAT THIS WILL ALWAYS HAVE A VALUE
Hashtable<String,Object> h = new Hashtable<String,Object>();
h.put("_demographic_no",demo);
h.put("_report_result",new Boolean(bool));
if (additionalFields != null){
for(KeyValue field:additionalFields){
String key = (String) field.getKey();
String val = (String) field.getValue();
EctMeasurementsDataBeanHandler ect = new EctMeasurementsDataBeanHandler(demo, val);
Collection<EctMeasurementsDataBean> v = ect.getMeasurementsDataVector();
//Execute for the value and attach it to the key in the hashtable
//Object obj =
if(v.iterator().hasNext()){
h.put(key, v.iterator().next());
}
}
}
getReportResultList().add(h);
// if (obj != null){
// getReportResultList().add(obj);
// }
if (bool){
numeratorCount++;
}
}
}
示例7: DefaultMapEntry
import org.apache.commons.collections.KeyValue; //导入方法依赖的package包/类
/**
* Constructs a new entry from the specified <code>KeyValue</code>.
*
* @param pair the pair to copy, must not be null
* @throws NullPointerException if the entry is null
*/
public DefaultMapEntry(final KeyValue pair) {
super(pair.getKey(), pair.getValue());
}