public class BasicURLComparator extends Object implements URIComparator
URIComparator
that compares
URL's by canonicalizing them as per SimpleURLCanonicalizer
,
and then compares the resulting string representations for equality
using Object.equals(java.lang.Object)
. If isCaseInsensitive()
is true,
then the equality test is instead performed using String.equalsIgnoreCase(String)
.Modifier and Type | Field and Description |
---|---|
private boolean |
caseInsensitive
The case-insensitivity flag.
|
Constructor and Description |
---|
BasicURLComparator() |
Modifier and Type | Method and Description |
---|---|
boolean |
compare(String uri1,
String uri2)
Compare two URI's (represented as strings) for equivalence.
|
boolean |
isCaseInsensitive()
Get the case-insensitivity flag value.
|
void |
setCaseInsensitive(boolean flag)
Set the case-insensitivity flag value.
|
public boolean isCaseInsensitive()
public void setCaseInsensitive(boolean flag)
flag
- The caseInsensitive to set.public boolean compare(@Nullable String uri1, @Nullable String uri2) throws URIException
compare
in interface URIComparator
uri1
- first URI to compareuri2
- second URI to compareURIException
- if the URI's can not be successfully evaluatedCopyright © 1999–2018. All rights reserved.