public class RepoFileDTOTreeNode extends Object implements Iterable<RepoFileDTOTreeNode>
| Modifier | Constructor and Description |
|---|---|
protected |
RepoFileDTOTreeNode(RepoFileDTO repoFileDTO) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addChild(RepoFileDTOTreeNode child) |
static RepoFileDTOTreeNode |
createTree(Collection<RepoFileDTO> repoFileDTOs)
Create a single tree from the given
repoFileDTOs. |
List<RepoFileDTOTreeNode> |
getChildren() |
List<RepoFileDTOTreeNode> |
getLeafs() |
RepoFileDTOTreeNode |
getParent() |
String |
getPath()
Gets the path from the root to the current node.
|
RepoFileDTO |
getRepoFileDTO() |
Iterator<RepoFileDTOTreeNode> |
iterator() |
protected void |
setParent(RepoFileDTOTreeNode parent) |
int |
size() |
protected RepoFileDTOTreeNode(RepoFileDTO repoFileDTO)
public static RepoFileDTOTreeNode createTree(Collection<RepoFileDTO> repoFileDTOs) throws IllegalArgumentException
repoFileDTOs.
The given repoFileDTOs must meet the following criteria:
null.
RepoFileDTO.parentEntityID being null).
RepoFileDTO for every
referenced parentEntityID.
repoFileDTOs - the DTOs to be organized in a tree structure. Must not be null. If
empty, the method result will be null.null, if repoFileDTOs is empty.
Never null, if repoFileDTOs contains at least one element.IllegalArgumentException - if the given repoFileDTOs does not meet the criteria stated above.public RepoFileDTO getRepoFileDTO()
public RepoFileDTOTreeNode getParent()
protected void setParent(RepoFileDTOTreeNode parent)
public List<RepoFileDTOTreeNode> getChildren()
protected void addChild(RepoFileDTOTreeNode child)
public String getPath()
The path's elements are separated by a slash ("/").
null.public List<RepoFileDTOTreeNode> getLeafs()
public Iterator<RepoFileDTOTreeNode> iterator()
iterator in interface Iterable<RepoFileDTOTreeNode>public int size()
Copyright © 2013-2014. All Rights Reserved.