All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rinde.sim.util.Tuple Maven / Gradle / Ivy

There is a newer version: 4.4.6
Show newest version
package rinde.sim.util;

import java.util.Map.Entry;

/**
 * @author Rinde van Lon ([email protected])
 */
@Deprecated
public class Tuple implements Entry {
  protected K key;
  protected V value;

  public Tuple(K key, V value) {
    this.key = key;
    this.value = value;
  }

  @Override
  public K getKey() {
    return key;
  }

  @Override
  public V getValue() {
    return value;
  }

  @Override
  public V setValue(V value) {
    return this.value = value;
  }

  public static  Entry copy(Entry entry) {
    return new Tuple(entry.getKey(), entry.getValue());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy