/*
 * Copyright 2009-2014 Marcelo Guimarães
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *           http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package tools.devnull.trugger;

import java.util.function.Predicate;

/**
 * Interface that maps something to a predicate inside a fluent interface.
 *
 * @since 5.0
 */
public interface PredicateMapper<T, R> {

  /**
   * Use the given condition to map the value.
   *
   * @param condition the condition to use
   * @return a reference to the object for doing other mappings.
   */
  R when(Predicate<T> condition);

}

@@ -1028,10 +1028,169 @@
 tion);%0A%0A
+  /**%0A   * Uses the mapped value as the default.%0A   *%0A   * @return a reference to the object for doing other mappings.%0A   * @since 5.2%0A   */%0A  R byDefault();%0A%0A
 %7D%0A

Add a default option to predicate mapper