Skip navigation links
oracle.jdeveloper.vcs.spi
Class VCSHashURL
java.lang.Object
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)
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
VCSHashURL
public VCSHashURL(java.net.URL url)
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)
Skip navigation links
Copyright © 1997, 2013, Oracle. All rights reserved.