1
0
mirror of https://github.com/DanilaFe/abacus synced 2026-09-25 12:52:33 +00:00

Add a Transformation class that replaces java.util.function use

This commit is contained in:
2017-09-24 00:29:43 -07:00
parent 0511c58b13
commit 378ff946d9
6 changed files with 33 additions and 13 deletions

View File

@@ -13,4 +13,4 @@ public interface Transformation<T> {
*/
PatternChain<T> transform(PatternChain<T> from);
}
}

View File

@@ -1,10 +1,10 @@
package org.nwapw.abacus.plugin;
import org.nwapw.abacus.number.NumberInterface;
import org.nwapw.abacus.number.promotion.PromotionFunction;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;
/**
* A class that holds data about a number implementation.
@@ -14,7 +14,7 @@ public abstract class NumberImplementation {
/**
* The list of paths through which this implementation can be promoted.
*/
private Map<String, Function<NumberInterface, NumberInterface>> promotionPaths;
private Map<String, PromotionFunction> promotionPaths;
/**
* The implementation class for this implementation.
*/
@@ -41,7 +41,7 @@ public abstract class NumberImplementation {
*
* @return the map of documentation paths.
*/
public final Map<String, Function<NumberInterface, NumberInterface>> getPromotionPaths() {
public final Map<String, PromotionFunction> getPromotionPaths() {
return promotionPaths;
}