本文整理汇总了Java中org.apache.commons.collections.KeyValue.getKey方法的典型用法代码示例。如果您正苦于以下问题:Java KeyValue.getKey方法的具体用法?Java KeyValue.getKey怎么用?Java KeyValue.getKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.collections.KeyValue
的用法示例。
在下文中一共展示了KeyValue.getKey方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: getAddressingKeys
import org.apache.commons.collections.KeyValue; //导入方法依赖的package包/类
public String [ ] getAddressingKeys ( ) {
final String result[] = new String [ this.getAddressing( ).length ];
int counter = 0;
for ( final KeyValue predicate : this.getAddressing( ) )
result[ counter++ ] = ( String ) predicate.getKey( );
return result;
}
示例3: 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++;
}
}
}
示例4: 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++;
}
}
}
示例5: 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());
}