55 lines
1.9 KiB
Java
55 lines
1.9 KiB
Java
|
|
/*
|
||
|
|
* Copyright (c) 2002,2009 Declarative Engineering LLC.
|
||
|
|
* All rights reserved. This program and the accompanying materials
|
||
|
|
* are made available under the terms of the Declarative Engineering LLC
|
||
|
|
* verson 1 which accompanies this distribution, and is available at
|
||
|
|
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||
|
|
*/
|
||
|
|
package com.common.util.optimized;
|
||
|
|
|
||
|
|
import com.common.util.*;
|
||
|
|
|
||
|
|
public interface IIntObjectHashMap extends IMap {
|
||
|
|
public static final int NULL_VALUE = -2147483648;
|
||
|
|
/**
|
||
|
|
* Determines whether the key exists in the map.
|
||
|
|
* @param key The key to look for.
|
||
|
|
* @return Will be <code>true</code> if the key is already in the map.
|
||
|
|
*/
|
||
|
|
public boolean containsKey(int key);
|
||
|
|
/**
|
||
|
|
* Gets an object in the map by its' key.
|
||
|
|
* @param key The key whose value should be retieved.
|
||
|
|
* @return The value associated with the key. A <code>null</code> value will be returned only if the key was not found.
|
||
|
|
*/
|
||
|
|
public Object get(int key);
|
||
|
|
/**
|
||
|
|
* Gets an iterator over the keys contained in this collection.
|
||
|
|
* @return An iterator over the map keys.
|
||
|
|
*/
|
||
|
|
public IIntIterator keyIterator();
|
||
|
|
/**
|
||
|
|
* Puts a key/value pair in the map.
|
||
|
|
* The value can be retrieved later with the given key.
|
||
|
|
* @param key The key that will be used to map the value.
|
||
|
|
* @param value The value stored in map.
|
||
|
|
* @return The value previously associated with the key.
|
||
|
|
*/
|
||
|
|
public Object put(int key, Object value);
|
||
|
|
/**
|
||
|
|
* Removes a key/value pair from the map.
|
||
|
|
* @param key The key that should be removed (with its' value) from the map.
|
||
|
|
* @return The value removed from map. A <code>null</code> value is returned if the key was not found.
|
||
|
|
*/
|
||
|
|
public Object remove(int key);
|
||
|
|
/**
|
||
|
|
* Removes all key/value pairs from the map.
|
||
|
|
* @return Will be <code>true</code> if the method was successful.
|
||
|
|
*/
|
||
|
|
public boolean removeAll();
|
||
|
|
/**
|
||
|
|
* Gets an iterator over the values contained in this collection.
|
||
|
|
* @return An iterator over the map values.
|
||
|
|
*/
|
||
|
|
public IIterator valueIterator();
|
||
|
|
}//IIntObjectHashMap//
|