com.google.common.base.Predicate<java.net.URI>
, Filter<java.net.URI>
, FlyweightPrototype<Filter<java.net.URI>>
, java.util.function.Predicate<java.net.URI>
public class URLEquals extends AbstractFilter<java.net.URI>
FILTER_PACKAGE_NAME
Constructor | Description |
---|---|
URLEquals(java.lang.String uri) |
Creates a filter that only accepts URIs equal to a given URI.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
apply(java.net.URI uri) |
Apply the filter to a given URI
|
Filter<java.net.URI> |
copy() |
|
boolean |
equals(java.lang.Object x) |
Compare this filter with a given object
|
int |
hashCode() |
|
java.lang.String |
toString() |
Get a string representation of this filter
|
static URLEquals |
valueOf(java.lang.String spec) |
Get a new
URLEquals accepting only a given URI |
toString
public URLEquals(java.lang.String uri)
uri
- the URI that will be the only one acceptedpublic boolean apply(java.net.URI uri)
uri
- the URI to be filteredtrue
if uri
is equal to the URI to be matchedpublic static URLEquals valueOf(java.lang.String spec)
URLEquals
accepting only a given URIspec
- the URI to be matchedURLEquals
that will accept only URIs equal to spec
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object x)
equals
in interface com.google.common.base.Predicate<java.net.URI>
equals
in class java.lang.Object
x
- the object to be comparedtrue
if x
is instance of URLEquals
and the URIs accepted by x
are equal to the URIs accepted by this and vice versapublic int hashCode()
hashCode
in class java.lang.Object
public Filter<java.net.URI> copy()