public interface IdTree<Id> extends IdDag<Id>
Modifier and Type | Method and Description |
---|---|
IdTree<Id> |
ancestorIdGraph(Id id,
boolean inclusive)
Getting an id's ancestor id graph (its, parents' parents, and so on).
|
IdTree<Id> |
ancestorIdGraph(Set<Id> ids,
boolean inclusive)
Getting an id set's ancestor id graph (their parents, parents' parents, and so on).
|
com.google.common.collect.ImmutableList<Id> |
ancestorIdList(Id id,
boolean inclusive)
Getting an id's ancestor id list, with the root id first and the id's parent id last.
|
int |
depth(Id id)
Getting the size of an id's ancestor list.
|
IdTree<Id> |
descendantIdTree(Id id) |
Id |
leastDeep(Set<Id> ids)
Select the least deep id from a set, non-deterministic if there are ties.
|
int |
maxDepth()
The maximum depth in the tree.
|
Id |
mostDeep(Set<Id> ids)
Select the most deep id from a set, non-deterministic if there are ties.
|
com.google.common.base.Optional<Id> |
parentId(Id id)
Getting an id's parent id, will be absent if the id is the root.
|
Id |
rootId()
The tree's root id.
|
breadthIdIterable, breadthIdList, depthIdIterable, depthIdList, descendantIdGraph, descendantIdGraph, filterIdGraph, topsortIdList
ancestorIdIterable, ancestorIdIterable, ancestorIdSet, ancestorIdSet, assertIdsEqual, assertIdsEqual, childIdSet, containsCycle, descendantIdIterable, descendantIdIterable, descendantIdSet, descendantIdSet, id__childIds, id__parentIds, idSet, idSize, isAncestorOf, isChildOf, isDescendantOf, isLeaf, isParentOf, isRoot, leafIdSet, optionalTopsortIdList, parentIdSet, rootIdSet, traverseIdIterable, traverseIdIterable, traverseIdList, traverseIdList
IdTree<Id> ancestorIdGraph(Id id, boolean inclusive)
IdGraph
ancestorIdGraph
in interface IdDag<Id>
ancestorIdGraph
in interface IdGraph<Id>
IdTree<Id> ancestorIdGraph(Set<Id> ids, boolean inclusive)
IdGraph
ancestorIdGraph
in interface IdDag<Id>
ancestorIdGraph
in interface IdGraph<Id>
Id rootId()
com.google.common.base.Optional<Id> parentId(Id id)
com.google.common.collect.ImmutableList<Id> ancestorIdList(Id id, boolean inclusive)
int depth(Id id)
int maxDepth()
Id mostDeep(Set<Id> ids)
Copyright © 2014. All rights reserved.