com.artima.place
Interface ModifiableLinkMap

All Superinterfaces:
LinkMap

public interface ModifiableLinkMap
extends LinkMap

Represents a modifiable map of links to services on the network.


Method Summary
 void clear()
          Removes all mapping from this LinkMap.
 LinkItem put(int keyValue, LinkItem value)
          Convenience method that associates the specified value with the Integer key whose int value equals the int specified keyValue.
 java.lang.Object put(LinkItem value)
          Associates the specified value in this LinkMap with a new unique key selected by this method.
 LinkItem put(java.lang.Object key, LinkItem value)
          Associates the specified value with the specified key in this LinkMap.
 void putAll(LinkMap map)
          Copies all of the mappings from the specified LinkMap to this LinkMap.
 LinkItem remove(java.lang.Object key)
          Removes the mapping for this key from this LinkMap if present.
 LinkItem update(java.lang.Object key, InfoBundle infoBundle)
          Associates the specified InfoBundle with the Link that is associated with the specified key in this LinkMap.
 
Methods inherited from interface com.artima.place.LinkMap
containsAllKeys, containsAllLinkItems, containsKey, containsKey, containsLinkItem, get, get, isEmpty, keyIterator, keySetSize, linkItemIterator, size
 

Method Detail

clear

public void clear()
           throws java.rmi.RemoteException
Removes all mapping from this LinkMap.
Throws:
java.rmi.RemoteException - if a network problem prevents this method from fulfilling its contractual obligations

put

public LinkItem put(java.lang.Object key,
                    LinkItem value)
             throws java.rmi.RemoteException
Associates the specified value with the specified key in this LinkMap.
Parameters:
key - the key with which to associate the specified LinkItem value in this LinkMap.
value - the LinkItem value to associate with the specified key in this LinkMap.
Returns:
the LinkItem with which the key was previously associated, or null if there was no mapping for the key.
Throws:
java.rmi.RemoteException - if a network problem prevents this method from fulfilling its contractual obligations

put

public LinkItem put(int keyValue,
                    LinkItem value)
             throws java.rmi.RemoteException
Convenience method that associates the specified value with the Integer key whose int value equals the int specified keyValue.
Parameters:
key - the key with which (in Integer form) to associate the specified LinkItem value in this LinkMap.
value - the LinkItem value to associate with the specified key in this LinkMap.
Returns:
the LinkItem with which the key was previously associated, or null if there was no mapping for the key.
Throws:
java.rmi.RemoteException - if a network problem prevents this method from fulfilling its contractual obligations

put

public java.lang.Object put(LinkItem value)
                     throws java.rmi.RemoteException
Associates the specified value in this LinkMap with a new unique key selected by this method.
Parameters:
value - the LinkItem value to associate with a randomly selected new key in this LinkMap.
Returns:
the key with which the LinkItem was associated.
Throws:
java.rmi.RemoteException - if a network problem prevents this method from fulfilling its contractual obligations

update

public LinkItem update(java.lang.Object key,
                       InfoBundle infoBundle)
                throws java.rmi.RemoteException
Associates the specified InfoBundle with the Link that is associated with the specified key in this LinkMap.
Parameters:
key - the key with which to associate the specified LinkItem value in this LinkMap.
value - the LinkItem value to associate with the specified key in this LinkMap.
Returns:
the updated LinkItem.
Throws:
java.rmi.RemoteException - if a network problem prevents this method from fulfilling its contractual obligations
NoSuchElementException - if the key is not associated with any LinkItem in this ModifiableLinkMap

putAll

public void putAll(LinkMap map)
            throws java.rmi.RemoteException
Copies all of the mappings from the specified LinkMap to this LinkMap.
Parameters:
map - the LinkMap from which to copy mappings to this LinkMap.
Throws:
java.rmi.RemoteException - if a network problem prevents this method from fulfilling its contractual obligations.

remove

public LinkItem remove(java.lang.Object key)
                throws java.rmi.RemoteException
Removes the mapping for this key from this LinkMap if present.
Parameters:
key - the key whose mapping is to be removed from this LinkMap.
Returns:
the removed LinkItem, or null if there was no mapping for this key.
Throws:
java.rmi.RemoteException - if a network problem prevents this method from fulfilling its contractual obligations