예제 #1
0
  public Multimap<K, V> convertProxy() {
    Multimap<K, V> map = ArrayListMultimap.create();

    for (int i = 0; i < size; i++) {
      map.put(keys[i], values[i]);
    }

    return map;
  }
예제 #2
0
  public void initializeProxy(Multimap<K, V> object) {
    List<K> keyList = new ArrayList<K>();
    List<V> valueList = new ArrayList<V>();

    for (Entry<K, V> entry : object.entries()) {
      keyList.add(entry.getKey());
      valueList.add(entry.getValue());
    }

    size = object.entries().size();

    keys = keyList.toArray(keys);
    values = valueList.toArray(values);
  }