Example usage for org.apache.commons.collections DefaultMapEntry DefaultMapEntry

List of usage examples for org.apache.commons.collections DefaultMapEntry DefaultMapEntry

Introduction

In this page you can find the example usage for org.apache.commons.collections DefaultMapEntry DefaultMapEntry.

Prototype

public DefaultMapEntry(Object key, Object value) 

Source Link

Document

Constructs a new DefaultMapEntry with the given key and given value.

Usage

From source file:com.google.gwt.i18n.MapTestBase.java

/**
 * Utility methods to create an array of Map.Entry objects out of the given
 * key and value arrays./*from   w  ww  . j av  a2 s  .co m*/
 * <P>
 * 
 * @param keys the array of keys
 * @param values the array of values
 * @return an array of Map.Entry of those keys to those values
 */
private Map.Entry[] makeEntryArray(Object[] keys, Object[] values) {
    Map.Entry[] result = new Map.Entry[keys.length];
    for (int i = 0; i < keys.length; i++) {
        result[i] = new DefaultMapEntry(keys[i], values[i]);
    }
    return result;
}