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 . |
Set<RepoFileDtoTreeNode> |
getChildren() |
List<RepoFileDtoTreeNode> |
getLeafs() |
RepoFileDtoTreeNode |
getParent() |
String |
getPath()
Gets the path from the root to the current node.
|
RepoFileDto |
getRepoFileDto() |
RepoFileDtoTreeNode |
getRoot() |
Iterator<RepoFileDtoTreeNode> |
iterator() |
protected void |
setParent(RepoFileDtoTreeNode parent) |
int |
size() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
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 Set<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()
public RepoFileDtoTreeNode getRoot()
Copyright © 2013–2019. All rights reserved.