/*
 * Created on Jan 29, 2005
 *
 * Advanced Data Management Group
 * Center for Advanced Computing and Informatics Studies
 * University of Puerto Rico, Mayaguez
 * 
 */
package ece.uprm.admg.cs2.util;


public class DynamicMap implements Map {
//////////////////////////DO NOT MODIFY THIS CODE ////////////////////////////////////////////////
    //Inner class for storing the entries in the map
    /**
     * MapEntry is an inner class used to store the 
     *
     */
    private class MapEntry{
        //Private Fields
        private Object value;
        private Object key;
        private boolean inUse;
        
        private MapEntry(){
            this.key = null;
            this.value = null;
            this.inUse = false;
            
        }
        
        private MapEntry(Object key, Object value){
            this.key = key;
            this.value = value;
            this.inUse = true;
        }
        // Getters and Setters
        
      
        private Object getKey(){
            return key;
        }
        private Object getValue(){
            return value;
        }
        
        
        private void setValue(Object value){
            this.value = value;
        }
        
        private void setKey(Object key){
            this.key = key;
        }
        
        private boolean isInUse(){
            return inUse;
        }
        
        private void setInUse(){
            this.inUse = true;
        }
        
        private void setFree(){
            this.inUse = false;
        }
    }
/////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////  ADD YOUR CODE HERE ////////////////////////////////////////   
}
