org.eclipse.webdav.client
Class URLTable

java.lang.Object
  extended by org.eclipse.webdav.client.URLTable

public class URLTable
extends Object

A URLTable is a simple hashtable whose keys are URLs. A URL key with a trailing slash is considered by the table to be equal to the same URL without a trailing slash.

Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.


Constructor Summary
URLTable()
          Construct an empty URLTable.
URLTable(int size)
          Construct an empty URLTable with the given size.
 
Method Summary
 Object get(String url)
          Returns the value to which the given URL is mapped to in the table.
 Object get(URL url)
          Returns the value to which the given URL is mapped to in the table.
 Enumeration keys()
          Returns an Enumeration over the keys in this URLTable.
 void put(String url, Object value)
          Maps the given URL to the given value in this table.
 void put(URL url, Object value)
          Maps the given URL to the given value in this table.
 void remove(String url)
           
 void remove(URL url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLTable

public URLTable()
Construct an empty URLTable.


URLTable

public URLTable(int size)
Construct an empty URLTable with the given size.

Method Detail

get

public Object get(String url)
           throws MalformedURLException
Returns the value to which the given URL is mapped to in the table. If the given URL not mapped to any value, or is malformed, returns null.

Parameters:
url - a URL as a String
Returns:
the value to which the given URL is mapped to in the table, or null
Throws:
MalformedURLException - if the given URL is malformed

get

public Object get(URL url)
Returns the value to which the given URL is mapped to in the table. If the given URL not mapped to any value, returns null.

Parameters:
url - a URL
Returns:
the value to which the given URL is mapped to in the table, or null

keys

public Enumeration keys()
Returns an Enumeration over the keys in this URLTable.

Returns:
an Enumeration over URLs

put

public void put(String url,
                Object value)
         throws MalformedURLException
Maps the given URL to the given value in this table.

Parameters:
url - a URL as a String
value - an object
Throws:
MalformedURLException - if the given URL is malformed

put

public void put(URL url,
                Object value)
Maps the given URL to the given value in this table.

Parameters:
url - a URL
value - an object

remove

public void remove(String url)
            throws MalformedURLException
Throws:
MalformedURLException

remove

public void remove(URL url)


Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.