Interest extends GenericXMLEncodable implements XMLEncodable, Comparable<Interest>, Cloneable, ContentNameProvider { public boolean matches(ContentObject test) { return matches(test, (null != test.signedInfo()) ? test.signedInfo().getPublisherKeyID() : null); } Interest(ContentName name, 
			   PublisherID publisher);  Interest(ContentName name, PublisherPublicKeyDigest publisher);  Interest(ContentName name);  Interest(String name);  Interest(); ContentName name(); void name(ContentName name); Integer maxSuffixComponents(); void maxSuffixComponents(Integer maxSuffixComponents); Integer minSuffixComponents(); void minSuffixComponents(Integer minSuffixComponents); PublisherID publisherID(); void publisherID(PublisherID publisherID); Exclude exclude(); void exclude(Exclude exclude); Integer childSelector(); void childSelector(int childSelector); byte[] interestLifetime(); void interestLifetime(byte[] interestLifetime); Integer answerOriginKind(); void answerOriginKind(int answerOriginKind); Integer scope(); void scope(int scope); byte[] nonce(); boolean matches(ContentObject test); boolean matches(ContentName name, PublisherPublicKeyDigest resultPublisherKeyID); boolean matches(ContentObject co, PublisherPublicKeyDigest resultPublisherKeyID); static Interest lower(ContentName name, int level, PublisherPublicKeyDigest publisher); static Interest next(ContentName name, Integer prefixCount, PublisherPublicKeyDigest publisher); static Interest next(ContentName name,Exclude exclude, Integer prefixCount, Integer maxSuffixComponents, Integer minSuffixComponents,
					PublisherPublicKeyDigest publisher); static Interest last(ContentName name, Integer prefixCount, PublisherPublicKeyDigest publisher); static Interest last(ContentName name, Exclude exclude, Integer prefixCount, Integer maxSuffixComponents, Integer minSuffixComponents, 
				PublisherPublicKeyDigest publisher); static Interest exclude(ContentName name, Exclude exclude, Integer maxSuffixComponents, Integer minSuffixComponents, PublisherPublicKeyDigest publisherID); static Interest constructInterest(ContentName name,  Exclude filter,
			Integer childSelector, Integer maxSuffixComponents, Integer minSuffixComponents, PublisherPublicKeyDigest publisher); @Deprecated static byte[] generateNonce(); boolean isPrefixOf(ContentName name); boolean isPrefixOf(ContentName name, int count); boolean isPrefixOf(ContentObject other); void decode(XMLDecoder decoder); void encode(XMLEncoder encoder); @Override long getElementLabel(); @Override boolean validate(); int compareTo(Interest o); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); Interest clone(); ContentName getContentName(); static final String RECURSIVE_POSTFIX; static final int CHILD_SELECTOR_LEFT; static final int CHILD_SELECTOR_RIGHT; static final int ANSWER_CONTENT_STORE; static final int ANSWER_GENERATED; static final int ANSWER_STALE; static final int MARK_STALE; static final int DEFAULT_ANSWER_ORIGIN_KIND; public long userTime; }
@Test public void testMatchDigest() throws MalformedContentNameStringException { Log.info(Log.FAC_TEST, "Starting testMatchDigest"); ContentName name = ContentName.fromNative("/paul"); byte [] content = "hello".getBytes(); KeyManager keyManager = new KeyManagerScaffold(); ContentObject co = ContentObject.buildContentObject(name, null, content, SecurityBaseNoCcnd.publishers[0], keyManager, null); byte [] digest = co.digest(); Interest interest = new Interest(new ContentName(name, digest)); Assert.assertTrue(interest.matches(co)); interest = new Interest(new ContentName(name, "simon")); Assert.assertFalse(interest.matches(co)); Log.info(Log.FAC_TEST, "Completed testMatchDigest"); }