public class FollowerFunctionImpl<E,T> extends java.lang.Object implements FollowerFunction<E>
Modifier and Type | Class and Description |
---|---|
static class |
FollowerFunctionImpl.Direction |
static class |
FollowerFunctionImpl.UnorderedStrategy |
Modifier and Type | Field and Description |
---|---|
protected FollowerFunctionImpl.Direction |
direction |
protected com.google.common.base.Predicate<E> |
filter |
protected Production<E,T> |
production |
protected FollowerFunctionImpl.UnorderedStrategy |
unorderedStrategy |
Constructor and Description |
---|
FollowerFunctionImpl(Production<E,T> production) |
Modifier and Type | Method and Description |
---|---|
protected void |
collectByParent(E element,
java.util.Set<E> result,
java.util.Set<E> visited) |
protected void |
collectByParentSequence(E element,
E container,
java.lang.Iterable<E> children,
java.util.Set<E> result,
java.util.Set<E> visited) |
protected void |
collectChildren(E element,
java.util.Set<E> result,
java.util.Set<E> visited) |
protected void |
collectChildrenAlternative(E element,
java.lang.Iterable<E> alternativeChildren,
java.util.Set<E> result,
java.util.Set<E> visited) |
protected void |
collectChildrenSequence(E element,
java.lang.Iterable<E> sequentialChildren,
java.util.Set<E> result,
java.util.Set<E> visited) |
protected void |
collectChildrenUnorderedAlt(E element,
java.lang.Iterable<E> alternativeChildren,
java.util.Set<E> result,
java.util.Set<E> visited) |
protected void |
collectElement(E ele,
java.util.Set<E> result,
java.util.Set<E> visited) |
protected boolean |
filter(E ele) |
FollowerFunctionImpl.Direction |
getDirection() |
com.google.common.base.Predicate<E> |
getFilter() |
java.lang.Iterable<E> |
getFollowers(E element) |
Production<E,?> |
getProduction() |
java.lang.Iterable<E> |
getStarts(E root) |
FollowerFunctionImpl.UnorderedStrategy |
getUnorderedStrategy() |
protected java.lang.Iterable<E> |
orderedIterable(java.lang.Iterable<E> elements) |
protected java.util.List<E> |
orderedList(java.lang.Iterable<E> elements) |
FollowerFunctionImpl<E,T> |
setDirection(FollowerFunctionImpl.Direction direction) |
FollowerFunctionImpl<E,T> |
setFilter(com.google.common.base.Predicate<E> filter) |
FollowerFunctionImpl<E,T> |
setUnorderedStrategy(FollowerFunctionImpl.UnorderedStrategy unorderedStrategy) |
protected java.util.List<E> |
toList(java.lang.Iterable<E> elements) |
protected FollowerFunctionImpl.Direction direction
protected com.google.common.base.Predicate<E> filter
protected Production<E,T> production
protected FollowerFunctionImpl.UnorderedStrategy unorderedStrategy
public FollowerFunctionImpl(Production<E,T> production)
protected void collectByParent(E element, java.util.Set<E> result, java.util.Set<E> visited)
protected void collectByParentSequence(E element, E container, java.lang.Iterable<E> children, java.util.Set<E> result, java.util.Set<E> visited)
protected void collectChildren(E element, java.util.Set<E> result, java.util.Set<E> visited)
protected void collectChildrenAlternative(E element, java.lang.Iterable<E> alternativeChildren, java.util.Set<E> result, java.util.Set<E> visited)
protected void collectChildrenSequence(E element, java.lang.Iterable<E> sequentialChildren, java.util.Set<E> result, java.util.Set<E> visited)
protected void collectChildrenUnorderedAlt(E element, java.lang.Iterable<E> alternativeChildren, java.util.Set<E> result, java.util.Set<E> visited)
protected void collectElement(E ele, java.util.Set<E> result, java.util.Set<E> visited)
protected boolean filter(E ele)
public FollowerFunctionImpl.Direction getDirection()
public com.google.common.base.Predicate<E> getFilter()
public java.lang.Iterable<E> getFollowers(E element)
getFollowers
in interface FollowerFunction<E>
public Production<E,?> getProduction()
public java.lang.Iterable<E> getStarts(E root)
getStarts
in interface FollowerFunction<E>
public FollowerFunctionImpl.UnorderedStrategy getUnorderedStrategy()
public FollowerFunctionImpl<E,T> setDirection(FollowerFunctionImpl.Direction direction)
public FollowerFunctionImpl<E,T> setFilter(com.google.common.base.Predicate<E> filter)
public FollowerFunctionImpl<E,T> setUnorderedStrategy(FollowerFunctionImpl.UnorderedStrategy unorderedStrategy)