@Test public void getChildren() { assertEquals(Arrays.asList("wiki:one", "wiki:two", "wiki:three"), this.farmTreeNode.getChildren("foo", 0, 5)); assertEquals(Arrays.asList("wiki:two"), this.farmTreeNode.getChildren("foo", 1, 1)); this.farmTreeNode.getProperties().put("exclusions", Collections.singleton("wiki:two")); assertEquals(Arrays.asList("wiki:three"), this.farmTreeNode.getChildren("foo", 1, 1)); }
@Override public List<String> getChildren(String nodeId, int offset, int limit) { List<String> wikiIds = new ArrayList<String>(getWikiIds()); List<String> children = new ArrayList<String>(); for (String wikiId : subList(wikiIds, offset, limit)) { children.add("wiki:" + wikiId); } return children; }
FarmTreeNode extends AbstractEntityTreeNode { @Override public List<String> getChildren(String nodeId, int offset, int limit) { List<String> wikiIds = new ArrayList<String>(getWikiIds()); List<String> children = new ArrayList<String>(); for (String wikiId : subList(wikiIds, offset, limit)) { children.add("wiki:" + wikiId); } return children; } }
FarmTreeNode extends AbstractEntityTreeNode { @Override public List<String> getChildren(String nodeId, int offset, int limit) { List<String> wikiIds = new ArrayList<String>(getWikiIds()); List<String> children = new ArrayList<String>(); for (String wikiId : subList(wikiIds, offset, limit)) { children.add("wiki:" + wikiId); } return children; }  }
FarmTreeNode extends AbstractEntityTreeNode { @Override public List<String> getChildren(String nodeId, int offset, int limit) { List<String> wikiIds = new ArrayList<String>(getWikiIds()); List<String> children = new ArrayList<String>(); for (String wikiId : subList(wikiIds, offset, limit)) { children.add("wiki:" + wikiId); } return children; }  @Override List<String> getChildren(String nodeId, int offset, int limit); @Override int getChildCount(String nodeId); }
FarmTreeNode extends AbstractEntityTreeNode { @Override public List<String> getChildren(String nodeId, int offset, int limit) { List<String> wikiIds = new ArrayList<String>(getWikiIds()); List<String> children = new ArrayList<String>(); for (String wikiId : subList(wikiIds, offset, limit)) { children.add("wiki:" + wikiId); } return children; }  @Override List<String> getChildren(String nodeId, int offset, int limit); @Override int getChildCount(String nodeId);  }