Created
September 11, 2009 20:28
-
-
Save mnutt/185543 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Java: | |
public List<? extends SearchResult> getSearchResultsFromUrn(URN urn) { | |
List<SearchResult> urnResults = new ArrayList<SearchResult>(); | |
for(SearchResult result : this.listener.searchResults) { | |
if(result.getUrn().toString().equals(urn.toString())) { urnResults.add(result); } | |
} | |
return urnResults; | |
} | |
# Ruby: | |
def getSearchResultsFromUrn(urn) | |
@listener.searchResults.select{|s| s.urn.to_s == urn.to_s } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment