net.artima.place
Interface LinkMap

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
DynamicLinkMap, ModifiableLinkMap

public interface LinkMap
extends java.io.Serializable

Represents a map of links to resources on the network. If a LinkMap object also implements ModifiableLinkMap, the client may add, remove, and alter the LinkItems contained in the LinkMap. If a LinkMap object also implements DynamicLinkMap, LinkItems may be added to or removed from the LinkMap, and existing LinkItems may be altered, by parties other than the client.


Method Summary
 boolean containsKey(java.lang.Object key)
          Returns true if this LinkMap contains a mapping for the specified key.
 boolean containsValue(LinkItem value)
          Returns true if this LinkMap maps one or more keys to the specified value.
 LinkItem get(java.lang.Object key)
          Returns the LinkItem value to which this LinkMap maps the specified Object key.
 boolean isEmpty()
          Returns true if this map contains no key-value mappings.
 java.util.Set keySet()
          Returns an unmodifiable set view of the keys contained in this map.
 int size()
          Returns the number of key-value mappings in this map.
 java.util.Collection values()
          Returns a collection view of the values contained in this LinkMap.
 

Method Detail

get

public LinkItem get(java.lang.Object key)
             throws java.rmi.RemoteException
Returns the LinkItem value to which this LinkMap maps the specified Object key.

containsKey

public boolean containsKey(java.lang.Object key)
                    throws java.rmi.RemoteException
Returns true if this LinkMap contains a mapping for the specified key.

containsValue

public boolean containsValue(LinkItem value)
                      throws java.rmi.RemoteException
Returns true if this LinkMap maps one or more keys to the specified value.

isEmpty

public boolean isEmpty()
                throws java.rmi.RemoteException
Returns true if this map contains no key-value mappings.

keySet

public java.util.Set keySet()
                     throws java.rmi.RemoteException
Returns an unmodifiable set view of the keys contained in this map. The returned set is a snapshot of the LinkItem keys contained in the LinkMap. If changes occur to this LinkMap after this method returns, which is possible if this object is a DynamicLinkMap or a ModifiableLinkMap, those changes will not be reflected in the returned Collection. In other words, if an iteration over the returned Collection is in progress when this LinkMap is changed, those changes will not affect or alter the result of the iteration. The iteration will continue to work, but will yield a stale snapshot of the LinkMap.

size

public int size()
         throws java.rmi.RemoteException
Returns the number of key-value mappings in this map.

values

public java.util.Collection values()
                            throws java.rmi.RemoteException
Returns a collection view of the values contained in this LinkMap. The returned collection is a snapshot of the LinkItem values contained in the LinkMap. If changes occur to this LinkMap after this method returns, which is possible if this object is a DynamicLinkMap or a ModifiableLinkMap, those changes will not be reflected in the returned Collection. In other words, if an iteration over the returned Collection is in progress when this LinkMap is changed, those changes will not affect or alter the result of the iteration. The iteration will continue to work, but will yield a stale snapshot of the LinkMap.