Package net.shibboleth.shared.net.impl
Class BasicURLComparator
java.lang.Object
net.shibboleth.shared.net.impl.BasicURLComparator
- All Implemented Interfaces:
URIComparator
A basic implementation of
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).-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompare two URI's (represented as strings) for equivalence.booleanGet the case-insensitivity flag value.voidsetCaseInsensitive(boolean flag) Set the case-insensitivity flag value.
-
Field Details
-
caseInsensitive
private boolean caseInsensitiveThe case-insensitivity flag.
-
-
Constructor Details
-
BasicURLComparator
public BasicURLComparator()
-
-
Method Details
-
isCaseInsensitive
public boolean isCaseInsensitive()Get the case-insensitivity flag value.- Returns:
- Returns the caseInsensitive.
-
setCaseInsensitive
public void setCaseInsensitive(boolean flag) Set the case-insensitivity flag value.- Parameters:
flag- The caseInsensitive to set.
-
compare
Compare two URI's (represented as strings) for equivalence..- Specified by:
comparein interfaceURIComparator- Parameters:
uri1- first URI to compareuri2- second URI to compare- Returns:
- true if the URI's are equivalent, false otherwise
- Throws:
URIException- if the URI's can not be successfully evaluated
-