|
Forge - Dependencies API 2.0.0.Alpha3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.forge.dependencies.collection.DependencyNodeUtil
public final class DependencyNodeUtil
Provides utility methods for working with Dependency and DependencyNode objects
| Field Summary | |
|---|---|
static String |
FORGE_ADDON_CLASSIFIER
|
| Method Summary | ||
|---|---|---|
static Iterator<DependencyNode> |
breadthFirstIterator(DependencyNode dependencyNode)
Creates and returns an iterator that traverses the subtree rooted at this node in breadth-first order. |
|
static Iterator<DependencyNode> |
depthFirstIterator(DependencyNode dependencyNode)
Creates and returns an iterator that traverses the subtree rooted at this node in depth-first order. |
|
static boolean |
isForgeAddon(Coordinate coordinate)
Check if the Dependency object is pointing to a Forge Addon artifact |
|
static Iterator<DependencyNode> |
preorderIterator(DependencyNode dependencyNode)
Creates and returns an iterator that traverses the subtree rooted at this node in preorder. |
|
static CharSequence |
prettyPrint(DependencyNode root)
Prints a tree-like structure for this object |
|
static String |
prettyPrint(DependencyNode root,
Predicate<DependencyNode> filter)
|
|
static List<DependencyNode> |
select(DependencyNode node,
Predicate<DependencyNode> filter)
Returns the DependencyNode objects that satisfy the filter. |
|
static
|
select(Iterator<T> iterator,
Predicate<T> filter)
Returns a List of DependencyNode objects that satisfy the filter based on the elements returned by
the Iterator. |
|
static
|
selectFirst(Iterator<T> nodeIterator,
Predicate<T> filter)
Returns the first DependencyNode object found that satisfy the filter. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String FORGE_ADDON_CLASSIFIER
| Method Detail |
|---|
public static <T> T selectFirst(Iterator<T> nodeIterator,
Predicate<T> filter)
DependencyNode object found that satisfy the filter.
nodeIterator - A tree iteratorfilter - the DependencyNodeFilter being used
breadthFirstIterator(DependencyNode),
depthFirstIterator(DependencyNode),
preorderIterator(DependencyNode)
public static <T> List<T> select(Iterator<T> iterator,
Predicate<T> filter)
List of DependencyNode objects that satisfy the filter based on the elements returned by
the Iterator.
iterator - An iterator for the DependencyNode hierarchy treefilter - the DependencyNodeFilter being used
public static List<DependencyNode> select(DependencyNode node,
Predicate<DependencyNode> filter)
DependencyNode objects that satisfy the filter. The nodes are traversed using a pre order
iterator
root - a DependencyNode as the starting pointfilter - the DependencyNodeFilter being used
Collection with the outputpreorderIterator(DependencyNode)public static CharSequence prettyPrint(DependencyNode root)
root -
public static String prettyPrint(DependencyNode root,
Predicate<DependencyNode> filter)
public static Iterator<DependencyNode> depthFirstIterator(DependencyNode dependencyNode)
Iterator.next() is the leftmost leaf.
Modifying the tree by inserting, removing, or moving a node invalidates any iterators created before the modification.
breadthFirstIterator(DependencyNode),
preorderIterator(DependencyNode)public static Iterator<DependencyNode> breadthFirstIterator(DependencyNode dependencyNode)
Iterator.next() is this node.
Modifying the tree by inserting, removing, or moving a node invalidates any iterators created before the modification.
depthFirstIterator(DependencyNode),
preorderIterator(DependencyNode)public static Iterator<DependencyNode> preorderIterator(DependencyNode dependencyNode)
Iterator.next() is this node.
Modifying the tree by inserting, removing, or moving a node invalidates any iterators created before the modification.
depthFirstIterator(DependencyNode),
breadthFirstIterator(DependencyNode)public static boolean isForgeAddon(Coordinate coordinate)
Dependency object is pointing to a Forge Addon artifact
coordinate -
|
Forge - Dependencies API 2.0.0.Alpha3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||