Skip to content

Instantly share code, notes, and snippets.

@johnmay
Created July 29, 2012 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnmay/3201564 to your computer and use it in GitHub Desktop.
Save johnmay/3201564 to your computer and use it in GitHub Desktop.
Creating a custom matcher
new AbstractAtomMatcher(){
@Override
public boolean matchers(IAtom query, IAtom subject) {
Object descriptor1 = query.getProperty("stereo.descriptor");
Object descriptor2 = subject.getProperty("stereo.descriptor");
return descriptor1 != null ? descriptor1.equals(descriptor2) : descriptor2 == null;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment