Class TypeSwitch2.Node<O>
- java.lang.Object
-
- com.g2forge.alexandria.java.type.function.TypeSwitch2.Node<O>
-
- Enclosing class:
- TypeSwitch2<I0,I1,O>
protected static class TypeSwitch2.Node<O> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<N>
children
protected ITypedFunction2<?,?,? extends O>
function
-
Constructor Summary
Constructors Constructor Description Node(ITypedFunction2<?,?,? extends O> function)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <I0,I1>
Oapply(IFunction2<? super I0,? super I1,? extends O> fallback, I0 input0, I1 input1)
protected void
clean()
protected static <F,O,N extends com.g2forge.alexandria.java.type.function.ANode<O,N>>
NcomputeRoot(Collection<? extends F> functions, IFunction1<? super F,? extends N> createNode)
protected N
get(IPredicate1<N> applies)
protected N
get(IPredicate1<N> applies, IFunction1<? super Collection<N>,? extends N> extract)
Set<N>
getChildren()
ITypedFunction2<?,?,? extends O>
getFunction()
protected boolean
isAncestor(TypeSwitch2.Node<O> node)
protected boolean
isDescendant(TypeSwitch2.Node<O> node)
protected boolean
isObjectRoot()
protected static <O,N extends com.g2forge.alexandria.java.type.function.ANode<O,N>>
List<N>split(N newChild, N existingParent, IConsumer1<N> siblings)
String
toString()
-
-
-
Field Detail
-
function
protected final ITypedFunction2<?,?,? extends O> function
-
children
protected Set<N extends com.g2forge.alexandria.java.type.function.ANode<O,N>> children
-
-
Constructor Detail
-
Node
@ConstructorProperties("function") public Node(ITypedFunction2<?,?,? extends O> function)
-
-
Method Detail
-
apply
protected <I0,I1> O apply(IFunction2<? super I0,? super I1,? extends O> fallback, I0 input0, I1 input1)
-
isAncestor
protected boolean isAncestor(TypeSwitch2.Node<O> node)
-
isDescendant
protected boolean isDescendant(TypeSwitch2.Node<O> node)
-
isObjectRoot
protected boolean isObjectRoot()
-
toString
public String toString()
-
getFunction
public ITypedFunction2<?,?,? extends O> getFunction()
-
computeRoot
protected static <F,O,N extends com.g2forge.alexandria.java.type.function.ANode<O,N>> N computeRoot(Collection<? extends F> functions, IFunction1<? super F,? extends N> createNode)
-
split
protected static <O,N extends com.g2forge.alexandria.java.type.function.ANode<O,N>> List<N> split(N newChild, N existingParent, IConsumer1<N> siblings)
-
clean
protected void clean()
-
get
protected N get(IPredicate1<N> applies)
-
get
protected N get(IPredicate1<N> applies, IFunction1<? super Collection<N>,? extends N> extract)
-
getChildren
public Set<N> getChildren()
-
-