-/*******************************************************************************\r
- * Copyright (c) 2016 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * Semantum Oy - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.db.function;\r
-\r
-import java.util.Objects;\r
-\r
-import org.simantics.db.exception.DatabaseException;\r
-\r
-/**\r
- * Represents a function that accepts one argument and produces a result that\r
- * can throw database exceptions.\r
- * This is the two-arity specialization of {@link DbFunction}.\r
- *\r
- * @param <T> the type of the first argument to the function\r
- * @param <U> the type of the second argument to the function\r
- * @param <R> the type of the result of the function\r
- *\r
- * @see Function\r
- * @since 1.22.1 & 1.24.0\r
- */\r
-@FunctionalInterface\r
-public interface DbBiFunction<T, U, R> {\r
-\r
- /**\r
- * Applies this function to the given arguments.\r
- *\r
- * @param t the first function argument\r
- * @param u the second function argument\r
- * @return the function result\r
- */\r
- R apply(T t, U u) throws DatabaseException;\r
-\r
- /**\r
- * Returns a composed function that first applies this function to\r
- * its input, and then applies the {@code after} function to the result.\r
- * If evaluation of either function throws an exception, it is relayed to\r
- * the caller of the composed function.\r
- *\r
- * @param <V> the type of output of the {@code after} function, and of the\r
- * composed function\r
- * @param after the function to apply after this function is applied\r
- * @return a composed function that first applies this function and then\r
- * applies the {@code after} function\r
- * @throws NullPointerException if after is null\r
- */\r
- default <V> DbBiFunction<T, U, V> andThen(DbFunction<? super R, ? extends V> after) {\r
- Objects.requireNonNull(after);\r
- return (T t, U u) -> after.apply(apply(t, u));\r
- }\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2016 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Semantum Oy - initial API and implementation
+ *******************************************************************************/
+package org.simantics.db.function;
+
+import java.util.Objects;
+
+import org.simantics.db.exception.DatabaseException;
+
+/**
+ * Represents a function that accepts one argument and produces a result that
+ * can throw database exceptions.
+ * This is the two-arity specialization of {@link DbFunction}.
+ *
+ * @param <T> the type of the first argument to the function
+ * @param <U> the type of the second argument to the function
+ * @param <R> the type of the result of the function
+ *
+ * @see Function
+ * @since 1.22.1 & 1.24.0
+ */
+@FunctionalInterface
+public interface DbBiFunction<T, U, R> {
+
+ /**
+ * Applies this function to the given arguments.
+ *
+ * @param t the first function argument
+ * @param u the second function argument
+ * @return the function result
+ */
+ R apply(T t, U u) throws DatabaseException;
+
+ /**
+ * Returns a composed function that first applies this function to
+ * its input, and then applies the {@code after} function to the result.
+ * If evaluation of either function throws an exception, it is relayed to
+ * the caller of the composed function.
+ *
+ * @param <V> the type of output of the {@code after} function, and of the
+ * composed function
+ * @param after the function to apply after this function is applied
+ * @return a composed function that first applies this function and then
+ * applies the {@code after} function
+ * @throws NullPointerException if after is null
+ */
+ default <V> DbBiFunction<T, U, V> andThen(DbFunction<? super R, ? extends V> after) {
+ Objects.requireNonNull(after);
+ return (T t, U u) -> after.apply(apply(t, u));
+ }
+}