mirror of
https://github.com/DanilaFe/abacus
synced 2026-01-26 08:35:20 +00:00
Move the source files into a new default directory.
This commit is contained in:
17
src/main/java/org/nwapw/abacus/tree/Reducer.java
Normal file
17
src/main/java/org/nwapw/abacus/tree/Reducer.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package org.nwapw.abacus.tree;
|
||||
|
||||
/**
|
||||
* Interface used to reduce a tree into a single value.
|
||||
* @param <T> the value to reduce into.
|
||||
*/
|
||||
public interface Reducer<T> {
|
||||
|
||||
/**
|
||||
* Reduces the given tree into a single value of type T.
|
||||
* @param node the node being passed in to be reduced.
|
||||
* @param children the already-reduced children of this node.
|
||||
* @return the resulting value from the reduce.
|
||||
*/
|
||||
public T reduceNode(TreeNode node, Object...children);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user