adding new operation
diff --git a/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/function/BiIntUnaryOperator.java b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/function/BiIntUnaryOperator.java
new file mode 100644
index 0000000..9b4f510
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/function/BiIntUnaryOperator.java
@@ -0,0 +1,5 @@
+package org.eclipse.fx.core.function;
+
+public interface BiIntUnaryOperator {
+ public int applyAsInt(int t, int u);
+}
diff --git a/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/text/TextUtil.java b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/text/TextUtil.java
index bb01e03..95066eb 100644
--- a/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/text/TextUtil.java
+++ b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/text/TextUtil.java
@@ -31,7 +31,7 @@
import org.eclipse.fx.core.IntTuple;
import org.eclipse.fx.core.Triple;
import org.eclipse.fx.core.function.BiIntPredicate;
-import org.eclipse.fx.core.function.BiIntToIntFunction;
+import org.eclipse.fx.core.function.BiIntUnaryOperator;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
@@ -433,10 +433,10 @@
* index, second argument is the character
* @return transformed character array
*/
- public static char[] transform(char[] source, BiIntToIntFunction transformer) {
+ public static char[] transform(char[] source, BiIntUnaryOperator transformer) {
char[] rv = new char[source.length];
for (int i = 0; i < source.length; i++) {
- rv[i] = (char) transformer.apply(i, source[i]);
+ rv[i] = (char) transformer.applyAsInt(i, source[i]);
}
return rv;
}