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


Java KeyValue.getValue方法代码示例

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

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

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

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

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

        }

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

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

        }

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

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


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