Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //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));
- }
Add Comment
Please, Sign In to add comment