Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

oracle.jdeveloper.vcs.spi
Class VCSHashURL

java.lang.Object
  extended by oracle.jdeveloper.vcs.spi.VCSHashURL

public final class VCSHashURL
extends java.lang.Object

Wrapper class for URLs stored in Maps or Collections that may be backed with a hash table or subject to equivalence relations. It is common antipattern to store URLs in data structures that require (or encourage) comparisons of keys or entries. URL.equals(Object) and URL.hashCode both perform host comparison by name resolution through the DNS, which may be inordinately slow. This class provides an equality behavior based on the URL's external form.

Since:
11.1.1.1.0 (Bulldog)

Constructor Summary
VCSHashURL(java.net.URL url)
           
 
Method Summary
static java.util.Collection<VCSHashURL> convertFromURLs(java.util.Collection<java.net.URL> urls)
           
static java.util.Collection<java.net.URL> convertToURLs(java.util.Collection<VCSHashURL> urls)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getExternalForm()
           
 java.net.URL getURL()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VCSHashURL

public VCSHashURL(java.net.URL url)
Method Detail

getURL

public final java.net.URL getURL()

getExternalForm

public final java.lang.String getExternalForm()

equals

public final boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object

convertToURLs

public static final java.util.Collection<java.net.URL> convertToURLs(java.util.Collection<VCSHashURL> urls)

convertFromURLs

public static final java.util.Collection<VCSHashURL> convertFromURLs(java.util.Collection<java.net.URL> urls)

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

Copyright © 1997, 2010, Oracle. All rights reserved.