src.gov.nasa.worldwind.avlist.AVList Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of worldwindx Show documentation
Show all versions of worldwindx Show documentation
World Wind is a collection of components that interactively display 3D geographic information within Java applications or applets.
/*
* Copyright (C) 2012 United States Government as represented by the Administrator of the
* National Aeronautics and Space Administration.
* All Rights Reserved.
*/
package gov.nasa.worldwind.avlist;
import java.util.*;
/**
* An interface for managing an attribute-value pair collection.
*
* @author Tom Gaskins
* @version $Id: AVList.java 1171 2013-02-11 21:45:02Z dcollins $
*/
public interface AVList
{
/**
* Adds a key/value pair to the list. Replaces an existing key/value pair if the list already contains the key.
*
* @param key the attribute name. May not be null
.
* @param value the attribute value. May be null
, in which case any existing value for the key is
* removed from the collection.
*
* @return previous value associated with specified key, or null if there was no mapping for key. A null return can
* also indicate that the map previously associated null with the specified key, if the implementation
* supports null values.
*
* @throws NullPointerException if key
is null
.
*/
Object setValue(String key, Object value);
/**
* Adds the contents of another attribute-value list to the list. Replaces an existing key/value pair if the list
* already contains the key.
*
* @param avList the list to copy. May not be null
.
*
* @return this
, a self reference.
*
* @throws NullPointerException if avList
is null
.
*/
AVList setValues(AVList avList);
/**
* Returns the value for a specified key.
*
* @param key the attribute name. May not be null
.
*
* @return the attribute value if one exists in the collection, otherwise null
.
*
* @throws NullPointerException if key
is null
.
*/
Object getValue(String key);
Collection