00001 package edu.rice.cs.hpc.data.util; 00002 00003 /*** 00004 * 00005 * interface to retrieve or set user data 00006 * 00007 * methods to implement: 00008 * - get: to retrieve a data 00009 * - put: to store a data 00010 * 00011 */ 00012 public interface IUserData<K,V> { 00013 00014 /*** 00015 * get the value of the key 00016 * if the key doesn't exist, it return null 00017 * 00018 * @param key 00019 * @return 00020 */ 00021 public V get(K key); 00022 00023 /*** 00024 * store the pair key, value 00025 * key cannot be null, and has to be unique 00026 * 00027 * @param key 00028 * @param val 00029 */ 00030 public void put(K key, V val); 00031 00032 }