api/src/main/java/org/ocpsoft/rewrite/config/Conditions.java
public static ConditionBuilder wrap(final Condition condition)
   {
      if (condition == null)
         return create();

      if (condition instanceof ConditionBuilder)
         return (ConditionBuilder) condition;

      return new DefaultConditionBuilderInternal(condition) {
         @Override
         public boolean evaluate(Rewrite event, EvaluationContext context)
         {
            return condition.evaluate(event, context);
         }

         @Override
         public String toString()
         {
            return condition.toString();
         }

         @Override
         public List<Condition> getConditions()
         {
            return Arrays.asList(condition);
         }
      };
   }
public static ConditionBuilder wrap(final Condition condition)
   {
      if (condition == null)
         return create();

      if (condition instanceof ConditionBuilder)
         return (ConditionBuilder) condition;

      return new DefaultConditionBuilderInternal(condition) {
         @Override
         public boolean evaluate(Rewrite event, EvaluationContext context)
         {
            return condition.evaluate(event, context);
         }

         @Override
         public String toString()
         {
            return condition.toString();
         }

         @Override
         public List<Condition> getConditions()
         {
            return Arrays.asList(condition);
         }
      };
   }
Wrap a given {@link Condition} as a new {@link DefaultConditionBuilder} that evaluates the the original
{@link Condition} when {@link #evaluate(Rewrite, EvaluationContext)} is invoked.