Created
May 19, 2010 03:33
-
-
Save pk11/405916 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
//normal java | |
public List<Item> getTitles(Collection<Item> items,String title) { | |
List<Item> matching = new ArrayList<Item>(); | |
Iterator<Item> iter = items.iterator(); | |
while (iter.hasNext()) { | |
Item item = iter.next(); | |
if (item.getTitle().equals(title)) { | |
matching.add(title); | |
} | |
} | |
return matching; | |
} | |
//jedi java | |
public class Item { | |
... | |
@JediFilter | |
public String getTitle() {...} | |
} | |
public List<Item> getTitles(Collection<Item> items,String title { | |
return select(items, getTitleEqualsFilter(title)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment