Files
Brainstorm/Common/src/com/common/util/optimized/ILongObjectHashMap.java
2014-05-30 10:31:51 -07:00

55 lines
2.0 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 ILongObjectHashMap extends IMap {
public static final long NULL_VALUE = -9223372036854775808L;
/**
* 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(long 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(long key);
/**
* Gets an iterator over the keys contained in this collection.
* @return An iterator over the map keys.
*/
public ILongIterator 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(long 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(long 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();
}//ILongObjectHashMap//