net.named_data.jndn
public class InterestFilter extends Object
Constructor and Description |
---|
InterestFilter(InterestFilter interestFilter)
Create an InterestFilter which is a copy of the given interestFilter.
|
InterestFilter(Name prefix)
Create an InterestFilter to match any Interest whose name starts with the
given prefix.
|
InterestFilter(Name prefix,
String regexFilter)
Create an InterestFilter to match any Interest whose name starts with the
given prefix and the remaining components match the regexFilter regular
expression as described in doesMatch.
|
InterestFilter(String prefixUri)
Create an InterestFilter to match any Interest whose name starts with the
given prefix.
|
InterestFilter(String prefixUri,
String regexFilter)
Create an InterestFilter to match any Interest whose name starts with the
given prefix URI and the remaining components match the regexFilter regular
expression as described in doesMatch.
|
Modifier and Type | Method and Description |
---|---|
boolean |
doesMatch(Name name)
Check if the given name matches this filter.
|
Name |
getPrefix()
Get the prefix given to the constructor.
|
String |
getRegexFilter()
Get the regex filter.
|
boolean |
hasRegexFilter()
Check if a regexFilter was supplied to the constructor.
|
public InterestFilter(Name prefix)
prefix
- The prefix Name. This makes a copy of the Name.public InterestFilter(String prefixUri)
prefixUri
- The URI of the prefix Name.public InterestFilter(Name prefix, String regexFilter)
prefix
- The prefix Name. This makes a copy of the Name.regexFilter
- The regular expression for matching the remaining name
components.public InterestFilter(String prefixUri, String regexFilter)
prefixUri
- The URI of the prefix Name.regexFilter
- The regular expression for matching the remaining name
components.public InterestFilter(InterestFilter interestFilter)
interestFilter
- The InterestFilter with values to copy from.public final boolean doesMatch(Name name)
name
- The name to check against this filter.public final Name getPrefix()
public final boolean hasRegexFilter()
public final String getRegexFilter()
Copyright © 2016. All rights reserved.