org.eclipse.xtext.util.formallang
Class FollowerFunctionImpl<E,T>
java.lang.Object
org.eclipse.xtext.util.formallang.FollowerFunctionImpl<E,T>
- All Implemented Interfaces:
- FollowerFunction<E>
- Direct Known Subclasses:
- ContextPDAProvider.SerializerActionFollowerFunction, ContextPDAProvider.SerializerParserRuleFollowerFunction
public class FollowerFunctionImpl<E,T>
- extends java.lang.Object
- implements FollowerFunction<E>
- Author:
- Moritz Eysholdt - Initial contribution and API
Method Summary |
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
direction
protected FollowerFunctionImpl.Direction direction
filter
protected com.google.common.base.Predicate<E> filter
production
protected Production<E,T> production
unorderedStrategy
protected FollowerFunctionImpl.UnorderedStrategy unorderedStrategy
FollowerFunctionImpl
public FollowerFunctionImpl(Production<E,T> production)
collectByParent
protected void collectByParent(E element,
java.util.Set<E> result,
java.util.Set<E> visited)
collectByParentSequence
protected void collectByParentSequence(E element,
E container,
java.lang.Iterable<E> children,
java.util.Set<E> result,
java.util.Set<E> visited)
collectChildren
protected void collectChildren(E element,
java.util.Set<E> result,
java.util.Set<E> visited)
collectChildrenAlternative
protected void collectChildrenAlternative(E element,
java.lang.Iterable<E> alternativeChildren,
java.util.Set<E> result,
java.util.Set<E> visited)
collectChildrenSequence
protected void collectChildrenSequence(E element,
java.lang.Iterable<E> sequentialChildren,
java.util.Set<E> result,
java.util.Set<E> visited)
collectChildrenUnorderedAlt
protected void collectChildrenUnorderedAlt(E element,
java.lang.Iterable<E> alternativeChildren,
java.util.Set<E> result,
java.util.Set<E> visited)
collectElement
protected void collectElement(E ele,
java.util.Set<E> result,
java.util.Set<E> visited)
filter
protected boolean filter(E ele)
getDirection
public FollowerFunctionImpl.Direction getDirection()
getFilter
public com.google.common.base.Predicate<E> getFilter()
getFollowers
public java.lang.Iterable<E> getFollowers(E element)
- Specified by:
getFollowers
in interface FollowerFunction<E>
getProduction
public Production<E,?> getProduction()
getStarts
public java.lang.Iterable<E> getStarts(E root)
- Specified by:
getStarts
in interface FollowerFunction<E>
getUnorderedStrategy
public FollowerFunctionImpl.UnorderedStrategy getUnorderedStrategy()
orderedIterable
protected java.lang.Iterable<E> orderedIterable(java.lang.Iterable<E> elements)
orderedList
protected java.util.List<E> orderedList(java.lang.Iterable<E> elements)
setDirection
public FollowerFunctionImpl<E,T> setDirection(FollowerFunctionImpl.Direction direction)
setFilter
public FollowerFunctionImpl<E,T> setFilter(com.google.common.base.Predicate<E> filter)
setUnorderedStrategy
public FollowerFunctionImpl<E,T> setUnorderedStrategy(FollowerFunctionImpl.UnorderedStrategy unorderedStrategy)
toList
protected java.util.List<E> toList(java.lang.Iterable<E> elements)