Java Code Examples for org.apache.commons.collections.KeyValue#getKey()

The following examples show how to use org.apache.commons.collections.KeyValue#getKey() . 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 vote down vote up
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 vote down vote up
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;
}
 
Example 3
Source File: SingletonMap.java    From Penetration_Testing_POC with Apache License 2.0 4 votes vote down vote up
/**
 * 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 4
Source File: DefaultMapEntry.java    From Penetration_Testing_POC with Apache License 2.0 2 votes vote down vote up
/**
 * 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 5
Source File: UnmodifiableMapEntry.java    From Penetration_Testing_POC with Apache License 2.0 2 votes vote down vote up
/**
 * 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 6
Source File: DefaultKeyValue.java    From Penetration_Testing_POC with Apache License 2.0 2 votes vote down vote up
/**
 * 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());
}