Java Code Examples for org.apache.commons.collections.KeyValue#getValue()
The following examples show how to use
org.apache.commons.collections.KeyValue#getValue() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VSensorConfig.java From gsn with GNU General Public License v3.0 | 5 votes |
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; }
Example 2
Source File: VSensorConfig.java From gsn with GNU General Public License v3.0 | 5 votes |
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; }
Example 3
Source File: AddressBean.java From gsn with GNU General Public License v3.0 | 5 votes |
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."); }
Example 4
Source File: AddressBean.java From gsn with GNU General Public License v3.0 | 5 votes |
/** * 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; }
Example 5
Source File: SingletonMap.java From Penetration_Testing_POC with Apache License 2.0 | 4 votes |
/** * Constructor specifying the key and value as a <code>KeyValue</code>. * * @param keyValue the key value pair to use */ public SingletonMap(KeyValue keyValue) { super(); this.key = keyValue.getKey(); this.value = keyValue.getValue(); }
Example 6
Source File: DefaultMapEntry.java From Penetration_Testing_POC with Apache License 2.0 | 2 votes |
/** * Constructs a new entry from the specified KeyValue. * * @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()); }
Example 7
Source File: UnmodifiableMapEntry.java From Penetration_Testing_POC with Apache License 2.0 | 2 votes |
/** * Constructs a new entry from the specified KeyValue. * * @param pair the pair to copy, must not be null * @throws NullPointerException if the entry is null */ public UnmodifiableMapEntry(final KeyValue pair) { super(pair.getKey(), pair.getValue()); }
Example 8
Source File: DefaultKeyValue.java From Penetration_Testing_POC with Apache License 2.0 | 2 votes |
/** * Constructs a new pair from the specified KeyValue. * * @param pair the pair to copy, must not be null * @throws NullPointerException if the entry is null */ public DefaultKeyValue(final KeyValue pair) { super(pair.getKey(), pair.getValue()); }