public interface Graph<Id,Node> extends PartialGraph<Id,Node>
Modifier and Type | Method and Description |
---|---|
Iterable<Node> |
ancestorNodeIterable(Id id,
boolean inclusive)
Getting an id's ancestor node iterable (its parents, parents' parents, and so on).
|
Iterable<Node> |
ancestorNodeIterable(Set<Id> ids,
boolean inclusive)
Getting an id set's ancestor node iterable (their parents, parents' parents, and so on).
|
com.google.common.collect.ImmutableSet<Node> |
ancestorNodeSet(Id id,
boolean inclusive)
Getting an id's ancestor node set (its parents, parents' parents, and so on).
|
com.google.common.collect.ImmutableSet<Node> |
ancestorNodeSet(Set<Id> ids,
boolean inclusive)
Getting an id set's ancestor node set (their parents, parents' parents, and so on).
|
com.google.common.collect.ImmutableSet<Node> |
childNodeSet(Id id)
Getting an id's child node set.
|
Iterable<Node> |
descendantNodeIterable(Id id,
boolean inclusive)
Getting an id's descendant node iterable (its children, childrens' children, and so on).
|
Iterable<Node> |
descendantNodeIterable(Set<Id> ids,
boolean inclusive)
Getting an id set's descendant node iterable (their children, childrens' children, and so on).
|
com.google.common.collect.ImmutableSet<Node> |
descendantNodeSet(Id id,
boolean inclusive)
Getting an id's descendant node set (its children, childrens' children, and so on).
|
com.google.common.collect.ImmutableSet<Node> |
descendantNodeSet(Set<Id> ids,
boolean inclusive)
Getting an id set's descendant node set (their children, childrens' children, and so on).
|
com.google.common.collect.ImmutableSet<Node> |
leafNodeSet()
The digraph's leaf (sink) nodes, so the nodes without children.
|
com.google.common.base.Optional<com.google.common.collect.ImmutableList<Node>> |
optionalTopsortNodeList()
A topologically sorted list of nodes, with roots (sources) first (will be absent if the digraph
is cyclic).
|
com.google.common.collect.ImmutableSet<Node> |
parentNodeSet(Id id)
Getting an id's parent node set.
|
com.google.common.collect.ImmutableSet<Node> |
rootNodeSet()
The digraph's root (source) nodes, so the nodes without parents.
|
Iterable<Node> |
transformIterable(Iterable<Id> idIterable)
Converting an id iterable to a node iterable.
|
Iterator<Node> |
transformIterator(Iterator<Id> idIterator)
Converting an id iterator to a node iterator.
|
com.google.common.collect.ImmutableList<Node> |
transformList(Iterable<Id> ids)
Converting ids to a node list.
|
com.google.common.base.Optional<Node> |
transformOptional(com.google.common.base.Optional<Id> id)
Converting optional id to an optional node.
|
com.google.common.collect.ImmutableSet<Node> |
transformSet(Iterable<Id> ids)
Converting ids to a node set.
|
Iterable<Node> |
traverseNodeIterable(boolean depthFirst,
boolean inclusive,
Id startId,
LambdaLib.Fn1<Node,List<Id>> expand)
Generic node traversal as an iterable.
|
Iterable<Node> |
traverseNodeIterable(boolean depthFirst,
boolean inclusive,
com.google.common.collect.ImmutableList<Id> startIds,
LambdaLib.Fn1<Node,List<Id>> expand)
Generic node traversal as an iterable.
|
com.google.common.collect.ImmutableList<Node> |
traverseNodeList(boolean depthFirst,
boolean inclusive,
Id startId,
LambdaLib.Fn1<Node,List<Id>> expand)
Generic node traversal copied into a list.
|
com.google.common.collect.ImmutableList<Node> |
traverseNodeList(boolean depthFirst,
boolean inclusive,
com.google.common.collect.ImmutableList<Id> startIds,
LambdaLib.Fn1<Node,List<Id>> expand)
Generic node traversal copied into a list.
|
add, addAll, clear, containsNodeForId, getId, getNode, id__node, idGraph, nodeSet, nodeSize, remove, removeAll, retainAll, transformIterable, transformIterator, transformList, transformOptional, transformSet, unboundIdSet
ancestorIdGraph, ancestorIdGraph, ancestorIdIterable, ancestorIdIterable, ancestorIdSet, ancestorIdSet, assertIdsEqual, assertIdsEqual, childIdSet, containsCycle, descendantIdGraph, descendantIdGraph, descendantIdIterable, descendantIdIterable, descendantIdSet, descendantIdSet, filterIdGraph, id__childIds, id__parentIds, idSet, idSize, isAncestorOf, isChildOf, isDescendantOf, isLeaf, isParentOf, isRoot, leafIdSet, optionalTopsortIdList, parentIdSet, rootIdSet, traverseIdIterable, traverseIdIterable, traverseIdList, traverseIdList
com.google.common.collect.ImmutableSet<Node> parentNodeSet(Id id)
com.google.common.collect.ImmutableSet<Node> childNodeSet(Id id)
Iterable<Node> ancestorNodeIterable(Id id, boolean inclusive)
Iterable<Node> ancestorNodeIterable(Set<Id> ids, boolean inclusive)
com.google.common.collect.ImmutableSet<Node> ancestorNodeSet(Id id, boolean inclusive)
com.google.common.collect.ImmutableSet<Node> ancestorNodeSet(Set<Id> ids, boolean inclusive)
Iterable<Node> descendantNodeIterable(Id id, boolean inclusive)
Iterable<Node> descendantNodeIterable(Set<Id> ids, boolean inclusive)
com.google.common.collect.ImmutableSet<Node> descendantNodeSet(Id id, boolean inclusive)
com.google.common.collect.ImmutableSet<Node> descendantNodeSet(Set<Id> ids, boolean inclusive)
com.google.common.collect.ImmutableSet<Node> rootNodeSet()
com.google.common.collect.ImmutableSet<Node> leafNodeSet()
com.google.common.base.Optional<com.google.common.collect.ImmutableList<Node>> optionalTopsortNodeList()
Iterable<Node> traverseNodeIterable(boolean depthFirst, boolean inclusive, Id startId, LambdaLib.Fn1<Node,List<Id>> expand)
depthFirst
- Whether to traverse depth first or breadth first.inclusive
- Whether to include the start nodes in the traversal.startId
- The initial id.expand
- A function mapping a node to the next ids.Iterable<Node> traverseNodeIterable(boolean depthFirst, boolean inclusive, com.google.common.collect.ImmutableList<Id> startIds, LambdaLib.Fn1<Node,List<Id>> expand)
depthFirst
- Whether to traverse depth first or breadth first.inclusive
- Whether to include the start nodes in the traversal.startIds
- The initial id list.expand
- A function mapping a node to the next ids.com.google.common.collect.ImmutableList<Node> traverseNodeList(boolean depthFirst, boolean inclusive, Id startId, LambdaLib.Fn1<Node,List<Id>> expand)
depthFirst
- Whether to traverse depth first or breadth first.inclusive
- Whether to include the start nodes in the traversal.startIds
- The initial id.expand
- A function mapping a node to the next ids.com.google.common.collect.ImmutableList<Node> traverseNodeList(boolean depthFirst, boolean inclusive, com.google.common.collect.ImmutableList<Id> startIds, LambdaLib.Fn1<Node,List<Id>> expand)
depthFirst
- Whether to traverse depth first or breadth first.inclusive
- Whether to include the start nodes in the traversal.startIds
- The initial id list.expand
- A function mapping a node to the next ids.com.google.common.collect.ImmutableSet<Node> transformSet(Iterable<Id> ids)
com.google.common.collect.ImmutableList<Node> transformList(Iterable<Id> ids)
com.google.common.base.Optional<Node> transformOptional(com.google.common.base.Optional<Id> id)
Iterable<Node> transformIterable(Iterable<Id> idIterable)
Copyright © 2014. All rights reserved.