当前位置: 首页>>代码示例>>Java>>正文


Java KeyValue.getKey方法代码示例

本文整理汇总了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;
}
 
开发者ID:LSIR,项目名称:gsn,代码行数:10,代码来源:VSensorConfig.java

示例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;
}
 
开发者ID:LSIR,项目名称:gsn,代码行数:8,代码来源:VSensorConfig.java

示例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++;
            }

        }

    }
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:44,代码来源:ReportEvaluator.java

示例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++;
            }

        }

    }
 
开发者ID:oscarservice,项目名称:oscar-old,代码行数:44,代码来源:ReportEvaluator.java

示例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());
}
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:10,代码来源:DefaultMapEntry.java


注:本文中的org.apache.commons.collections.KeyValue.getKey方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。