package org.apache.commons.collections;

import java.util.Map;

public class DefaultMapEntry implements Map.Entry {
  private Object key;
  
  private Object value;
  
  public DefaultMapEntry() {}
  
  public DefaultMapEntry(Object paramObject1, Object paramObject2) {
    this.key = paramObject1;
    this.value = paramObject2;
  }
  
  public boolean equals(Object paramObject) {
    if (paramObject == null)
      return false; 
    if (paramObject == this)
      return true; 
    if (!(paramObject instanceof Map.Entry))
      return false; 
    Map.Entry entry = (Map.Entry)paramObject;
    return !(!((getKey() == null) ? (entry.getKey() == null) : getKey().equals(entry.getKey())) || !((getValue() == null) ? (entry.getValue() == null) : getValue().equals(entry.getValue())));
  }
  
  public Object getKey() {
    return this.key;
  }
  
  public Object getValue() {
    return this.value;
  }
  
  public int hashCode() {
    return ((getKey() == null) ? 0 : getKey().hashCode()) ^ ((getValue() == null) ? 0 : getValue().hashCode());
  }
  
  public void setKey(Object paramObject) {
    this.key = paramObject;
  }
  
  public Object setValue(Object paramObject) {
    Object object = this.value;
    this.value = paramObject;
    return object;
  }
}
